Skip to content

[opentelemetry-php-contrib] auto PDO - add support for trace propagation through user variables #2001

Description

@joaojacome

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions