Service attributes such as service.name are no longer defined in resources.
Instead, these attributes are defined in the registry as attribute_groups.
The resource model contains a reference to service.name defined in the registry
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:
Fixes # (issue)
Changes
Please provide a brief description of the changes here.
This fix is a follow up on #2633.
Context:
service.name
are no longer defined in resources.registry
as attribute_groups.service.name
defined in the registryWhen 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 conventionopentelemetry::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 ofresource
, so that attributes groups definitions are available to the code generation.When invoking the code generator with
resource,attribute_group
, the symbolopentelemetry::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:
CHANGELOG.md
updated for non-trivial changes