Class: Temporalio::Runtime::MetricsOptions
- Inherits:
-
Object
- Object
- Temporalio::Runtime::MetricsOptions
- Defined in:
- lib/temporalio/runtime.rb
Overview
Metrics options for runtime telemetry. Either #opentelemetry or #prometheus required, but not both.
Instance Attribute Summary collapse
-
#attach_service_name ⇒ Boolean
Whether to put the service_name on every metric.
-
#global_tags ⇒ Hash<String, String>?
Resource tags to be applied to all metrics.
-
#metric_prefix ⇒ String?
Prefix to put on every Temporal metric.
-
#opentelemetry ⇒ OpenTelemetryMetricsOptions?
OpenTelemetry options if using OpenTelemetry.
-
#prometheus ⇒ PrometheusMetricsOptions?
Prometheus options if using Prometheus.
Instance Method Summary collapse
-
#initialize(opentelemetry: nil, prometheus: nil, attach_service_name: true, global_tags: nil, metric_prefix: nil) ⇒ MetricsOptions
constructor
Create metrics options.
Constructor Details
#initialize(opentelemetry: nil, prometheus: nil, attach_service_name: true, global_tags: nil, metric_prefix: nil) ⇒ MetricsOptions
Create metrics options. Either ‘opentelemetry` or `prometheus` required, but not both.
139 140 141 142 143 144 145 146 147 |
# File 'lib/temporalio/runtime.rb', line 139 def initialize( opentelemetry: nil, prometheus: nil, attach_service_name: true, global_tags: nil, metric_prefix: nil ) super end |
Instance Attribute Details
#attach_service_name ⇒ Boolean
Returns Whether to put the service_name on every metric.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/temporalio/runtime.rb', line 129 class MetricsOptions # Create metrics options. Either `opentelemetry` or `prometheus` required, but not both. # # @param opentelemetry [OpenTelemetryMetricsOptions, nil] OpenTelemetry options if using OpenTelemetry. This is # mutually exclusive with `prometheus`. # @param prometheus [PrometheusMetricsOptions, nil] Prometheus options if using Prometheus. This is mutually # exclusive with `opentelemetry`. # @param attach_service_name [Boolean] Whether to put the service_name on every metric. # @param global_tags [Hash<String, String>, nil] Resource tags to be applied to all metrics. # @param metric_prefix [String, nil] Prefix to put on every Temporal metric. If unset, defaults to `temporal_`. def initialize( opentelemetry: nil, prometheus: nil, attach_service_name: true, global_tags: nil, metric_prefix: nil ) super end # @!visibility private def _to_bridge # @type self: MetricsOptions Internal::Bridge::Runtime::MetricsOptions.new( opentelemetry: opentelemetry&._to_bridge, prometheus: prometheus&._to_bridge, attach_service_name:, global_tags:, metric_prefix: ) end end |
#global_tags ⇒ Hash<String, String>?
Returns Resource tags to be applied to all metrics.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/temporalio/runtime.rb', line 129 class MetricsOptions # Create metrics options. Either `opentelemetry` or `prometheus` required, but not both. # # @param opentelemetry [OpenTelemetryMetricsOptions, nil] OpenTelemetry options if using OpenTelemetry. This is # mutually exclusive with `prometheus`. # @param prometheus [PrometheusMetricsOptions, nil] Prometheus options if using Prometheus. This is mutually # exclusive with `opentelemetry`. # @param attach_service_name [Boolean] Whether to put the service_name on every metric. # @param global_tags [Hash<String, String>, nil] Resource tags to be applied to all metrics. # @param metric_prefix [String, nil] Prefix to put on every Temporal metric. If unset, defaults to `temporal_`. def initialize( opentelemetry: nil, prometheus: nil, attach_service_name: true, global_tags: nil, metric_prefix: nil ) super end # @!visibility private def _to_bridge # @type self: MetricsOptions Internal::Bridge::Runtime::MetricsOptions.new( opentelemetry: opentelemetry&._to_bridge, prometheus: prometheus&._to_bridge, attach_service_name:, global_tags:, metric_prefix: ) end end |
#metric_prefix ⇒ String?
Returns Prefix to put on every Temporal metric. If unset, defaults to ‘temporal_`.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/temporalio/runtime.rb', line 129 class MetricsOptions # Create metrics options. Either `opentelemetry` or `prometheus` required, but not both. # # @param opentelemetry [OpenTelemetryMetricsOptions, nil] OpenTelemetry options if using OpenTelemetry. This is # mutually exclusive with `prometheus`. # @param prometheus [PrometheusMetricsOptions, nil] Prometheus options if using Prometheus. This is mutually # exclusive with `opentelemetry`. # @param attach_service_name [Boolean] Whether to put the service_name on every metric. # @param global_tags [Hash<String, String>, nil] Resource tags to be applied to all metrics. # @param metric_prefix [String, nil] Prefix to put on every Temporal metric. If unset, defaults to `temporal_`. def initialize( opentelemetry: nil, prometheus: nil, attach_service_name: true, global_tags: nil, metric_prefix: nil ) super end # @!visibility private def _to_bridge # @type self: MetricsOptions Internal::Bridge::Runtime::MetricsOptions.new( opentelemetry: opentelemetry&._to_bridge, prometheus: prometheus&._to_bridge, attach_service_name:, global_tags:, metric_prefix: ) end end |
#opentelemetry ⇒ OpenTelemetryMetricsOptions?
Returns OpenTelemetry options if using OpenTelemetry. This is mutually exclusive with prometheus
.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/temporalio/runtime.rb', line 129 class MetricsOptions # Create metrics options. Either `opentelemetry` or `prometheus` required, but not both. # # @param opentelemetry [OpenTelemetryMetricsOptions, nil] OpenTelemetry options if using OpenTelemetry. This is # mutually exclusive with `prometheus`. # @param prometheus [PrometheusMetricsOptions, nil] Prometheus options if using Prometheus. This is mutually # exclusive with `opentelemetry`. # @param attach_service_name [Boolean] Whether to put the service_name on every metric. # @param global_tags [Hash<String, String>, nil] Resource tags to be applied to all metrics. # @param metric_prefix [String, nil] Prefix to put on every Temporal metric. If unset, defaults to `temporal_`. def initialize( opentelemetry: nil, prometheus: nil, attach_service_name: true, global_tags: nil, metric_prefix: nil ) super end # @!visibility private def _to_bridge # @type self: MetricsOptions Internal::Bridge::Runtime::MetricsOptions.new( opentelemetry: opentelemetry&._to_bridge, prometheus: prometheus&._to_bridge, attach_service_name:, global_tags:, metric_prefix: ) end end |
#prometheus ⇒ PrometheusMetricsOptions?
Returns Prometheus options if using Prometheus. This is mutually exclusive with opentelemetry
.
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/temporalio/runtime.rb', line 129 class MetricsOptions # Create metrics options. Either `opentelemetry` or `prometheus` required, but not both. # # @param opentelemetry [OpenTelemetryMetricsOptions, nil] OpenTelemetry options if using OpenTelemetry. This is # mutually exclusive with `prometheus`. # @param prometheus [PrometheusMetricsOptions, nil] Prometheus options if using Prometheus. This is mutually # exclusive with `opentelemetry`. # @param attach_service_name [Boolean] Whether to put the service_name on every metric. # @param global_tags [Hash<String, String>, nil] Resource tags to be applied to all metrics. # @param metric_prefix [String, nil] Prefix to put on every Temporal metric. If unset, defaults to `temporal_`. def initialize( opentelemetry: nil, prometheus: nil, attach_service_name: true, global_tags: nil, metric_prefix: nil ) super end # @!visibility private def _to_bridge # @type self: MetricsOptions Internal::Bridge::Runtime::MetricsOptions.new( opentelemetry: opentelemetry&._to_bridge, prometheus: prometheus&._to_bridge, attach_service_name:, global_tags:, metric_prefix: ) end end |