Summary
Several async Cloud Storage tracing implementations currently record span events with the hardcoded string literals /*sc::kRpcMessageType=*/"rpc.message.type" and /*sc::kRpcMessageId=*/"rpc.message.id".
In OpenTelemetry Semantic Conventions v1.40.0 (introduced in opentelemetry-cpp v1.26.0 in <opentelemetry/semconv/incubating/rpc_attributes.h>), opentelemetry::semconv::rpc::kRpcMessageType and opentelemetry::semconv::rpc::kRpcMessageId were marked OPENTELEMETRY_DEPRECATED with:
"reason": "obsoleted"
"note": "Deprecated, no replacement at this time."
Because these semantic convention attributes are obsolete upstream with no replacement, we should remove or clean up our usage of "rpc.message.type" and "rpc.message.id" in google/cloud/storage/internal/async/.
Background
- These attributes were originally added/updated as string literals in:
- Unlike other
/*sc::...=*/ string literals across the codebase, we intentionally did not migrate these to opentelemetry::semconv::rpc::kRpcMessageType / kRpcMessageId because doing so triggers -Wdeprecated-declarations compiler warnings when building against opentelemetry-cpp >= 1.26.0.
Affected Files
google/cloud/storage/internal/async/object_descriptor_reader_tracing.cc
google/cloud/storage/internal/async/reader_connection_tracing.cc
google/cloud/storage/internal/async/reader_connection_tracing_test.cc
google/cloud/storage/internal/async/writer_connection_tracing.cc
google/cloud/storage/internal/async/writer_connection_tracing_test.cc
Summary
Several async Cloud Storage tracing implementations currently record span events with the hardcoded string literals
/*sc::kRpcMessageType=*/"rpc.message.type"and/*sc::kRpcMessageId=*/"rpc.message.id".In OpenTelemetry Semantic Conventions
v1.40.0(introduced inopentelemetry-cppv1.26.0in<opentelemetry/semconv/incubating/rpc_attributes.h>),opentelemetry::semconv::rpc::kRpcMessageTypeandopentelemetry::semconv::rpc::kRpcMessageIdwere markedOPENTELEMETRY_DEPRECATEDwith:"reason": "obsoleted""note": "Deprecated, no replacement at this time."Because these semantic convention attributes are obsolete upstream with no replacement, we should remove or clean up our usage of
"rpc.message.type"and"rpc.message.id"ingoogle/cloud/storage/internal/async/.Background
chore(otel): use newer messaging semantic conventions)feat(storage): Add bidiread and bidi appendable write to the async client.)fix(storage): Add telemetry tracing support for async stream Close())/*sc::...=*/string literals across the codebase, we intentionally did not migrate these toopentelemetry::semconv::rpc::kRpcMessageType/kRpcMessageIdbecause doing so triggers-Wdeprecated-declarationscompiler warnings when building againstopentelemetry-cpp >= 1.26.0.Affected Files
google/cloud/storage/internal/async/object_descriptor_reader_tracing.ccgoogle/cloud/storage/internal/async/reader_connection_tracing.ccgoogle/cloud/storage/internal/async/reader_connection_tracing_test.ccgoogle/cloud/storage/internal/async/writer_connection_tracing.ccgoogle/cloud/storage/internal/async/writer_connection_tracing_test.cc