mirror of
https://github.com/nais/wonderwall.git
synced 2026-08-19 02:56:15 +00:00
fix(otel): use NewSchemaless to avoid semconv schema URL conflicts
This commit is contained in:
@@ -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...),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user