Skip to content

Conversation

@iblancasa
Copy link
Contributor

Description

Added a new configuration field to keep the resource attributes.

Link to tracking issue

Fixes #43394

@pjanotti
Copy link
Contributor

pjanotti commented Oct 9, 2025

The introduction of the connector.spanmetrics.excludeResourceMetrics feature gate changed the default behavior by excluding resource attributes from generated metrics.

Just checking understanding where we are and the path forward. The feature gate is created but in alpha so IsEnabled() should be returning false and at this time the resource attributes are still being generated by default. This PR is introducing a opt-in configuration that will be part of the component configuration going forward. Is that really the case? If it is intended as a temporary migration aid why the feature gate is not enough? Is the worry that the feature gate stages are going to be moved too fast?

…tes in generated metrics

Signed-off-by: Israel Blancas <[email protected]>
@iblancasa
Copy link
Contributor Author

Just checking understanding where we are and the path forward. The feature gate is created but in alpha so IsEnabled() should be returning false and at this time the resource attributes are still being generated by default. This PR is introducing an opt-in configuration that will be part of the component configuration going forward. Is that really the case?

The feature gate was introduced because the default behavior will change soon. This is nice and it is a good feature, but we found that this can break many users in our side (and very likely to other vendors). I'm implementing here a way to preserve the old behavior (so the users will not be affected) while new users will benefit from the new feature.

If it is intended as a temporary migration aid why the feature gate is not enough? Is the worry that the feature gate stages are going to be moved too fast?

If you check the 0.137.0 release notes, you will see there is an intention to make the feature gate stable very soon.

@Frapschen
Copy link
Contributor

@iblancasa, Why don't we just disable the feature-gate manually?

@iblancasa
Copy link
Contributor Author

@iblancasa, Why don't we just disable the feature-gate manually?

My concern is that this will be moved from alpha to beta in just one release. Are we expecting this speed from beta to stable?

@Frapschen
Copy link
Contributor

I think it's fine to move from alpha to beta in one or two releases, but we can remain in the beta stage for a long time.

@iblancasa
Copy link
Contributor Author

iblancasa commented Oct 17, 2025

I think it's fine to move from alpha to beta in one or two releases, but we can remain in the beta stage for a long time.

I was thinking about this and think this option is still needed. There are many environments where you will not know which one are your resource attributes so, you cannot decided which ones add. The current behavior has worked well for us with those situations.

It is not just a migration path.

@Frapschen
Copy link
Contributor

@iblancasa I can understand it

@iblancasa
Copy link
Contributor Author

@open-telemetry/collector-contrib-maintainers can we merge this?

@edmocosta edmocosta added the ready to merge Code review completed; ready to merge by maintainers label Oct 21, 2025
@lukaszgryglicki
Copy link

/easycla

@edmocosta edmocosta merged commit 01b0197 into open-telemetry:main Oct 21, 2025
188 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

connector/spanmetrics ready to merge Code review completed; ready to merge by maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add add_resource_attributes config option to restore resource attributes in metrics

6 participants