Class: Temporalio::Runtime::OpenTelemetryMetricsOptions
- Inherits:
-
Object
- Object
- Temporalio::Runtime::OpenTelemetryMetricsOptions
- Defined in:
- lib/temporalio/runtime.rb
Overview
Options for exporting metrics to OpenTelemetry.
Defined Under Namespace
Modules: MetricTemporality
Instance Attribute Summary collapse
-
#durations_as_seconds ⇒ Boolean
Whether to use float seconds instead of integer milliseconds for durations, default is
false
. -
#headers ⇒ Hash<String, String>?
Headers for OpenTelemetry endpoint.
-
#http ⇒ Boolean
True if the protocol is HTTP, false if gRPC (the default).
-
#metric_periodicity ⇒ Float?
How frequently metrics should be exported, unset uses internal default.
-
#metric_temporality ⇒ MetricTemporality
How frequently metrics should be exported, default is MetricTemporality::CUMULATIVE.
-
#url ⇒ String
URL for OpenTelemetry endpoint.
Instance Method Summary collapse
-
#initialize(url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false, http: false) ⇒ OpenTelemetryMetricsOptions
constructor
Create OpenTelemetry options.
Constructor Details
#initialize(url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false, http: false) ⇒ OpenTelemetryMetricsOptions
Create OpenTelemetry options.
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/temporalio/runtime.rb', line 216 def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false, http: false ) super end |
Instance Attribute Details
#durations_as_seconds ⇒ Boolean
Returns Whether to use float seconds instead of integer milliseconds for durations, default is false
.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/temporalio/runtime.rb', line 200 class OpenTelemetryMetricsOptions # OpenTelemetry metric temporality. module MetricTemporality CUMULATIVE = 1 DELTA = 2 end # Create OpenTelemetry options. # # @param url [String] URL for OpenTelemetry endpoint. # @param headers [Hash<String, String>, nil] Headers for OpenTelemetry endpoint. # @param metric_periodicity [Float, nil] How frequently metrics should be exported, unset uses internal default. # @param metric_temporality [MetricTemporality] How frequently metrics should be exported. # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for # durations. # @param http [Boolean] True if the protocol is HTTP, false if gRPC (the default). def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false, http: false ) super end # @!visibility private def _to_bridge # @type self: OpenTelemetryMetricsOptions Internal::Bridge::Runtime::OpenTelemetryMetricsOptions.new( url:, headers:, metric_periodicity:, metric_temporality_delta: case metric_temporality when MetricTemporality::CUMULATIVE then false when MetricTemporality::DELTA then true else raise 'Unrecognized metric temporality' end, durations_as_seconds:, http: ) end end |
#headers ⇒ Hash<String, String>?
Returns Headers for OpenTelemetry endpoint.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/temporalio/runtime.rb', line 200 class OpenTelemetryMetricsOptions # OpenTelemetry metric temporality. module MetricTemporality CUMULATIVE = 1 DELTA = 2 end # Create OpenTelemetry options. # # @param url [String] URL for OpenTelemetry endpoint. # @param headers [Hash<String, String>, nil] Headers for OpenTelemetry endpoint. # @param metric_periodicity [Float, nil] How frequently metrics should be exported, unset uses internal default. # @param metric_temporality [MetricTemporality] How frequently metrics should be exported. # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for # durations. # @param http [Boolean] True if the protocol is HTTP, false if gRPC (the default). def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false, http: false ) super end # @!visibility private def _to_bridge # @type self: OpenTelemetryMetricsOptions Internal::Bridge::Runtime::OpenTelemetryMetricsOptions.new( url:, headers:, metric_periodicity:, metric_temporality_delta: case metric_temporality when MetricTemporality::CUMULATIVE then false when MetricTemporality::DELTA then true else raise 'Unrecognized metric temporality' end, durations_as_seconds:, http: ) end end |
#http ⇒ Boolean
Returns True if the protocol is HTTP, false if gRPC (the default).
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/temporalio/runtime.rb', line 200 class OpenTelemetryMetricsOptions # OpenTelemetry metric temporality. module MetricTemporality CUMULATIVE = 1 DELTA = 2 end # Create OpenTelemetry options. # # @param url [String] URL for OpenTelemetry endpoint. # @param headers [Hash<String, String>, nil] Headers for OpenTelemetry endpoint. # @param metric_periodicity [Float, nil] How frequently metrics should be exported, unset uses internal default. # @param metric_temporality [MetricTemporality] How frequently metrics should be exported. # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for # durations. # @param http [Boolean] True if the protocol is HTTP, false if gRPC (the default). def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false, http: false ) super end # @!visibility private def _to_bridge # @type self: OpenTelemetryMetricsOptions Internal::Bridge::Runtime::OpenTelemetryMetricsOptions.new( url:, headers:, metric_periodicity:, metric_temporality_delta: case metric_temporality when MetricTemporality::CUMULATIVE then false when MetricTemporality::DELTA then true else raise 'Unrecognized metric temporality' end, durations_as_seconds:, http: ) end end |
#metric_periodicity ⇒ Float?
Returns How frequently metrics should be exported, unset uses internal default.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/temporalio/runtime.rb', line 200 class OpenTelemetryMetricsOptions # OpenTelemetry metric temporality. module MetricTemporality CUMULATIVE = 1 DELTA = 2 end # Create OpenTelemetry options. # # @param url [String] URL for OpenTelemetry endpoint. # @param headers [Hash<String, String>, nil] Headers for OpenTelemetry endpoint. # @param metric_periodicity [Float, nil] How frequently metrics should be exported, unset uses internal default. # @param metric_temporality [MetricTemporality] How frequently metrics should be exported. # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for # durations. # @param http [Boolean] True if the protocol is HTTP, false if gRPC (the default). def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false, http: false ) super end # @!visibility private def _to_bridge # @type self: OpenTelemetryMetricsOptions Internal::Bridge::Runtime::OpenTelemetryMetricsOptions.new( url:, headers:, metric_periodicity:, metric_temporality_delta: case metric_temporality when MetricTemporality::CUMULATIVE then false when MetricTemporality::DELTA then true else raise 'Unrecognized metric temporality' end, durations_as_seconds:, http: ) end end |
#metric_temporality ⇒ MetricTemporality
Returns How frequently metrics should be exported, default is Temporalio::Runtime::OpenTelemetryMetricsOptions::MetricTemporality::CUMULATIVE.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/temporalio/runtime.rb', line 200 class OpenTelemetryMetricsOptions # OpenTelemetry metric temporality. module MetricTemporality CUMULATIVE = 1 DELTA = 2 end # Create OpenTelemetry options. # # @param url [String] URL for OpenTelemetry endpoint. # @param headers [Hash<String, String>, nil] Headers for OpenTelemetry endpoint. # @param metric_periodicity [Float, nil] How frequently metrics should be exported, unset uses internal default. # @param metric_temporality [MetricTemporality] How frequently metrics should be exported. # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for # durations. # @param http [Boolean] True if the protocol is HTTP, false if gRPC (the default). def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false, http: false ) super end # @!visibility private def _to_bridge # @type self: OpenTelemetryMetricsOptions Internal::Bridge::Runtime::OpenTelemetryMetricsOptions.new( url:, headers:, metric_periodicity:, metric_temporality_delta: case metric_temporality when MetricTemporality::CUMULATIVE then false when MetricTemporality::DELTA then true else raise 'Unrecognized metric temporality' end, durations_as_seconds:, http: ) end end |
#url ⇒ String
Returns URL for OpenTelemetry endpoint.
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/temporalio/runtime.rb', line 200 class OpenTelemetryMetricsOptions # OpenTelemetry metric temporality. module MetricTemporality CUMULATIVE = 1 DELTA = 2 end # Create OpenTelemetry options. # # @param url [String] URL for OpenTelemetry endpoint. # @param headers [Hash<String, String>, nil] Headers for OpenTelemetry endpoint. # @param metric_periodicity [Float, nil] How frequently metrics should be exported, unset uses internal default. # @param metric_temporality [MetricTemporality] How frequently metrics should be exported. # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for # durations. # @param http [Boolean] True if the protocol is HTTP, false if gRPC (the default). def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false, http: false ) super end # @!visibility private def _to_bridge # @type self: OpenTelemetryMetricsOptions Internal::Bridge::Runtime::OpenTelemetryMetricsOptions.new( url:, headers:, metric_periodicity:, metric_temporality_delta: case metric_temporality when MetricTemporality::CUMULATIVE then false when MetricTemporality::DELTA then true else raise 'Unrecognized metric temporality' end, durations_as_seconds:, http: ) end end |