-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs:
resource-detector
not be tied to tracing
- Loading branch information
1 parent
af83eb1
commit 230ceef
Showing
4 changed files
with
23 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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 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 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,20 @@ | ||
# Resources | ||
|
||
Quick links: | ||
|
||
* [Building your own resource detector](#resource-detector) | ||
|
||
## Resource Detector | ||
|
||
OpenTelemetry .NET SDK provides a resource detector for detecting resource | ||
information from the `OTEL_RESOURCE_ATTRIBUTES` and `OTEL_SERVICE_NAME` | ||
environment variables. | ||
|
||
Custom resource detectors can be implemented: | ||
|
||
* ResourceDetectors should inherit from | ||
`OpenTelemetry.Resources.IResourceDetector`, (which belongs to the | ||
[OpenTelemetry](../../src/OpenTelemetry/README.md) package), and implement | ||
the `Detect` method. | ||
|
||
A demo ResourceDetector is shown [here](../trace/extending-the-sdk/MyResourceDetector.cs). |
This file contains 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