open-telemetry / open-telemetry/opentelemetry-php
[opentelemetry-php-contrib] auto PDO - add support for trace propagation through user variables
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 912
- Forks
- 232
- Avg merge
- 7d 16h
- Merged PRs (30d)
- 4
Description
The collector now has a mysqlreceiver that adds trace parents to query logs. The trace parent is propagated to MySQL through a user variable @traceparent.
Similar to SqlCommenter, but instead of a comment, the library would need to run a SET @traceparent={trace}; before the intercepted query.
The opentelemetry-auto-pdo instrumentation could handle the propagation, or a new package could be introduced that'd handle it, similar to how it was done for the SqlCommenter. It might also need some configuration/ENV variables to toggle the propagation.
What do you guys think? What would be the preferred approach?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the opentelemetry-auto-pdo instrumentation and the existing SqlCommenter approach, along with the collector's mysqlreceiver behavior. Decide whether propagation belongs in the existing instrumentation or a new package, define any configuration or environment controls, and verify that intercepted queries receive the trace parent through SET @traceparent={trace};.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100