Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter/signalfx] Remove deprecated translation_rules configuration option #35332

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

crobert-1
Copy link
Member

@crobert-1 crobert-1 commented Sep 20, 2024

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.

exporter/signalfxexporter/config.go Show resolved Hide resolved

var defaultTranslationRules = func() []translation.Rule {
cfg, err := loadConfig([]byte(translation.DefaultTranslationRulesYaml))
var data map[string]any
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New functionality here is essentially copied from loadConfig. loadConfig takes YAML and parses it into the main Config object, but this function only cares about the now deleted translation_rules option, so it can't parse the YAML into a Config object anymore.

@crobert-1
Copy link
Member Author

Putting this on hold to properly replace the calculate_new_metric translation rule.

@crobert-1 crobert-1 closed this Sep 25, 2024
@crobert-1
Copy link
Member Author

Putting this on hold to properly replace the calculate_new_metric translation rule.

Picking this back up as the metricsgeneration processor's functionality has been enhanced to properly replace the given rule.

@crobert-1 crobert-1 reopened this Jan 9, 2025
@crobert-1 crobert-1 marked this pull request as draft January 9, 2025 19:39
@crobert-1 crobert-1 force-pushed the signalfx_exporter_remove_translation_rules branch from 8beba1c to f81ef77 Compare January 9, 2025 19:52
Copy link

codecov bot commented Jan 9, 2025

Codecov Report

Attention: Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.

Project coverage is 79.60%. Comparing base (765ddb7) to head (a2cc68e).

Files with missing lines Patch % Lines
exporter/signalfxexporter/config.go 66.66% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #35332      +/-   ##
==========================================
- Coverage   79.61%   79.60%   -0.01%     
==========================================
  Files        2252     2252              
  Lines      211894   211892       -2     
==========================================
- Hits       168694   168680      -14     
- Misses      37531    37542      +11     
- Partials     5669     5670       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@crobert-1 crobert-1 force-pushed the signalfx_exporter_remove_translation_rules branch from a2cc68e to 11e5523 Compare January 9, 2025 23:16
| -----------------|--------------------|----------------------|
| rename_dimension_keys | `metricstransform` processor's update label function | [one metric](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor#rename-labels), [multiple metrics](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor#rename-labels-for-multiple-metrics) |
| rename_metrics | `metricstransform` processor's rename metric functionality | [one metric](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor#rename-metric), [multiple metrics](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor#rename-multiple-metrics-using-substitution) |
| multiply_int, divide_int, multiply_float | `metricstransform` processor's `scale` value functionality | [one metric](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor#scale-value) |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The metricsgeneration processor could also be used here. I chose metricstransform processor instead as we're recommending it for so many other options.

@crobert-1 crobert-1 force-pushed the signalfx_exporter_remove_translation_rules branch from 6e769ad to 0efbf1f Compare February 6, 2025 00:20
@crobert-1 crobert-1 marked this pull request as ready for review February 6, 2025 00:25
@crobert-1
Copy link
Member Author

I've filed #37756 for the failing k8s cluster e2e test, unrelated to this change.

@crobert-1
Copy link
Member Author

Link checker will fail until this is merged, as the changelog is linking to a doc that is being added in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants