From 11d54c7b79c59359322302df25ba6be58acb3c39 Mon Sep 17 00:00:00 2001 From: Cedric Ziel Date: Sun, 15 Sep 2024 12:12:45 +0200 Subject: [PATCH] Set default service name to unknown_service:node As per https://opentelemetry.io/docs/specs/semconv/resource/#service the service name should fallback to a specific name --- packages/otel/src/sdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/otel/src/sdk.ts b/packages/otel/src/sdk.ts index 35bdea8..20ab3ed 100644 --- a/packages/otel/src/sdk.ts +++ b/packages/otel/src/sdk.ts @@ -91,7 +91,7 @@ export class Sdk { this.contextManager = contextManager; const serviceName = - env.OTEL_SERVICE_NAME || configuration.serviceName || "app"; + env.OTEL_SERVICE_NAME || configuration.serviceName || "unknown_service:node"; let resource = new Resource( omitUndefinedAttributes({ [SemanticResourceAttributes.SERVICE_NAME]: serviceName,