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

Clarification needed for IsRecording section of trace API #1507

Closed
MrAlias opened this issue Mar 5, 2021 · 0 comments
Closed

Clarification needed for IsRecording section of trace API #1507

MrAlias opened this issue Mar 5, 2021 · 0 comments
Labels
area:api Cross language API specification issue spec:trace Related to the specification/trace directory

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Mar 5, 2021

The IsRecording section of the Span operations contains the following two paragraphs:

This flag SHOULD be used to avoid expensive computations of a Span attributes or events in case when a Span is definitely not recorded. Note that any child span's recording is determined independently from the value of this flag (typically based on the sampled flag of a TraceFlag on SpanContext).

This flag may be true despite the entire trace being sampled out. This allows to record and process information about the individual Span without sending it to the backend. An example of this scenario may be recording and processing of all incoming requests for the processing and building of SLA/SLO latency charts while sending only a subset - sampled spans - to the backend. See also the sampling section of SDK design.

The subject of these two paragraphs is a flag which has not been introduced in previous paragraphs of the section. To further complicate the situation, this idea of recording is often associated (sometimes erroneously) with the idea of sampling which is a concept that is tracked by flags. This makes this section of the specification difficult for those without the context of the author to understand.

My guess at the original intent is that the flag referred to here is actually just the returned value of the method. These paragraphs were introduced in [this PR]. It looks like that PR removed the old first sentence of the section:

Returns the flag whether this span will be recorded.

and replaced it with a sentence not mentioning the returned value should be called a flag. Though I would appreciate help from @SergeyKanzhelev to confirm or correct this.

Once an understood meaning of these sections is reached the specification needs to be updated to clarify this language.

@MrAlias MrAlias added the spec:trace Related to the specification/trace directory label Mar 5, 2021
@arminru arminru added the area:api Cross language API specification issue label Mar 8, 2021
@MrAlias MrAlias closed this as not planned Won't fix, can't repro, duplicate, stale Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:api Cross language API specification issue spec:trace Related to the specification/trace directory
Projects
None yet
Development

No branches or pull requests

2 participants