You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Description:**
The `translation_rules` option has been deprecated since
#18218,
we can now delete the option.
Internally, to be able to still have the default translation rules
without the `translation_rules` config option, a new config structure
has been added, but is not nested within the exporter's `Config`, it's
its own struct.
of the OTel metrics to a SignalFx compatible format. The default translation rules are
84
-
defined in `translation/constants.go`.
84
+
defined in [`internal/translation/constants.go`](./internal/translation/constants.go).
85
85
- `timeout` (default = 10s): Amount of time to wait for a send operation to
86
86
complete.
87
87
- `http2_read_idle_timeout` (default = 10s): Send a ping frame for a health check if the connection has been idle for the configured value.
@@ -179,7 +179,7 @@ One of `realm` and `api_url` are required.
179
179
## Default Metric Filters
180
180
[List of metrics excluded by default](./internal/translation/default_metrics.go)
181
181
182
-
Some OpenTelemetry receivers may send metrics that SignalFx considers to be categorized as custom metrics. In order to prevent unwanted overage usage due to custom metrics from these receivers, the SignalFx exporter has a [set of metrics excluded by default](./internal/translation/default_metrics.go). Some exclusion rules use regex to exclude multiple metric names. Some metrics are only excluded if specific resource labels (dimensions) are present. If `translation_rules` are configured and new metrics match a default exclusion, the new metric will still be excluded. Users may configure the SignalFx exporter's `include_metrics` config option to override the any of the default exclusions, as `include_metrics` will always take precedence over any exclusions. An example of `include_metrics` is shown below.
182
+
Some OpenTelemetry receivers may send metrics that SignalFx considers to be categorized as custom metrics. In order to prevent unwanted overage usage due to custom metrics from these receivers, the SignalFx exporter has a [set of metrics excluded by default](./internal/translation/default_metrics.go). Some exclusion rules use regex to exclude multiple metric names. Some metrics are only excluded if specific resource labels (dimensions) are present. If the default translation rules are enabled and match an exclusion rule, the exclusion takes precedence. Users may configure the SignalFx exporter's `include_metrics` config option to override the any of the default exclusions, as `include_metrics` will always take precedence over any exclusions. An example of `include_metrics` is shown below.
183
183
184
184
```
185
185
exporters:
@@ -205,25 +205,9 @@ exporters:
205
205
206
206
## Translation Rules and Metric Transformations
207
207
208
-
The `translation_rules` metrics configuration field accepts a list of metric-transforming actions to
209
-
help ensure compatibility with custom charts and dashboards when using the OpenTelemetry Collector. It also provides the ability to produce custom metrics by copying, calculating new, or aggregating other metric values without requiring an additional processor.
210
-
The rule language is expressed in yaml mappings and is [documented here](./internal/translation/translator.go). Translation rules currently allow the following actions:
211
-
212
-
* `aggregate_metric` - Aggregates a metric through removal of specified dimensions
213
-
* `calculate_new_metric` - Creates a new metric via operating on two constituent ones
214
-
* `convert_values` - Convert float values to int or int to float for specified metric names
215
-
* `copy_metrics` - Creates a new metric as a copy of another
216
-
* `delta_metric` - Creates a new delta metric for a specified non-delta one
217
-
* `divide_int` - Scales a metric's integer value by a given factor
218
-
* `drop_dimensions` - Drops dimensions for specified metrics, or globally
219
-
* `drop_metrics` - Drops all metrics with a given name
220
-
* `multiply_float` - Scales a metric's float value by a given float factor
221
-
* `multiply_int` - Scales a metric's int value by a given int factor
222
-
* `rename_dimension_keys` - Renames dimensions for specified metrics, or globally
223
-
* `rename_metrics` - Replaces a given metric name with specified one
224
-
* `split_metric` - Splits a given metric into multiple new ones for a specified dimension
225
-
226
-
The translation rules defined in [`translation/constants.go`](./internal/translation/constants.go) are used by default for this value. The default rules will create the following aggregated metrics from the [`hostmetrics` receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/hostmetricsreceiver/README.md):
208
+
The default translation rules defined in [`translation/constants.go`](./internal/translation/constants.go) are used by the SignalFx exporter
209
+
to help ensure compatibility with custom charts and dashboards when using the OpenTelemetry Collector.
210
+
The default rules will create the following aggregated metrics from the [`hostmetrics` receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/hostmetricsreceiver/README.md):
227
211
228
212
* cpu.idle
229
213
* cpu.interrupt
@@ -264,7 +248,7 @@ The CPU number is assigned to the dimension `cpu`
264
248
* cpu.user
265
249
* cpu.wait
266
250
267
-
These metrics are intended to be reported directly to Splunk IM by the SignalFx exporter. Any desired changes to their attributes or values should be made via additional translation rules or from their constituent host metrics.
251
+
These metrics are intended to be reported directly to Splunk IM by the SignalFx exporter. Any desired changes to their attributes or values should be made via their constituent host metrics.
// Previous way to disable default translation rules.
157
-
iflen(cfg.TranslationRules) ==0 {
158
-
logger.Warn("You are using the deprecated `translation_rules` option that will be removed soon; Use `disable_default_translation_rules` to disable the default rules in a gateway mode.")
159
-
rules= []translation.Rule{}
160
-
} else {
161
-
logger.Warn("You are using the deprecated `translation_rules` option that will be removed soon; Use metricstransform processor instead.")
| aggregate_metric |`transform` processor's `aggregate_on_attributes` function with the `metric` context |[aggregate example](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/transformprocessor#aggregate_on_attributes)|
| delta_metric | `cumulativetodelta` processor. To preserve original metrics, first copy the original metric, then use the copied metric in the `cumulativetodelta` processor | [specify which metrics to convert example](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/cumulativetodeltaprocessor#examples)
23
+
| drop_dimensions |`transform` processor's `delete_keys` function with the `datapoint` context |[simple example](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/ottl/ottlfuncs#delete_key), use a `where` clause with the given example to filter based upon the metric name or dimension value |
24
+
| drop_metrics |`filter` processor |[drop by name and value example](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/filterprocessor#dropping-specific-metric-and-value)|
| split_metric |`metricstransform` processor's `insert` functionality and `filter` processor | Refer to the replacement guidance for the `copy_metrics` and `drop_metrics` translation rules |
0 commit comments