OTel "service.*" resource labels are not exported to Google Cloud Monitoring #14823
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Does this issue affect the google-cloud-cpp project? If the problem is with
the Google Cloud service exposed by the
google-cloud-cpp
libraries instead ofthe client libraries themselves, you may consider opening a support request
instead. The
google-cloud-cpp
developers cannot help you troubleshoot problemswith the service itself.
Yes
What component of
google-cloud-cpp
is this related to? For example, isthis related to bigtable (i.e., something in
google/cloud/bigtable
), or GCS(i.e., something in
google/cloud/storage
)?opentelemetry
Describe the bug A clear and concise description of what the bug is.
In opentelemetry-operations-go, the exporter copies OTel resource labels
service.name
,service.namespace
andservice.instance.id
into metric labelsservice_name
,service_namespace
, andservice_instance_id
respectively [1].In google-cloud-cpp, the same logic is not implemented and
MonitoredResourceProvider
does not specifically allow these "service.*" resource labels to be exported [2] [3].We should implement opentelemetry-operations-go's logic [4] [5] in google-cloud-cpp so that OTel "service.*" resource labels are exported to Google Cloud Monitoring by copying them into metric labels.
To Reproduce Steps to reproduce the behavior:
MeterProvider
, withMeterContext
containing:opentelemetry::sdk::resource::SemanticConventions::kServiceName
opentelemetry::sdk::resource::SemanticConventions::kServiceNamespace
opentelemetry::sdk::resource::SemanticConventions::kServiceInstanceId
in its setup
Resource
.Instrument
created by thisMeterProvider
.Expected behavior A clear and concise description of what you expected to
happen.
Exported metrics contain all resource labels specified above.
Operating system: If you are using a Linux distribution please include the
name and version of the distribution too.
Linux example.com 6.9.10-1rodete5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.9.10-1rodete5 (2024-09-04) x86_64 GNU/Linux
What compiler and version are you using? Please include the output of
g++ -v
orclang++ -v
or the equivalent command-line flag.What version of
google-cloud-cpp
are you using? Please include the outputfrom
git rev-parse HEAD
if you are compiling from source, or the versionnumber from the applicable
google/cloud/*/version.h
file.6.30.0
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: