Skip to content

AsyncPG Instrumentation Span Names are too long when using query string #1170

@theelderbeever

Description

@theelderbeever

Is your feature request related to a problem?
Not a problem per se however, the asyncpg instrumentation uses sets span names as the query string which results in some very messing looking trace names in jaeger, datadog, etc and outright doesn't work with promscale due to long queries exhaust the available bytes for btree indexes.

Describe the solution you'd like

  • The ability to change the name of the span with a hook or something similar. The httpx instrumentation provides hooks that receive the span and the name can be updated there.
  • Just use a shorter or truncated version of the query as the name.

Which alternative solutions or features have you considered?
Not using the asyncpg instrumentation and manually instrumenting specific queries.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions