Skip to content

feat(database_observability): Always extract traceparent in MySQL query_samples collector#6081

Open
fridgepoet wants to merge 2 commits intomainfrom
shirley/traceparent
Open

feat(database_observability): Always extract traceparent in MySQL query_samples collector#6081
fridgepoet wants to merge 2 commits intomainfrom
shirley/traceparent

Conversation

@fridgepoet
Copy link
Copy Markdown
Contributor

@fridgepoet fridgepoet commented Apr 16, 2026

Brief description of Pull Request

The MySQL query_samples collector is changed to extract and log the traceparent from SQL_TEXT.

Pull Request Details

In an instrumented app, middleware for a DB driver/ORM like SQLCommenter can add embed trace information to each SQL statement in a comment.

If the trace information is available in the SQL statement (SQL_TEXT), this PR makes a change so that the traceparent is extracted. It is then logged under the traceparent label.

Example log:
Screenshot 2026-04-16 at 16 00 03

Issue(s) fixed by this Pull Request

Contributes to https://github.com/grafana/grafana-dbo11y-app/issues/2659

Notes to the Reviewer

Original work: #4196

PR Checklist

  • Documentation added
  • Tests updated
  • Config converters updated

@fridgepoet fridgepoet changed the title feat(database_observability): always extract traceparent in MySQL query_samples collector feat(database_observability): Always extract traceparent in MySQL query_samples collector Apr 16, 2026
@fridgepoet fridgepoet marked this pull request as ready for review April 16, 2026 21:07
@fridgepoet fridgepoet requested a review from a team as a code owner April 16, 2026 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant