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

Provide guidelines for low-cardinality span names #416

Merged
merged 5 commits into from
Jan 24, 2020

Conversation

yurishkuro
Copy link
Member

Resolves #270

| ----------------- | ------------ |
| `get` | Too general |
| `get_account/42` | Too specific |
| `get_account` | Good, and account_id=42 would make a nice Span attribute |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you do in the case that you have the url, but don't know which part of it is an id or dynamic?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then you can't use it. It's covered in the 2nd file.

unless another value that represents the identity of the request and has a lower cardinality can be identified
(e.g. the route for server spans; see below).
HTTP spans MUST follow the overall [guidelines for span names](./api-tracing.md#span).
Many REST APIs encode parameters into URI path, e.g. `/api/users/123` where `123`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make a more specific recommendation. E.g. using one of the formats "HTTP {METHOD-NAME}" or "{METHOD-NAME} {HOST-NAME}" sounds reasonable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method is already suggested in the following sentences, I can change to use the exact pattern.

Host name is not acceptable. If clients are directly integrated with service discovery, then host name may be very high cardinality.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but I would make it more clear that this not merely a suggestion but actually what should be used (in absence of a better option like endpoint name, route, ...). And I would definitely prescribe an exact (fallback) format, because that would allow grouping HTTP requests from different languages together on the back end.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added exact recommendation in L34, but I don't know how strongly prescriptive we want to be.

@yurishkuro
Copy link
Member Author

cc @open-telemetry/specs-approvers

@carlosalberto carlosalberto merged commit e577397 into open-telemetry:master Jan 24, 2020
jtescher added a commit to open-telemetry/opentelemetry-rust that referenced this pull request Feb 4, 2020
This patch moves the B3 and trace context propagators into the api/trace
module and renames the distributed context module to `propagation`.

It also incorporates the doc changes from open-telemetry/opentelemetry-specification#416
SergeyKanzhelev pushed a commit to SergeyKanzhelev/opentelemetry-specification that referenced this pull request Feb 18, 2020
Monkeyanator pushed a commit to Monkeyanator/opentelemetry-rust that referenced this pull request Mar 3, 2020
This patch moves the B3 and trace context propagators into the api/trace
module and renames the distributed context module to `propagation`.

It also incorporates the doc changes from open-telemetry/opentelemetry-specification#416
Gmanboy added a commit to Gmanboy/opentelemetry-rust that referenced this pull request Aug 12, 2024
This patch moves the B3 and trace context propagators into the api/trace
module and renames the distributed context module to `propagation`.

It also incorporates the doc changes from open-telemetry/opentelemetry-specification#416
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
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.

Do not recommend URL path as acceptable span name
7 participants