Skip to content

Latest commit

 

History

History
43 lines (30 loc) · 1.54 KB

File metadata and controls

43 lines (30 loc) · 1.54 KB

Process Resource Detectors

NuGet version badge NuGet download count badge

Important

Resources detected by this packages are defined by experimental semantic convention. These resources can be changed without prior notification.

Getting Started

You need to install the OpenTelemetry.ResourceDetectors.Process package to be able to use the Process Runtime Resource Detectors.

dotnet add package OpenTelemetry.ResourceDetectors.Process --prerelease

Usage

You can configure Process Runtime resource detector to the TracerProvider with the following example below.

using OpenTelemetry;
using OpenTelemetry.ResourceDetectors.Process;

var tracerProvider = Sdk.CreateTracerProviderBuilder()
                        // other configurations
                        .ConfigureResource(resource => resource
                            .AddDetector(new ProcessDetector()))
                        .Build();

The resource detectors will record the following metadata based on where your application is running:

  • ProcessDetector: process.owner, process.pid.

References