-
Notifications
You must be signed in to change notification settings - Fork 433
Description
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 of
the client libraries themselves, you may consider opening a support request
instead. The google-cloud-cpp developers cannot help you troubleshoot problems
with the service itself.
Yes
What component of google-cloud-cpp is this related to? For example, is
this 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 and service.instance.id into metric labels service_name, service_namespace, and service_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:
- Set up a
MeterProvider, withMeterContextcontaining:
-
opentelemetry::sdk::resource::SemanticConventions::kServiceName -
opentelemetry::sdk::resource::SemanticConventions::kServiceNamespace -
opentelemetry::sdk::resource::SemanticConventions::kServiceInstanceIdin its setup
Resource.
- Export some metrics to Google Cloud Monitoring using an
Instrumentcreated by thisMeterProvider. - Observe that none of the exported metrics contain any resource labels specified above.
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 or clang++ -v or the equivalent command-line flag.
$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 13.2.0-13' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-13-MjTPDQ/gcc-13-13.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-13-MjTPDQ/gcc-13-13.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (Debian 13.2.0-13)
What version of google-cloud-cpp are you using? Please include the output
from git rev-parse HEAD if you are compiling from source, or the version
number from the applicable google/cloud/*/version.h file.
6.30.0
Additional context Add any other context about the problem here.