Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse trace data from SQL comments #226

Merged
merged 1 commit into from
Nov 2, 2021

Conversation

endor
Copy link
Contributor

@endor endor commented Oct 26, 2021

If we want to associate the postgreSQL log data with existing traces/parent spans, we need some way to tell which trace/parent span the log data belongs to. One way to do this is to send the trace data as part of the query inside a SQL comment, similar to what https://google.github.io/sqlcommenter/ does. This trace data is then parsed here and send on to Honeycomb.

@endor endor requested a review from a team October 26, 2021 12:06
Copy link
Member

@robbkidd robbkidd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the submission, @endor!

This looks like a good start to getting DB spans emitted from honeytail to participate in a trace. I foresee as a first step towards a future where honeytail parses the whole /* … */ sql comment according to the sqlcommenter spec to return, say, a string map with which any number of fields can be added to the event.

@robbkidd robbkidd added version: bump minor A PR that adds behavior, but is backwards-compatible. and removed status: review needed Changes need review. labels Nov 2, 2021
@robbkidd robbkidd merged commit 983d4b5 into honeycombio:main Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement version: bump minor A PR that adds behavior, but is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants