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

[otelmongo] bump semconv to 1.26.0 #6171

Open
prestonvasquez opened this issue Oct 1, 2024 · 8 comments · May be fixed by #6172
Open

[otelmongo] bump semconv to 1.26.0 #6171

prestonvasquez opened this issue Oct 1, 2024 · 8 comments · May be fixed by #6172
Labels
area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: otelmongo

Comments

@prestonvasquez
Copy link
Contributor

prestonvasquez commented Oct 1, 2024

Problem Statement

otelmongo is currently using semconv/v1.17.0, suggest updating to semconv/v1.26.0.

Proposed Solution

key/value pair changes migrating from 1.17.0 to 1.26.0 include:

Old Func New Func Old Key New Key Notes
DBOperation DBOperationName db.operation db.operation.name
DBName DBNamespace db.name db.namespace
NetPeerName NetworkPeerAddress net.peer.name network.peer.address Currently the hostname is used for the peer name. Documentation suggest using the server address.
NetPeerPort NetworkPeerPort net.peer.port network.peer.port
NetTransportTCP NetworkingTransportTCP net.transport network.transport Network transport no longer includes the ip_ portion defined on the deprecated net.trasnport. Instead, this value is either tcp or udp.
DBStatement DBQueryText db.statement db.query.text There is no deprecated analogue to `db.statement` according to the documentation. Db.query.text seemed like a natural fit.

Alternatives

Since these fields are deprecated, there is no alternative other than leaving the semconv version static.

Prior Art

NA

Additional Context

It's worth noting that this is a breaking change if telemetry key/values are considered stable.

@prestonvasquez prestonvasquez added area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: otelmongo labels Oct 1, 2024
@prestonvasquez prestonvasquez changed the title Bump semconv to 1.26.0 [otelmongo] bump semconv to 1.26.0 Oct 1, 2024
@prestonvasquez prestonvasquez linked a pull request Oct 1, 2024 that will close this issue
@prestonvasquez
Copy link
Contributor Author

prestonvasquez commented Oct 22, 2024

A major version release of otelmongo should be planned before bumping to 1.26.0: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md#semantic-conventions-stability

OTEL_SEMCONV_STABILITY_OPT_IN is not intended for already stable releases, see here.

@pellared
Copy link
Member

pellared commented Nov 8, 2024

@prestonvasquez, why was it closed?

@pellared pellared reopened this Nov 8, 2024
@prestonvasquez
Copy link
Contributor Author

@pellared I wasn't aware we still wanted to do this. Should I re-open the PR?

@pellared
Copy link
Member

A major version release of otelmongo should be planned before bumping to 1.26.0: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/versioning-and-stability.md#semantic-conventions-stability

I do not follow why we want to create a major version of otelmongo prior bumping the semantic conventions.

I think it may make sense to coordinate the strategy of bumping the DB semconvs to the latest version at least with @XSAM who maintains https://github.com/XSAM/otelsql.

@prestonvasquez
Copy link
Contributor Author

@pellared The rationale can be found here: open-telemetry/semantic-conventions#1502 (comment)

OTEL_SEMCONV_STABILITY_OPT_IN [is] for the initial unstable to stable migration, and not subsequent major version bumps from stable -> (breaking) stable

Once we bump to 1.x, OTEL_SEMCONV_STABILITY_OPT_IN is no longer usable.

@pellared
Copy link
Member

pellared commented Nov 12, 2024

@prestonvasquez, there are two things: stability of semantic conventions and stability of instrumentation library.

Once we bump to 1.x, OTEL_SEMCONV_STABILITY_OPT_IN is no longer usable.

We can still have unstable instrumentation library (v0.x) that produces stable telemetry (compliant with semantic conventions).

The OTEL_SEMCONV_STABILITY_OPT_IN is introduced to give a "user-friendly" migration path for users of both stable and unstable instrumentation libraries to migrate from legacy semantic conventions to new semantic conventions.

You can look at HTTP Instrumentation project how we want to help otelhttp users migrating from HTTP legacy semantic conventions to stable HTTP semantic conventions: https://github.com/orgs/open-telemetry/projects/87

Additional reference: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/telemetry-stability.md

@prestonvasquez
Copy link
Contributor Author

@pellared

The OTEL_SEMCONV_STABILITY_OPT_IN is introduced to give a "user-friendly" migration path for users of both stable and unstable instrumentation libraries to migrate from legacy semantic conventions to new semantic conventions.

OTEL_SEMCONV_STABILITY_OPT_IN is not intended to be used with stable instrumentation libraries. It should be used when we make a breaking change in the unstable library with the guarantee that this change will be main path in the stable upgrade.

What do you propose we do?

@pellared
Copy link
Member

OTEL_SEMCONV_STABILITY_OPT_IN is not intended to be used with stable instrumentation libraries

  1. otelmongo is not stable. See: https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/go.mongodb.org/mongo-driver/mongo/otelmongo?tab=versions
  2. This is not true. Find "existing major version" in https://github.com/open-telemetry/semantic-conventions/blob/main/docs/non-normative/db-migration.md.

It should be used when we make a breaking change in the unstable library with the guarantee that this change will be main path in the stable upgrade.

This is exactly where we are, right?

What do you propose we do?

I propose to implement OTEL_SEMCONV_STABILITY_OPT_IN as described in https://github.com/open-telemetry/semantic-conventions/blob/main/docs/non-normative/db-migration.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: instrumentation Related to an instrumentation package enhancement New feature or request instrumentation: otelmongo
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants