-
Notifications
You must be signed in to change notification settings - Fork 612
Description
What happened?
When using the SdkLoggerProvider::logger_with_scope API to use an InstrumentationScope with attributes, these attributes are discarded when building the log export body via OtlpHttpClient::build_logs_export_body
More precisely, group_logs_by_resource_and_scope call of opentelemetry_proto::transform::common::tonic::InstrumentationScope::from is called with Some in the second position of the tuple, which causes InstrumentationScope::from to use an empty vector for it's attributes.
This differs for example from the behaviour of group_spans_by_resource_and_scope which uses None when creating the InstrumentationScope, causing scope attributes to be retained as expected.
OpenTelemetry API Version (i.e version of opentelemetry crate)
0.31.0
OpenTelemetry SDK Version (i.e version of opentelemetry_sdk crate)
0.31.0
What Exporter(s) are you seeing the problem on?
OTLP
Relevant log output
Tip
React with π to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.