opentelemetry-dotnet-contrib
opentelemetry-dotnet-contrib copied to clipboard
Redis attributes not aligned with latest semantic conventions
Component
OpenTelemetry.Instrumentation.StackExchangeRedis
Package Version
Microsoft.Extensions.Hosting 8.0.0 OpenTelemetry 1.9.0 OpenTelemetry.Api 1.9.0 OpenTelemetry.Exporter.OpenTelemetryProtocol 1.9.0 OpenTelemetry.Extensions.Hosting 1.9.0 StackExchange.Redis 2.8.16
Runtime Version
net8.0
Description
Hello,
I have recently been working on a project that required Redis instrumentation for two different languages. During this process, I noticed some discrepancies in the attributes being collected. To investigate further, I conducted testing to check the attributes collected for Redis instrumentation across six of the most popular languages. I have documented my testing in this GitHub repository:
Findings for .NET
For .NET, the attributes currently being captured are as follows:
What We Capture Today ==> How It Should Look in Latest Semantic Conventions
db.system: redis ==> db.system: redis db.redis.flags: DemandMaster ==> (Custom attribute, not part of standard) db.statement: SET ==> db.query.text: SET net.peer.name: localhost ==> network.peer.name: localhost net.peer.port: 6379 ==> network.peer.port: 6379 db.redis.database_index: 0 ==> db.namespace: "0"
The latest OpenTelemetry semantic conventions for Redis can be found here: OpenTelemetry Semantic Conventions for Redis
Steps to Reproduce
(https://opentelemetry.io/docs/specs/semconv/database/redis/)](https://github.com/luke6Lh43/otel-redis-testing?tab=readme-ov-file#net)
Expected Result
N/A
Actual Result
N/A
Additional Context
I can see there is PR opened by @tiagodaraujo. Not sure if these addresses my findings:
https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/1982