-
Notifications
You must be signed in to change notification settings - Fork 501
Description
Describe your environment
main branch at 150256c1720b279a1dfc7c380d17e13e90cee15d
$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Build configuration.
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DWITH_OTLP_GRPC=ON \
-DWITH_ABI_VERSION_2=ON \
-DWITH_ABI_VERSION_1=OFF \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DWITH_METRICS_EXEMPLAR_PREVIEW=ON \
-DWITH_OTLP_GRPC_SSL_MTLS_PREVIEW=ON \
-DWITH_OTLP_FILE=ON \
-DWITH_EXAMPLES=ON \
-DWITH_BENCHMARK=OFF \
-DOPENTELEMETRY_INSTALL=ON ..
Steps to reproduce
- Create a Meter Provider or Tracer Provider with the OTLP grpc exporter.
- Create a tracer or meter with instrumentation scope attributes
auto tracer = provider->GetTracer("my_scope_name", "my_scope_version", "my_scope_schema_url", {{"scope_key", "scope_value"}});
auto meter = provider->GetMeter("my_scope_name", "my_scope_version", "my_scope_schema_url", {{"scope_key", "scope_value"}});
- Receive the OTLP telemetry data with an otel-collector configured with the debug exporter.
- The instrumentation scope level attributes are not observed in the collector's debug output.
What is the expected behavior?
The OTLP debug output from the otel-collector should include the instrumentation scope attribute ("scope_key", "scope_value").
What is the actual behavior?
The OTLP debug output does not include the instrumentation scope attributes.
Additional context
Code to set the Instrumentation Scope attributes for logs can be found at otlp_recordable_utils.cc#L173. The debug output from the otel-collector confirms these attributes are included in the otlp message for logs.
Code to set the Instrumentation Scope attributes to the proto::common::v1::InstrumentationScope
message is missing for metrics (otlp_metric_utils.cc#L252) and traces (otlp_recordable_utils.cc#L107. ):