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

semantic convention marker: stability #35

Closed
anuraaga opened this issue Mar 17, 2021 · 8 comments · Fixed by #43
Closed

semantic convention marker: stability #35

anuraaga opened this issue Mar 17, 2021 · 8 comments · Fixed by #43
Labels
semconv/model Related to the data model or YAML format of the semantic convention generator semconv Related to the semantic convention generator.

Comments

@anuraaga
Copy link

From open-telemetry/opentelemetry-specification#1497 (comment) there are cases we may want to stabilize a subset of attributes in a given category. It would be nice if we can just mark attributes as stable so the generator handles this for us. This is less important for MD generation and more for code, where stable attributes will need to be rendered differently (different packages for example).

@anuraaga
Copy link
Author

@thisthat Filed an issue for it :)

@Oberon00
Copy link
Member

Can the tag-mechanism be extended for that? E.g. if we allow multiple tags, we can just designate certain tags (stable, experimental?) for that use case.

@anuraaga
Copy link
Author

TBH despite me maintaining this repo, I haven't looked into the details on how the Java generator works :P

https://github.com/open-telemetry/opentelemetry-java/blob/main/buildscripts/semantic-convention/templates/SemanticAttributes.java.j2

If the attributes processed by that template can be filtered by tag, then that would work fine I think. I guess it might still need a change, adding has_tag method around here?

@Oberon00
Copy link
Member

The generator would need to be updated anyway, as currently it allows only a single tag. has_tag might be useful too, although Jinja is basically a fully-fledged Python dialect and probably already has a contains method or "in" operator you could call on any exposed list attribute.

Maybe special support for stability declarations is warranted though. We could then e.g. declare a full group as stable and only mark certain attributes as experimental or vice-versa. Tags are not (yet) supported for groups.

@thisthat
Copy link
Member

thisthat commented Apr 7, 2021

Given the special use case of this "tag", I would suggest adding it as its own field in the YAML definition.

@Oberon00 Oberon00 added semconv Related to the semantic convention generator. semconv/model Related to the data model or YAML format of the semantic convention generator labels Apr 7, 2021
@thisthat
Copy link
Member

thisthat commented Apr 8, 2021

Discussing this with @Oberon00, we come up with changing the deprecated attribute to stability: deprecated|experimental|stable, where stable is the default one.
WDYT @anuraaga?

@anuraaga
Copy link
Author

anuraaga commented Apr 9, 2021

Sounds good, thanks!

@Oberon00
Copy link
Member

Oberon00 commented Apr 9, 2021

Hmm, on the other hand, maybe we should keep deprecated separate after all. If we deprecate an attribute that was never stable, it would be different from deprecating a formerly stable attribute. Except if we say we have a strict policy of immediately removing experimental attributes worth deprecating. But given the wide use of our "experimental" semantic conventions, I'm not sure that works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semconv/model Related to the data model or YAML format of the semantic convention generator semconv Related to the semantic convention generator.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants