opentelemetry-php icon indicating copy to clipboard operation
opentelemetry-php copied to clipboard

Redis attributes not aligned with latest semantic conventions

Open luke6Lh43 opened this issue 1 year ago • 3 comments

Describe your environment

PHP 8.3.11 Composer 2.7.9 Slim 4.0

"open-telemetry/sdk": "^1.0" "open-telemetry/opentelemetry-auto-slim": "^1.0" "open-telemetry/opentelemetry-auto-psr18": "^1.0" "mismatch/opentelemetry-auto-redis": "^0.3.0" "open-telemetry/exporter-otlp": "^1.0"

Steps to reproduce https://github.com/luke6Lh43/otel-redis-testing/blob/main/Readme.md#php

What is the expected behavior? See below

What is the actual behavior? See below

Additional context

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:

[Link to GitHub Repo]

Findings for PHP:

What We Capture Today ==> How It Should Look in Latest Semantic Conventions

server.address: 127.0.0.1 ==> server.address: 127.0.0.1 network.transport: tcp ==> Not sure if it's needed server.port: 6379 ==> server.port: 6379 db.system: redis ==> db.system: redis db.statement: ==> db.statement: GET simple_text_message (Not captured) ==> db.redis.database_index: 0

luke6Lh43 avatar Sep 24 '24 16:09 luke6Lh43

Hello, we're aware of the problem, and it exists in various forms across most of our instrumentations. The reason for this is that we're trying to conform to the moratorium(s) in this part of the spec: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/telemetry-stability.md#schema-file-driven-telemetry-producers So, if there's a way to get these attributes into the current semconv version, I think we can do that, otherwise we're waiting for that moratorium to be lifted...

brettmc avatar Sep 25 '24 00:09 brettmc

The package "mismatch/opentelemetry-auto-redis": "^0.3.0" isn't maintained by us, so we probably need to get the creator to contribute to the opentelemetry-php-instrumentation repo and make some tweaks for it to be usable. Going to follow up with them in their repo

bobstrecansky avatar Oct 09 '24 13:10 bobstrecansky

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 05:04 stale[bot]

This issue has been automatically closed because it has not had recent activity, but it can be reopened. Thank you for your contributions.

stale[bot] avatar Jul 19 '25 05:07 stale[bot]