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

Introduce generic operation.name attribute to represent span name #1567

Open
trask opened this issue Nov 10, 2024 · 2 comments
Open

Introduce generic operation.name attribute to represent span name #1567

trask opened this issue Nov 10, 2024 · 2 comments
Assignees

Comments

@trask
Copy link
Member

trask commented Nov 10, 2024

(and rename db.operation.name to db.operation.command and replace db.query.summary with operation.name)

Introducing a generic operation.name attribute for span name would allow metrics to stamp this generally useful, low cardinality attribute onto metrics. This would also benefit span to metrics pipelines to have a standard place to put the span name.

It would also provide a way for users to override the span name using something like open-telemetry/oteps#207, which is important for SQL queries which are going to have pretty bad span names unless languages implement complex SQL parsing, and even then, they won't have great span names).

Overriding the span name has also been a highly requested feature for HTTP client spans, where the default span names are also pretty bad.

In database metrics, by replacing db.query.summary with the more generic operation.name, users would get a consistent database metric drilldown experience across both sql and nosql databases, which is currently a bit lacking because operation and collection name are typically only captured on nosql databases (see #1566).

@trask
Copy link
Member Author

trask commented Nov 22, 2024

discussed in database SIG meeting:

  • operation.name could make applying Propose Context-scoped attributes. oteps#207 more difficult since it could apply to all nested children, so may need a way to target only database client spans or only "first" nested span
    • there are other ways for users to override operation.name such as sql comments
  • generic operation.name allows us to generically not include it on spans (which would be duplicated with span name) while preserving it on metrics

@lmolkova lmolkova self-assigned this Nov 22, 2024
@trask
Copy link
Member Author

trask commented Nov 22, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants