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] Deprecated semconv (in the spec) not deprecated (in C++) #2275

Closed
marcalff opened this issue Aug 23, 2023 · 0 comments · Fixed by #2285
Closed

[SEMANTIC CONVENTION] Deprecated semconv (in the spec) not deprecated (in C++) #2275

marcalff opened this issue Aug 23, 2023 · 0 comments · Fixed by #2285
Assignees
Labels
bug Something isn't working

Comments

@marcalff
Copy link
Member

Some semantic conventions are flagged as deprecated in the model.yaml file, for example net.peer.name.

When generating C++ code for it, the generated declaration is missing the @deprecated markup.

This is an issue, because code using deprecated semantic conventions goes unnoticed, as it builds without warnings.

It seems the way to represent the deprecated flag has changed in the generator tool.

The code in the opentelemetry-cpp template uses:

{%- if attribute.deprecated %}

while the same in opentelemetry-java was changed recently to

{%- if (attribute.stability | string())  == "StabilityLevel.DEPRECATED" %}

See java PR open-telemetry/opentelemetry-java#4938

@marcalff marcalff added the bug Something isn't working label Aug 23, 2023
@marcalff marcalff self-assigned this Aug 23, 2023
@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 23, 2023
marcalff added a commit to marcalff/opentelemetry-cpp that referenced this issue Aug 31, 2023
@marcalff marcalff removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant