Important
Resources detected by this packages are defined by experimental semantic convention. These resources can be changed without prior notification.
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
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
.