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

Add documentation requirement for adding attributes at span creation #2383

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ release.
- Introduce the concept of Instrumentation Scope to replace/extend Instrumentation
Library. The Tracer is now associated with Instrumentation Scope
([#2276](https://github.com/open-telemetry/opentelemetry-specification/pull/2276)).
- Add documentation REQUIREMENT for adding attributes at span creation.
pyohannes marked this conversation as resolved.
Show resolved Hide resolved
([#2383](https://github.com/open-telemetry/opentelemetry-specification/pull/2383)).

### Metrics

Expand Down
5 changes: 3 additions & 2 deletions specification/trace/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,9 @@ The API MUST accept the following parameters:
description](sdk.md#sampling). An empty collection will be assumed if
not specified.

Whenever possible, users SHOULD set any already known attributes at span creation
instead of calling `SetAttribute` later.
The API documentation MUST state that adding attributes at span creation is preferred
to calling `SetAttribute` later, as samplers can only consider information
already present during span creation.

- `Link`s - an ordered sequence of Links, see API definition [here](#specifying-links).
- `Start timestamp`, default to current time. This argument SHOULD only be set
Expand Down