From f8b672549ab8f9ce02a3b263e7daeea3c91cb1d8 Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Thu, 28 May 2026 15:25:37 +0200 Subject: [PATCH] fix(otel): use NewSchemaless to avoid semconv schema URL conflicts --- internal/o11y/otel/otel.go | 5 +---- internal/o11y/otel/otel_test.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/internal/o11y/otel/otel.go b/internal/o11y/otel/otel.go index 5a2c122..c6ec550 100644 --- a/internal/o11y/otel/otel.go +++ b/internal/o11y/otel/otel.go @@ -101,10 +101,7 @@ func attributesFrom(cfg *config.Config) []attribute.KeyValue { func newResource(attributes []attribute.KeyValue) (*resource.Resource, error) { return resource.Merge( resource.Default(), - resource.NewWithAttributes( - semconv.SchemaURL, - attributes..., - ), + resource.NewSchemaless(attributes...), ) } diff --git a/internal/o11y/otel/otel_test.go b/internal/o11y/otel/otel_test.go index 0a91649..31b7653 100644 --- a/internal/o11y/otel/otel_test.go +++ b/internal/o11y/otel/otel_test.go @@ -9,7 +9,7 @@ import ( ) func TestSetup(t *testing.T) { - // Assert that version for semconv schemas don't conflict with the current otel version. + // Assert that resource merge doesn't fail due to semconv schema conflicts. _, err := otel.Setup(t.Context(), &config.Config{}) assert.NoError(t, err) }