You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be useful to be able to get hold of the name used in the Open call, from inside the various methods of the interceptor. One option would be to store this on the wrapped connection/connector, and then inject it into the context for retrieval from there.
Interceptors could then parse the name and use it for instrumentation of , for instance, the target db name or host.
Would you have any objections to a PR to implement this? It would mean extra calls to add the context value in every wrapped call, not expensive, but non-zero.
The text was updated successfully, but these errors were encountered:
Note: the DSN may contain sensible information that is not wise to keep (ex: DB password), and even less to diffuse through the context.
If the DSN is exposed this will increase the risk of the DSN being leaked in logs.
Note: the DSN may contain sensible information that is not wise to keep (ex: DB password), and even less to diffuse through the context. If the DSN is exposed this will increase the risk of the DSN being leaked in logs.
Obviously it is down to the user to use the DSN responsibly. They have connected to the DB so the DSN is in memory, there are innumerable other ways the DSN could be leaked. The only way to retrieve the DSN here would be to explicitly retrieve it from the context via this API (and arbitrary logging module would not have access to it).
It would be useful to be able to get hold of the name used in the Open call, from inside the various methods of the interceptor. One option would be to store this on the wrapped connection/connector, and then inject it into the context for retrieval from there.
Interceptors could then parse the name and use it for instrumentation of , for instance, the target db name or host.
Would you have any objections to a PR to implement this? It would mean extra calls to add the context value in every wrapped call, not expensive, but non-zero.
The text was updated successfully, but these errors were encountered: