eclipse / microprofile-telemetry

microprofile telemetry
Apache License 2.0
16 stars 16 forks source link

Meet semantic conventions stabilization requirements of OpenTelemetry #153

Closed pdudits closed 4 months ago

pdudits commented 6 months ago

MicroProfile Telemetry 1.1 depends on semantic conventions 1.20.0.

Current semantic conventions state:

Warning Existing HTTP instrumentations that are using v1.20.0 of this document (or prior):

  • SHOULD NOT change the version of the HTTP or networking conventions that they emit until the HTTP semantic conventions are marked stable (HTTP stabilization will include stabilization of a core set of networking conventions which are also used in HTTP instrumentations). Conventions include, but are not limited to, attributes, metric and span names, and unit of measure.
  • SHOULD introduce an environment variable OTEL_SEMCONV_STABILITY_OPT_IN in the existing major version which is a comma-separated list of values. The only values defined so far are:
    • (http - emit the new, stable HTTP and networking conventions, and stop emitting the old experimental HTTP and networking conventions that the instrumentation emitted previously.
    • http/dup - emit both the old and the stable HTTP and networking conventions, allowing for a seamless transition.
    • The default behavior (in the absence of one of these values) is to continue emitting whatever version of the old experimental HTTP and networking conventions the instrumentation was emitting previously.
    • Note: http/dup has higher precedence than http in case both values are present
  • SHOULD maintain (security patching at a minimum) the existing major version for at least six months after it starts emitting both sets of conventions.
  • SHOULD drop the environment variable in the next major version (stable next major version SHOULD NOT be released prior to October 1, 2023)

HTTP instrumentation was indeed experimental, but it is stable since version 1.23.0. A diff between 1.20.0 and current version should be taken (1.20.0 vs 1.24.0, they are now in different repos).

Unless any of the required attributes changed between the versions, then specification itself does not need to mandate it. However if implementors were emitting extra attributes that did change, they need to address this requirement.

pdudits commented 5 months ago

From brief look, the attributes did change significantly: http.method is now http.request.method, net.sock.peer.addr became network.peer.address etc.

It is therefore important to address question of semantic convention version(ing) in next version of MP Telemetry

brunobat commented 5 months ago

We should depend on otel v2.0 because of the HTTP stabilisation. See: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/migration-guide.md#summary-of-changes

radcortez commented 5 months ago

I agree, we should move to 2.0 with the new MP Telemetry version.

Unfortunately, HTTP attributes names that we assert in the TCK changed. They had a brief transition period where both old and new were supported, but that is not available in 2.0.

pdudits commented 5 months ago

The question I am asking here is if in addition to that would be implementations required to implement OTEL_SEMCONV_STABILITY_OPT_IN and its property equivalent and support emiting previous set of attributes as well.

brunobat commented 5 months ago

The question I am asking here is if in addition to that would be implementations required to implement OTEL_SEMCONV_STABILITY_OPT_IN and its property equivalent and support emiting previous set of attributes as well.

If we move to 2.0 that property is no longer available in the OTel instrumentation, @pdudits

radcortez commented 5 months ago

Correct, the stability property was added in 1.27, available until 1.32, and was removed in 2.0.

Emily-Jiang commented 5 months ago

We should depend on otel v2.0 because of the HTTP stabilisation. See: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/migration-guide.md#summary-of-changes

@brunobat what v2.0 do you mean? The latest otel semantic convention is v1.24.0. Where is the v2.0 from? The next upcoming semantic-conventions-java release is v1.23.0.

brunobat commented 5 months ago

It's this version, @Emily-Jiang : https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v2.0.0

Emily-Jiang commented 4 months ago

We will rely on the v2.x apis, which would be stable.