-
Notifications
You must be signed in to change notification settings - Fork 1.2k
sdk/trace: self-observability: span metrics #7027
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
Merged
Merged
Changes from 13 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
3eeba4c
add docs
pellared 5fe199b
Refine docs
pellared 2212cb2
Merge branch 'main' into span-metrics
pellared 16df7b8
Move experimental docs to x/internal
pellared e6a3029
improve docs
pellared 45aaace
update header
pellared 7c1ea5c
fix link
pellared 547a989
draft implementation
pellared bb6b8f8
add TestSelfObservabilty and fix implementation
pellared 2fd1368
Add attributes
pellared 25894d6
Add changelog entry
pellared 418297e
lint
pellared 6b33d72
Update TODO comments
pellared d9105c0
Merge branch 'main' into span-metrics
pellared 3d132c7
go mod tidy
pellared 713a3e7
Bump to semconv/v1.36.0
pellared 8cd9767
refactor initSelfObservability
pellared 6304e1d
refactor attr creation
pellared 3fa8aa5
add otel.span.parent.origin attribute
pellared 455060a
Add test cases
pellared 89d3a8d
refactor test
pellared b9d533a
Add RemoteParentSpan case
pellared 21735b7
Add LocalParentSpan test case
pellared 9975391
tidy tests
pellared ab3e2eb
Add OnlyRecordingSpan test case
pellared e729681
refactor TestRecordOnlySampler
pellared c40a561
Redo the docs
pellared 24b4f8e
nolint
pellared 90885b9
Merge branch 'main' into span-metrics
pellared f3740e6
markdownlint fix
pellared 4b37175
Merge branch 'main' into span-metrics
pellared fcef2ac
Merge branch 'main' into span-metrics
pellared 76001a3
Merge branch 'main' into span-metrics
pellared 5e44856
Update sdk/trace/internal/x/README.md
pellared afee3cc
Merge branch 'main' into span-metrics
pellared ad13ce9
refactor: reuse x.SelfObservability
pellared File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| // Copyright The OpenTelemetry Authors | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| /* | ||
| Package x documents experimental features for [go.opentelemetry.io/otel/sdk/trace]. | ||
|
|
||
| # Compatibility and Stability | ||
|
|
||
| Experimental features do not fall within the scope of the [OpenTelemetry Go versioning and stability policy]. | ||
| These features may change in backwards incompatible ways as feedback is applied. | ||
| These features may be removed or modified in successive version releases, including patch versions. | ||
|
|
||
| When an experimental feature is promoted to a stable feature, a migration path will be included in the changelog entry of the release. | ||
| There is no guarantee that any environment variable feature flags that enabled the experimental feature will be supported by the stable version. | ||
| If they are supported, they may be accompanied with a deprecation notice stating a timeline for the removal of that support. | ||
|
|
||
| # Self-Observability | ||
|
|
||
| The SDK provides a self-observability feature that allows you to monitor the SDK itself. | ||
|
|
||
| To opt-in, set the environment variable OTEL_GO_X_SELF_OBSERVABILITY to "true". | ||
|
|
||
| When enabled, the SDK will create following metrics using the global MeterProvider: | ||
| - otel.sdk.span.live | ||
| - otel.sdk.span.started | ||
|
|
||
| Please see the [Semantic conventions for OpenTelemetry SDK metrics] documentation for more details on these metrics. | ||
|
|
||
| [OpenTelemetry Go versioning and stability policy]: https://github.com/open-telemetry/opentelemetry-go/blob/main/VERSIONING.md | ||
| [Semantic conventions for OpenTelemetry SDK metrics]: https://github.com/open-telemetry/semantic-conventions/blob/v1.36.0/docs/otel/sdk-metrics.md | ||
| */ | ||
| package x // import "go.opentelemetry.io/otel/sdk/trace/internal/x" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.