Skip to content

Recommeded resource attributes #3797

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

Merged

Conversation

zeitlinger
Copy link
Member

@zeitlinger zeitlinger commented Mar 12, 2025

Description:

Updates the recommended resource attributes to comply with the semantic conventions.

https://github.com/open-telemetry/semantic-conventions/blob/main/docs/non-normative/k8s-attributes.md

Technically, it's a breaking change - looking for feedback if it's OK to change as is.

Link to tracking Issue(s):

Testing:

Adapted existing tests.

Documentation:

Adapted existing docs.

@zeitlinger zeitlinger requested a review from a team as a code owner March 12, 2025 15:59
Copy link
Contributor

@iblancasa iblancasa left a comment

Choose a reason for hiding this comment

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

LGTM. Please fix the CI

@swiatekm swiatekm added the discuss-at-sig This issue or PR should be discussed at the next SIG meeting label Mar 13, 2025
@zeitlinger zeitlinger force-pushed the recommedded-resource-attributes branch from 5103776 to b41b9da Compare March 13, 2025 14:11
@iblancasa iblancasa removed the discuss-at-sig This issue or PR should be discussed at the next SIG meeting label Mar 13, 2025
@iblancasa iblancasa self-requested a review March 13, 2025 17:13
Copy link
Contributor

@iblancasa iblancasa left a comment

Choose a reason for hiding this comment

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

We discussed about this PR during the SIG call. Some comments:

  1. Could you add a feature gate to avoid the breaking change right now and give some time to users to upgrade?
  2. Are the semantic convention changes already released?
  3. Is there something we can do to avoid the breaking change?

component: auto-instrumentation

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Update recommended resource attributes to match the [semantic conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/non-normative/k8s-attributes.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add more info about the exact changes that need to be done for the operator.

Also, provide some kind of recommendation regarding upgrading.

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 subtext has all changes - is that sufficient?

The subtext should also cover what you need to consider for upgrading.

@zeitlinger
Copy link
Member Author

We discussed about this PR during the SIG call. Some comments:

  1. Could you add a feature gate to avoid the breaking change right now and give some time to users to upgrade?

yes, we could - but I'm not sure if that's really warranted in this case:

  1. the exact format of the version is unlikely to affect anyone
  2. the well-known labels need an extra opt-in already

See

https://github.com/open-telemetry/opentelemetry-operator/pull/3797/files#diff-5fd4df0f3bace6e5f00b361ea2060d8ddf95cf8136445af1a530c2b81afe2c2bR17-R21

Having said that, I'm happy to add a flag if we decide to do so

  1. Are the semantic convention changes already released?

yes, see https://github.com/open-telemetry/semantic-conventions/blob/main/docs/non-normative/k8s-attributes.md

  1. Is there something we can do to avoid the breaking change?

we could add a different flag for the well-known attributes and deprecate the old flag
that would only leave the version format - which is less likely to affect anyone

@zeitlinger
Copy link
Member Author

@iblancasa please check again

@zeitlinger
Copy link
Member Author

just found a missing piece: k8s.namespace.name should also be translated to service.namespace

@zeitlinger zeitlinger force-pushed the recommedded-resource-attributes branch from 503c19a to 8d35a59 Compare March 18, 2025 12:57
@zeitlinger
Copy link
Member Author

@iblancasa now it should be complete 😄

Copy link
Contributor

@swiatekm swiatekm left a comment

Choose a reason for hiding this comment

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

I am ok with this going in without a feature flag, but I'd like opinions from other maintainers before we merge.

@iblancasa
Copy link
Contributor

I am ok with this going in without a feature flag, but I'd like opinions from other maintainers before we merge.

I thing we should include this using a feature gate to give users some time to migrate. But not strong opinion.

@swiatekm
Copy link
Contributor

I am ok with this going in without a feature flag, but I'd like opinions from other maintainers before we merge.

I thing we should include this using a feature gate to give users some time to migrate. But not strong opinion.

Rather than a feature gate, I think I'd prefer some instructions on how to get the old behaviour by changing resource labels.

@zeitlinger
Copy link
Member Author

I am ok with this going in without a feature flag, but I'd like opinions from other maintainers before we merge.

I thing we should include this using a feature gate to give users some time to migrate. But not strong opinion.

Rather than a feature gate, I think I'd prefer some instructions on how to get the old behaviour by changing resource labels.

I've added a section in the changelog

@zeitlinger
Copy link
Member Author

@iblancasa @swiatekm please check again

Copy link
Contributor

@jaronoff97 jaronoff97 left a comment

Choose a reason for hiding this comment

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

looks great, thanks for your work here @zeitlinger !

@swiatekm swiatekm merged commit de23d08 into open-telemetry:main Apr 5, 2025
40 checks passed
@zeitlinger zeitlinger deleted the recommedded-resource-attributes branch April 7, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants