OpenTelemetry.Resources.Host 1.15.0-beta.2
Host Resource Detectors
| Status | |
|---|---|
| Stability | Beta |
| Code Owners | @Kielek, @lachmatt |
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.Resources.Host package to be able to use the
Host Resource Detectors.
dotnet add package OpenTelemetry.Resources.Host --prerelease
Usage
You can configure Host resource detector to
the ResourceBuilder with the following example.
using OpenTelemetry;
using OpenTelemetry.Resources;
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
.ConfigureResource(resource => resource.AddHostDetector())
// other configurations
.Build();
using var meterProvider = Sdk.CreateMeterProviderBuilder()
.ConfigureResource(resource => resource.AddHostDetector())
// other configurations
.Build();
using var loggerFactory = LoggerFactory.Create(builder =>
{
builder.AddOpenTelemetry(options =>
{
options.SetResourceBuilder(ResourceBuilder.CreateDefault().AddHostDetector());
});
});
The resource detectors will record the following metadata based on where your application is running:
- HostDetector:
host.arch(supported only on .NET),host.id(when running on non-containerized systems),host.name.
References
No packages depend on OpenTelemetry.Resources.Host.
.NET Framework 4.6.2
- OpenTelemetry (>= 1.15.0 && < 2.0.0)
.NET 8.0
- OpenTelemetry (>= 1.15.0 && < 2.0.0)
.NET 10.0
- OpenTelemetry (>= 1.15.0 && < 2.0.0)
.NET Standard 2.0
- Microsoft.Win32.Registry (>= 5.0.0)
- OpenTelemetry (>= 1.15.0 && < 2.0.0)
| Version | Downloads | Last updated |
|---|---|---|
| 1.15.0-beta.2 | 55 | 2026-04-15 |
| 1.15.0-beta.1 | 0 | 2026-01-21 |
| 1.14.0-beta.1 | 0 | 2025-11-13 |
| 1.13.0-beta.1 | 0 | 2025-10-10 |
| 1.12.0-beta.1 | 0 | 2025-05-06 |
| 1.11.0-beta.2 | 0 | 2025-03-05 |
| 1.11.0-beta.1 | 0 | 2025-01-27 |
| 1.10.0-beta.1 | 0 | 2024-12-09 |
| 0.1.0-beta.3 | 0 | 2024-08-30 |
| 0.1.0-beta.2 | 0 | 2024-06-18 |
| 0.1.0-beta.1 | 0 | 2024-06-04 |