open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
850 stars 403 forks source link

[SEMANTIC CONVENTIONS] Rework on semantic conventions 1.25.0 #2640

Closed marcalff closed 5 months ago

marcalff commented 5 months ago

Fixes # (issue)

Changes

Please provide a brief description of the changes here.

This fix is a follow up on #2633.

Context:

When generating resource semantic conventions, the code generation does not fail when a unknown reference to service.name is found, which seems a bug for build tools, and the semantic convention opentelemetry::sdk::resource::SemanticConventions::kServiceName is not generated.

This causes a breaking change for instrumented applications.

Changes:

This fix changes the command used to generate resource semantic conventions, to use resource,attribute_group instead of resource, so that attributes groups definitions are available to the code generation.

When invoking the code generator with resource,attribute_group, the symbol opentelemetry::sdk::resource::SemanticConventions::kServiceName is generated.

With this fix, instrumented application code is unchanged (previous changes using trace::SemanticConventions::kServiceName as a work around have been reverted)

For significant contributions please make sure you have completed the following items: