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.
-
#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) ⇒ OpenTelemetryMetricsOptions
constructor
Create OpenTelemetry options.
Constructor Details
#initialize(url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: false) ⇒ OpenTelemetryMetricsOptions
Create OpenTelemetry options.
199 200 201 202 203 204 205 206 207 |
# File 'lib/temporalio/runtime.rb', line 199 def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: 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
.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 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 |
# File 'lib/temporalio/runtime.rb', line 184 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. def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: 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: ) end end |
#headers ⇒ Hash<String, String>?
Returns Headers for OpenTelemetry endpoint.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 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 |
# File 'lib/temporalio/runtime.rb', line 184 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. def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: 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: ) end end |
#metric_periodicity ⇒ Float?
Returns How frequently metrics should be exported, unset uses internal default.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 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 |
# File 'lib/temporalio/runtime.rb', line 184 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. def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: 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: ) end end |
#metric_temporality ⇒ MetricTemporality
Returns How frequently metrics should be exported, default is Temporalio::Runtime::OpenTelemetryMetricsOptions::MetricTemporality::CUMULATIVE.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 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 |
# File 'lib/temporalio/runtime.rb', line 184 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. def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: 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: ) end end |
#url ⇒ String
Returns URL for OpenTelemetry endpoint.
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 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 |
# File 'lib/temporalio/runtime.rb', line 184 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. def initialize( url:, headers: nil, metric_periodicity: nil, metric_temporality: MetricTemporality::CUMULATIVE, durations_as_seconds: 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: ) end end |