-
Notifications
You must be signed in to change notification settings - Fork 118
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
Support custom database label for sql.db tracing #231
Comments
Hi @cgstag , Thanks for opening this issue. We are looking into this issue to see what could be the best way to address this issue. Meanwhile if you have any ideas please post here so that we can also discuss that. Thank you for the patience! |
Hello @bhautikpip , has this topic been discussed internally ? I tried to play around DSN parameters but not only is it dependant on the drivers used, it also can mess up the parsing altogether, so I think its a no go. |
Hi @cgstag , I agree with you. |
Right now, when using
xray.SQLContext(driver,DSN)
, in order to open a DB connection with tracing, the DSN is parsed and the dbname of the DSN is used to inject into the Capture function, used under the hood to trace the calls.Exemple in the QueryContext method :
However, in the case where two Databases hold the same dbname, but are different databases with different DSN (different host, different tables...) XRay will think it is the same database in the service map.
It would be really helpful to be able to set a custom label (that can default to attr.dbname).
I can contribute to make that feature happen, but I really dont know what is the best way to achieve this.
The text was updated successfully, but these errors were encountered: