Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update opentelemetry-semconv to 1.24.0-alpha #568

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

iRevive
Copy link
Contributor

@iRevive iRevive commented Mar 28, 2024

There are several major breaking changes:

  1. The experimental (incubating) attributes are moved to a separate module semconv-experimental
  2. Attributes are organized by root namespaces. Previously, there were two superobjects ResourceAttributes and SemanticAttributes. Now, http.request.header attribute lives in the HttpAttributes object.
  3. The namespace has changed from org.typelevel.otel4s.semconv.trace to org.typelevel.otel4s.semconv
  4. All old attributes that were removed from semantic-conventions (without being deprecated there) have been removed

The changes are based on the https://github.com/open-telemetry/semantic-conventions-java/releases/tag/v1.24.0.

.settings(munitDependencies)
.settings(scalafixSettings)

lazy val `semconv-experimental` =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing depends on the otel4s-semconv-experimental. I would expect users to pull this dependency directly into their projects.

@@ -94,13 +93,29 @@ sealed trait TelemetryResource {
}

object TelemetryResource {
private[otel4s] object ResourceAttributes {
val TelemetrySdkName: AttributeKey[String] =
AttributeKey("telemetry.sdk.name")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we shouldn't depend on the experimental artifacts, the values are hardcoded instead.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my main concern with this is that it will quietly change and we won't remember to keep up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand the strategy correctly, the promotion to the 'stable' convention should be the following:

  1. keys under TelemetryExperimentalAttributes will be deprecated
  2. TelemetryAttributes will be generated under the stable module

Hopefully, we will notice this and update the hardcoded attributes accordingly.

Copy link
Contributor

@NthPortal NthPortal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hugely in favour of this making the next release

@@ -94,13 +93,29 @@ sealed trait TelemetryResource {
}

object TelemetryResource {
private[otel4s] object ResourceAttributes {
val TelemetrySdkName: AttributeKey[String] =
AttributeKey("telemetry.sdk.name")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my main concern with this is that it will quietly change and we won't remember to keep up

@iRevive iRevive merged commit 44d6c81 into typelevel:main Mar 29, 2024
10 checks passed
@iRevive iRevive deleted the update-sem-conv branch March 29, 2024 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants