-
Notifications
You must be signed in to change notification settings - Fork 550
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
Add custom attributes to SQLCommenter comments in pg instrumentation #1353
Labels
Comments
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
Don't close. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was closed because it has been stale for 14 days with no activity. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe
Support for attaching SQLComment comments to SQL statements handled by the
pg
module was recently added in #1286. This issue proposes adding support for custom attributes to the SQL comments, besidestracestate
andtraceparent
, which are now automatically generated by pg instrumentation (if theaddSqlCommenterCommentToQueries
config is enabled).Examples of the custom attributes (as suggested by the spec) are
action
,controller
,framework
androute
.Describe the solution you'd like to see
As suggested in #1286 (comment), one approach would be to allow the instrumentation to extract the custom attributes from the active context when a query is run (perhaps controlled by another config option). With this approach, one question that comes to mind is whether or not the attributes should be changeable from span to span.
Describe alternatives you've considered
Not using pg instrumentation to handle SQLCommenter comments, and instead appending the comments myself, where I can add whichever attributes I'd like.
Additional context
I'm creating this issue to get some thoughts on:
The text was updated successfully, but these errors were encountered: