-
Notifications
You must be signed in to change notification settings - Fork 893
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
Fix typo #702
Fix typo #702
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related #634
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, no wait.
This is actively telling instrumentations to use the SDK. I think it is better to have this obviously wrong than subtly wrong and actively misleading. Of course, if you want to tackle #634 and make a larger overhaul of this, feel free!
@Oberon00 what is your suggestion or recommendation? |
@bogdandrutu I documented that on #634, pasted here:
In short, it is simply wrong that instrumentations interact with samplers directly. Removing the whole paragraph would be an improvement over the current state (and also over the state after this PR) IMHO. |
specification/trace/sdk.md
Outdated
@@ -18,7 +18,7 @@ OpenTelemetry by reducing the number of samples of traces collected and sent to | |||
the backend. | |||
|
|||
Sampling may be implemented on different stages of a trace collection. | |||
OpenTelemetry API defines a `Sampler` interface that can be used at | |||
The OpenTelemetry SDK defines a `Sampler` interface that can be used at | |||
instrumentation points by libraries to check the `SamplingResult` early and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still misleading I believe. Libraries should check IsRecording
and not SamplingResult
..
even out of process in Agent or Collector. | ||
Sampling may be implemented on different stages of a trace collection. The | ||
earliest sampling could happen before the trace is actually created, and the | ||
latest sampling could happen on the Collector which is out of process. | ||
|
||
The OpenTelemetry API has two properties responsible for the data collection: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these paragraphs should be in the API spec.
|
||
All other sampling algorithms may be implemented on SDK layer in exporters, or | ||
even out of process in Agent or Collector. | ||
Sampling may be implemented on different stages of a trace collection. The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is rather generic, and not really SDK related. The SDK allows sampling only in StartSpan (before OnStart is / would be called).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is rather generic, and not really SDK related. The SDK allows sampling only in StartSpan (before OnStart is / would be called).
I agree that this is very generic. We also have "Sampling is a mechanism to control the noise and overhead introduced by
OpenTelemetry by reducing the number of samples of traces collected and sent to
the backend." in the SDK spec which is also generic.
My suggestion would be keep them for now until we have a better place. I don't think API is a better place as these are very generic context not specific to API/SDK.
* fix typo * rephrase
* fix typo * rephrase
Changes
Sampler
is defined by the SDK, not API. This seems to be a leftover when we moved the sampler from API to SDK.