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

OTel "service.*" resource labels are not exported to Google Cloud Monitoring #14823

Open
IcySteam opened this issue Nov 5, 2024 · 0 comments · May be fixed by #14825
Open

OTel "service.*" resource labels are not exported to Google Cloud Monitoring #14823

IcySteam opened this issue Nov 5, 2024 · 0 comments · May be fixed by #14825
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.

Comments

@IcySteam
Copy link

IcySteam commented Nov 5, 2024

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:

  1. Set up a MeterProvider, with MeterContext containing:
  • opentelemetry::sdk::resource::SemanticConventions::kServiceName

  • opentelemetry::sdk::resource::SemanticConventions::kServiceNamespace

  • opentelemetry::sdk::resource::SemanticConventions::kServiceInstanceId

    in its setup Resource.

  1. Export some metrics to Google Cloud Monitoring using an Instrument created by this MeterProvider.
  2. 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.

@IcySteam IcySteam added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 5, 2024
@IcySteam IcySteam changed the title OTel "service.*" Resource labels are not exported to Google Cloud Monitoring OTel "service.*" resource labels are not exported to Google Cloud Monitoring Nov 5, 2024
@dbolduc dbolduc added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants