Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .chloggen/45089-zipkin-http-scope-gates-beta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: pkg/zipkin

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Promote "pkg.translator.zipkin.EmitV1HttpConventions", "pkg.translator.zipkin.DontEmitV0HttpConventions", "pkg.translator.zipkin.EmitV1ScopeConventions", and "pkg.translator.zipkin.DontEmitV0ScopeConventions" feature gates to Beta.

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [50909]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
This changes the default behavior to emit the new semantic convention attributes instead of the old deprecated ones.
The Zipkin translator will now use `http.response.status_code` (replacing `http.status_code`), `otel.scope.name`
(replacing `otel.library.name`), and `otel.scope.version` (replacing `otel.library.version`) by default when emitting spans.

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
34 changes: 34 additions & 0 deletions .chloggen/45293-goldendataset-http-to-beta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
component: pkg/coreinternal

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Promote internal.coreinternal.goldendataset.DontEmitV0HTTPConventions and internal.coreinternal.goldendataset.EmitV1HTTPConventions feature gates to Beta

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [45293, 45089]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
Both feature gates should be promoted together as per RFC.
goldendataset now generates spans with user_agent.original, network.protocol.name,
network.protocol.version, client.address, and http.response.status_code (semconv v1.40.0)
by default, and no longer generates the deprecated http.user_agent, http.flavor
(semconv v1.19.0), http.client_ip, and http.status_code (semconv v1.25.0) attributes.
The http.status_code migration is now wired to these gates so that round-trip translation
stays consistent with pkg.translator.zipkin's HTTP semantic convention feature gates.

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
4 changes: 2 additions & 2 deletions internal/coreinternal/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ This component has the following feature gates:
| ------------ | ----- | ----------- | ------------ | ---------- | --------- |
| `internal.coreinternal.goldendataset.DontEmitV0DatabaseConventions` | alpha | When enabled, goldendataset no longer generates spans with deprecated semconv v1.28.0 attribute db.system. | v0.154.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45299) |
| `internal.coreinternal.goldendataset.DontEmitV0FaaSConventions` | alpha | When enabled, goldendataset no longer generates spans with deprecated semconv FaaS attributes like faas.execution. | v0.155.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293) |
| `internal.coreinternal.goldendataset.DontEmitV0HTTPConventions` | alpha | When enabled, goldendataset no longer generates spans with deprecated semconv HTTP attributes http.user_agent, http.flavor (semconv v1.19.0), and http.client_ip. | v0.154.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293) |
| `internal.coreinternal.goldendataset.DontEmitV0HTTPConventions` | beta | When enabled, goldendataset no longer generates spans with deprecated semconv HTTP attributes http.user_agent, http.flavor (semconv v1.19.0), http.client_ip, and http.status_code (semconv v1.25.0). Enable together with pkg.translator.zipkin.DontEmitV0HttpConventions for consistent round-trip translation in tests. | v0.154.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293) |
| `internal.coreinternal.goldendataset.DontEmitV0MessagingConventions` | beta | When enabled, goldendataset no longer generates spans with deprecated semconv attributes messaging.destination (semconv v1.16.0) and messaging.destination.kind (semconv v1.19.0). | v0.155.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45077) |
| `internal.coreinternal.goldendataset.DontEmitV0NetworkConventions` | beta | When enabled, goldendataset no longer generates spans with deprecated semconv v1.12.0 attributes (net.host.ip, net.peer.ip, http.host, http.server_name). | v0.147.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45076) |
| `internal.coreinternal.goldendataset.DontEmitV0RPCConventions` | beta | When enabled, goldendataset no longer generates spans with deprecated semconv RPC attributes rpc.service and peer.service. | v0.148.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/47548) |
| `internal.coreinternal.goldendataset.EmitV1DatabaseConventions` | alpha | When enabled, goldendataset generates spans with db.system.name (semconv v1.40.0) instead of the deprecated db.system (semconv v1.28.0). | v0.154.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45299) |
| `internal.coreinternal.goldendataset.EmitV1FaaSConventions` | alpha | When enabled, goldendataset generates spans with faas.invocation_id (semconv v1.40.0) alongside legacy faas.execution to support migration. | v0.155.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293) |
| `internal.coreinternal.goldendataset.EmitV1HTTPConventions` | alpha | When enabled, goldendataset generates spans with user_agent.original, network.protocol.name, network.protocol.version, and client.address (semconv v1.40.0) alongside legacy http.user_agent, http.flavor, and http.client_ip to support migration. | v0.154.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293) |
| `internal.coreinternal.goldendataset.EmitV1HTTPConventions` | beta | When enabled, goldendataset generates spans with user_agent.original, network.protocol.name, network.protocol.version, client.address, and http.response.status_code (semconv v1.40.0) alongside legacy http.user_agent, http.flavor, http.client_ip, and http.status_code to support migration. Enable together with pkg.translator.zipkin.EmitV1HttpConventions for consistent round-trip translation in tests. | v0.154.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293) |
| `internal.coreinternal.goldendataset.EmitV1MessagingConventions` | beta | When enabled, goldendataset generates spans with messaging.destination.name (semconv v1.40.0) alongside legacy messaging.destination to support migration. | v0.155.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45077) |
| `internal.coreinternal.goldendataset.EmitV1NetworkConventions` | beta | When enabled, goldendataset generates spans with network.local.address, network.peer.address, and server.address (semconv v1.38.0) instead of the deprecated net.host.ip, net.peer.ip, http.host, http.server_name (semconv v1.12.0). Enable together with pkg.translator.zipkin.EmitV1NetworkConventions for consistent round-trip translation in tests. | v0.147.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45076) |
| `internal.coreinternal.goldendataset.EmitV1RPCConventions` | beta | When enabled, goldendataset generates spans with rpc.method and service.peer.name (semconv v1.40.0) alongside legacy rpc.service and peer.service to support migration. | v0.148.0 | N/A | [Link](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/47548) |
Expand Down
28 changes: 24 additions & 4 deletions internal/coreinternal/goldendataset/span_generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,12 @@ func appendFaaSHTTPAttributes(includeStatus bool, attrMap pcommon.Map) {
attrMap.PutStr(string(conventions.NetworkProtocolVersionKey), "2")
}
if includeStatus {
attrMap.PutInt(string(conventionsv125.HTTPStatusCodeKey), 201)
if !metadata.InternalCoreinternalGoldendatasetDontEmitV0HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutInt(string(conventionsv125.HTTPStatusCodeKey), 201)
}
if metadata.InternalCoreinternalGoldendatasetEmitV1HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutInt(string(conventions.HTTPResponseStatusCodeKey), 201)
}
}
if !metadata.InternalCoreinternalGoldendatasetDontEmitV0HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutStr(string(conventionsv118.HTTPUserAgentKey),
Expand Down Expand Up @@ -334,7 +339,12 @@ func appendHTTPClientAttributes(includeStatus bool, attrMap pcommon.Map) {
attrMap.PutStr(string(conventionsv125.HTTPMethodKey), http.MethodGet)
attrMap.PutStr(string(conventionsv125.HTTPURLKey), "https://opentelemetry.io/registry/")
if includeStatus {
attrMap.PutInt(string(conventionsv125.HTTPStatusCodeKey), 200)
if !metadata.InternalCoreinternalGoldendatasetDontEmitV0HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutInt(string(conventionsv125.HTTPStatusCodeKey), 200)
}
if metadata.InternalCoreinternalGoldendatasetEmitV1HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutInt(string(conventions.HTTPResponseStatusCodeKey), 200)
}
attrMap.PutStr("http.status_text", "More Than OK")
}
attrMap.PutStr(string(conventionsv126.EnduserIDKey), "unittest")
Expand All @@ -359,7 +369,12 @@ func appendHTTPServerAttributes(includeStatus bool, attrMap pcommon.Map) {
attrMap.PutStr(string(conventions.NetworkProtocolVersionKey), "2")
}
if includeStatus {
attrMap.PutInt(string(conventionsv125.HTTPStatusCodeKey), 201)
if !metadata.InternalCoreinternalGoldendatasetDontEmitV0HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutInt(string(conventionsv125.HTTPStatusCodeKey), 201)
}
if metadata.InternalCoreinternalGoldendatasetEmitV1HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutInt(string(conventions.HTTPResponseStatusCodeKey), 201)
}
}
if !metadata.InternalCoreinternalGoldendatasetDontEmitV0HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutStr(string(conventionsv118.HTTPUserAgentKey),
Expand Down Expand Up @@ -481,7 +496,12 @@ func appendMaxCountAttributes(includeStatus bool, attrMap pcommon.Map) {
attrMap.PutStr(string(conventions.NetworkProtocolVersionKey), "2")
}
if includeStatus {
attrMap.PutInt(string(conventionsv125.HTTPStatusCodeKey), 201)
if !metadata.InternalCoreinternalGoldendatasetDontEmitV0HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutInt(string(conventionsv125.HTTPStatusCodeKey), 201)
}
if metadata.InternalCoreinternalGoldendatasetEmitV1HTTPConventionsFeatureGate.IsEnabled() {
attrMap.PutInt(string(conventions.HTTPResponseStatusCodeKey), 201)
}
attrMap.PutStr("http.status_text", "Created")
}
if !metadata.InternalCoreinternalGoldendatasetDontEmitV0HTTPConventionsFeatureGate.IsEnabled() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestGenerateParentSpan(t *testing.T) {
fillSpan(traceID, pcommon.SpanID([8]byte{}), "/gotest-parent", spanInputs, random, span)
assert.Equal(t, traceID, span.TraceID())
assert.True(t, span.ParentSpanID().IsEmpty())
assert.Equal(t, 11, span.Attributes().Len())
assert.Equal(t, 12, span.Attributes().Len())
assert.Equal(t, ptrace.StatusCodeOk, span.Status().Code())
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 11 additions & 6 deletions internal/coreinternal/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ feature_gates:
from_version: v0.155.0
reference_url: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293
- id: internal.coreinternal.goldendataset.DontEmitV0HTTPConventions
stage: alpha
stage: beta
description: >-
When enabled, goldendataset no longer generates spans with deprecated
semconv HTTP attributes http.user_agent, http.flavor (semconv v1.19.0),
and http.client_ip.
http.client_ip, and http.status_code (semconv v1.25.0). Enable together
with pkg.translator.zipkin.DontEmitV0HttpConventions for consistent
round-trip translation in tests.
from_version: v0.154.0
reference_url: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293
- id: internal.coreinternal.goldendataset.DontEmitV0MessagingConventions
Expand Down Expand Up @@ -68,12 +70,15 @@ feature_gates:
from_version: v0.155.0
reference_url: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293
- id: internal.coreinternal.goldendataset.EmitV1HTTPConventions
stage: alpha
stage: beta
description: >-
When enabled, goldendataset generates spans with user_agent.original,
network.protocol.name, network.protocol.version, and client.address
(semconv v1.40.0) alongside legacy http.user_agent, http.flavor, and
http.client_ip to support migration.
network.protocol.name, network.protocol.version, client.address, and
http.response.status_code (semconv v1.40.0) alongside legacy
http.user_agent, http.flavor, http.client_ip, and http.status_code to
support migration. Enable together with
pkg.translator.zipkin.EmitV1HttpConventions for consistent round-trip
translation in tests.
from_version: v0.154.0
reference_url: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/45293
- id: internal.coreinternal.goldendataset.EmitV1MessagingConventions
Expand Down
Loading
Loading