Skip to content

Access DSN via context? #23

@tcolgate

Description

@tcolgate

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions