OpenTelemetry Resource
Every trace, metric and log record Binacle.Net sends carries the same resource attributes. They say which service, which copy of it and which machine the data came from.
π₯οΈ Attributes
service.name-Binacle.Netservice.namespace-ServiceNamespaceservice.instance.id-ServiceInstanceId, or a new id each startservice.version- the Binacle versionhost.name- the machine nameprocess.pid- the process iddeployment.environment.name- the host environment in lowercase, such asproductionordevelopment
host.name, process.pid and deployment.environment.name are new in 3.2.0.
βοΈ Who Wins
When more than one place sets the same attribute, the later one in this list wins:
- Binacleβs own values, above.
- The
OTEL_RESOURCE_ATTRIBUTESandOTEL_SERVICE_NAMEenvironment variables. They also win overServiceInstanceId.OTEL_SERVICE_NAMEwins over aservice.nameinsideOTEL_RESOURCE_ATTRIBUTES. With Azure Monitor,OTEL_SERVICE_NAMEalso changes the role name. - The top-level
AdditionalAttributesinOpenTelemetry.json.
βοΈ Naming the Server
To name the server yourself, set host.name through either one:
OTEL_RESOURCE_ATTRIBUTES=host.name=my-server
{
"OpenTelemetry": {
"AdditionalAttributes": {
"host.name": "my-server"
}
}
}
βοΈ Azure Monitor
Azure Monitor maps only the service.* and k8s.* attributes onto its records. host.name, process.pid and
deployment.environment.name reach it only through its _OTELRESOURCE_ metric, which the
OTEL_DOTNET_AZURE_MONITOR_ENABLE_RESOURCE_METRICS environment variable turns on. See
Open Telemetry.