util/tracing: remove semconv dependency#6549
Conversation
util/tracing/detect/resource.go
Outdated
| // semconv version. It corresponds to [semconv.SchemaURL]. | ||
| // | ||
| // [semconv.SchemaURL]: https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.37.0#SchemaURL | ||
| const schemaURL = "" |
There was a problem hiding this comment.
From what I could find, it's OK to keep this empty (the GoDoc linked above describes "must be non-empty" but that applies to semconv itself); alternatively we can pin this to a version ("https://opentelemetry.io/schemas/1.37.0" for example), but looks like there's no real benefit?
There was a problem hiding this comment.
I'd prefer that we keep the schema url to be something. This is just mostly so just in case they do change something we're advertising which semconv version we're using.
There was a problem hiding this comment.
Yeah, makes sense; won't do harm.
8b67d5f to
272d7af
Compare
b27618d to
b96c93c
Compare
This comment was marked as resolved.
This comment was marked as resolved.
fd6b99f to
f361d3a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jsternberg
left a comment
There was a problem hiding this comment.
I'm ok with this. We're unlikely to change it and if it means that other projects don't have to vendor useless code or that we vendor less I'm good with it.
Replace semconv imports with local constants for semconv keys. These attributes are marked Stable in the OpenTelemetry Semantic Conventions and are not expected to change across semver releases: - https://opentelemetry.io/docs/specs/semconv/ - https://opentelemetry.io/docs/specs/otel/versioning-and-stability/#semantic-conventions-stability This avoids pulling in versioned semconv packages solely for stable attribute keys and prevents duplicate semconv versions in the module graph. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Just for a bit of context on this, the versioned semver packages will never change even if they were unstable or beta. That's what the schema url is meant for is to allow the names to change. At the same time, these specific properties, while they theoretically could change, are unlikely to ever change just due to how ingrained they are and how many people it would inadvertently break. |


Replace semconv imports with local constants for semconv keys.
These attributes are marked Stable in the OpenTelemetry Semantic Conventions and are not expected to change across semver releases:
This avoids pulling in versioned semconv packages solely for stable attribute keys and prevents duplicate semconv versions in the module graph.