Skip to content

Formalize attribute deprecation, restrict removal #740

@lmolkova

Description

@lmolkova

One of the key takeaways from #551 and similar issues on the tooling is that removing an attribute from semconv results in breaking changes for all languages.

Codegen (jinja based) does not take into account previous versions of the spec and does not generate code for removed attributes.

Given that semconv artifact is used by user applications and by different instrumentation libraries (potentially of different versions), removing an attribute leads to breaking changes that are too annoying even for unstable artifact.

The workaround SIGs implemented is to (manually) preserve removed attributes and annotate them as deprecated which created a lot of unnecessary work (and pain).

Proposal

  • Do not remove attributes, deprecate them
  • Stable -> deprecated attributes should stay till the next major semconv version (forever 🤞)
  • We can decide to remove experimental -> deprecated attributes after X versions/months
  • Add automated checks to semconv repo to prevent attribute removal

Nice-to-haves:

  • add yaml annotations like deprecated_since (and maybe to_be_removed_in )

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions