Skip to content
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

asyncpg: Use only the first word from query as a span name #1324

Merged
merged 5 commits into from
Sep 30, 2022

Conversation

krnr
Copy link
Contributor

@krnr krnr commented Sep 11, 2022

Description

to reduce high cardinal value for a span name in the DB instrumentation use only the first word from the query.

Other DB instrumentations (e.g. psycopg2) do likewise.

Fixes #1170

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

tested locally with a simple endpoint which selects data from a local db

before:
image
after:
image

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@krnr krnr requested a review from a team as a code owner September 11, 2022 11:05
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 11, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
@srikanthccv srikanthccv merged commit f349e38 into open-telemetry:main Sep 30, 2022
saartochner-lumigo pushed a commit to lumigo-io/opentelemetry-python-contrib that referenced this pull request Nov 13, 2022
saartochner-lumigo pushed a commit to lumigo-io/opentelemetry-python-contrib that referenced this pull request Nov 13, 2022
saartochner-lumigo pushed a commit to lumigo-io/opentelemetry-python-contrib that referenced this pull request Nov 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AsyncPG Instrumentation Span Names are too long when using query string
2 participants