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

remove warnings for trace.UpdateName #506

Closed
Show file tree
Hide file tree
Changes from all 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
10 changes: 0 additions & 10 deletions specification/api-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,21 +456,11 @@ The Span interface MUST provide:
Updates the `Span` name. Upon this update, any sampling behavior based on `Span`
name will depend on the implementation.

It is highly discouraged to update the name of a `Span` after its creation.
`Span` name is often used to group, filter and identify the logical groups of
spans. And often, filtering logic will be implemented before the `Span` creation
for performance reasons. Thus the name update may interfere with this logic.

The function name is called `UpdateName` to differentiate this function from the
regular property setter. It emphasizes that this operation signifies a major
change for a `Span` and may lead to re-calculation of sampling or filtering
decisions made previously depending on the implementation.

Alternatives for the name update may be late `Span` creation, when Span is
started with the explicit timestamp from the past at the moment where the final
`Span` name is known, or reporting a `Span` with the desired name as a child
`Span`.

Required parameters:

- The new **span name**, which supersedes whatever was passed in when the
Expand Down
6 changes: 6 additions & 0 deletions specification/sdk-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,12 @@ These are the default samplers implemented in the OpenTelemetry SDK:
should be configuration to change this to "root spans only", or "all spans".
* Description MUST be `ProbabilitySampler{0.000100}`.

#### Sampler Design Considerations

Sampling algorithms should consider the fact that many attributes of the span
Copy link
Member

Choose a reason for hiding this comment

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

What does "consider" mean here? I don't think samplers can sensibly do anything about this. I think we should rather write for SetAttribute and UpdateName (I think we have something like that in the span creation API spec already):

Note that samplers can only consider information already set during span creation. Any changes done later cannot be considered for sampling.

are mutable after its initial creation, including span attributes and the
span name.

#### Probability Sampler algorithm

TODO: Add details about how the probability sampler is implemented as a function
Expand Down