Skip to content

Commit

Permalink
docs: resource-detector not be tied to tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
luizhlelis committed Dec 16, 2023
1 parent af83eb1 commit 230ceef
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 16 deletions.
1 change: 1 addition & 0 deletions docs/logs/extending-the-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* [Building your own exporter](#exporter)
* [Building your own processor](#processor)
* [Building your own sampler](#sampler)
* [Building your own resource detector](../../resources/README.md)
* [References](#references)

## Exporter
Expand Down
1 change: 1 addition & 0 deletions docs/metrics/extending-the-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* [Building your own reader](#reader)
* [Building your own exemplar filter](#exemplarfilter)
* [Building your own exemplar reservoir](#exemplarreservoir)
* [Building your own resource detector](../../resources/README.md)
* [References](#references)

## Exporter
Expand Down
20 changes: 20 additions & 0 deletions docs/resources/README.md
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).
17 changes: 1 addition & 16 deletions docs/trace/extending-the-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Quick links:
* [Building your own instrumentation library](#instrumentation-library)
* [Building your own processor](#processor)
* [Building your own sampler](#sampler)
* [Building your own resource detector](#resource-detector)
* [Building your own resource detector](../../resources/README.md)
* [Registration extension method guidance for library authors](#registration-extension-method-guidance-for-library-authors)
* [References](#references)

Expand Down Expand Up @@ -340,21 +340,6 @@ class MySampler : Sampler

A demo sampler is shown [here](./MySampler.cs).

## 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](./MyResourceDetector.cs).

## Registration extension method guidance for library authors

> **Note**
Expand Down

0 comments on commit 230ceef

Please sign in to comment.