OpenTelemetry.Resources.Host
1.19.1-beta.1
Prefix Reserved
dotnet add package OpenTelemetry.Resources.Host --version 1.19.1-beta.1
NuGet\Install-Package OpenTelemetry.Resources.Host -Version 1.19.1-beta.1
<PackageReference Include="OpenTelemetry.Resources.Host" Version="1.19.1-beta.1" />
<PackageVersion Include="OpenTelemetry.Resources.Host" Version="1.19.1-beta.1" />
<PackageReference Include="OpenTelemetry.Resources.Host" />
paket add OpenTelemetry.Resources.Host --version 1.19.1-beta.1
#r "nuget: OpenTelemetry.Resources.Host, 1.19.1-beta.1"
#:package OpenTelemetry.Resources.Host@1.19.1-beta.1
#addin nuget:?package=OpenTelemetry.Resources.Host&version=1.19.1-beta.1&prerelease
#tool nuget:?package=OpenTelemetry.Resources.Host&version=1.19.1-beta.1&prerelease
Host Resource Detectors
| Status | |
|---|---|
| Stability | Beta |
| Code Owners | @Kielek, @lachmatt |
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.ipandhost.mac(opt-in, see Network addresses),host.name.
Experimental features
Experimental features are off by default and are turned on through environment variables. They may change or be removed in a future release.
Network addresses
host.ip and host.mac are
opt-in
attributes and identify the machine, so they are not emitted by default. Set
OTEL_DOTNET_EXPERIMENTAL_HOST_RESOURCE_ENABLE_NETWORK_ADDRESSES to true to
emit them.
Both attributes are read from network interfaces that are up, skipping
loopback interfaces, and duplicate values are left out. host.mac only
includes interfaces that have a physical address. The values are read when the
resource is built, so addresses assigned afterwards are only picked up if the
resource is built again.
References
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- OpenTelemetry (>= 1.19.1 && < 2.0.0)
-
.NETStandard 2.0
- Microsoft.Win32.Registry (>= 5.0.0)
- OpenTelemetry (>= 1.19.1 && < 2.0.0)
-
net10.0
- OpenTelemetry (>= 1.19.1 && < 2.0.0)
-
net8.0
- OpenTelemetry (>= 1.19.1 && < 2.0.0)
NuGet packages (14)
Showing the top 5 NuGet packages that depend on OpenTelemetry.Resources.Host:
| Package | Downloads |
|---|---|
|
OpenTelemetry.AutoInstrumentation.Runtime.Managed
Managed components used by the OpenTelemetry.AutoInstrumentation project. |
|
|
Grafana.OpenTelemetry.Base
Minimal Grafana distribution of OpenTelemetry .NET |
|
|
Elastic.OpenTelemetry
OpenTelemetry extensions for Elastic Observability. |
|
|
Seeq.Link.Agent
Agent for running Seeq .NET connectors |
|
|
SolarWindsAPM.OpenTelemetry.Agent
SolarWindsAPM .NET Open Telemetry Library |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on OpenTelemetry.Resources.Host:
| Repository | Stars |
|---|---|
|
bitfoundation/bitplatform
Build all of your apps using what you already know and love ❤️
|
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 1.19.1-beta.1 | 68,029 | 9/21/2026 | |
| 1.19.0-beta.1 | 8,508 | 9/18/2026 | |
| 1.18.0-beta.1 | 204,119 | 8/21/2026 | |
| 1.17.0-beta.1 | 112,422 | 7/22/2026 | |
| 1.16.0-beta.2 | 201,174 | 7/15/2026 | |
| 1.16.0-beta.1 | 11,140 | 7/10/2026 | |
| 1.15.1-beta.1 | 2,167,850 | 4/21/2026 | |
| 1.15.0-beta.2 | 802,885 | 1/28/2026 | |
| 1.15.0-beta.1 | 103,714 | 1/21/2026 | |
| 1.14.0-beta.1 | 991,731 | 11/13/2025 | |
| 1.13.0-beta.1 | 212,885 | 10/10/2025 | |
| 1.12.0-beta.1 | 2,244,162 | 5/6/2025 | |
| 1.11.0-beta.2 | 1,079,146 | 3/5/2025 | |
| 1.11.0-beta.1 | 397,056 | 1/27/2025 | |
| 1.10.0-beta.1 | 95,225 | 12/9/2024 | |
| 0.1.0-beta.3 | 2,676,937 | 8/30/2024 | |
| 0.1.0-beta.2 | 1,024,735 | 6/18/2024 | |
| 0.1.0-beta.1 | 54,968 | 6/4/2024 |