Repository navigation
Generate and upgrade to semconv/v1.42.0 - #8484
Merged
Merged
Conversation
MrAlias
force-pushed
the
generate-semconv-v1.42
branch
from
June 18, 2026 20:47
d04073f to
cac7b19
Compare
MrAlias
force-pushed
the
generate-semconv-v1.42
branch
from
June 18, 2026 21:02
cac7b19 to
17151ea
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8484 +/- ##
=======================================
+ Coverage 83.8% 84.1% +0.2%
=======================================
Files 325 325
Lines 26272 26194 -78
=======================================
Hits 22041 22041
+ Misses 3849 3771 -78
Partials 382 382
🚀 New features to boost your workflow:
|
MrAlias
marked this pull request as ready for review
June 18, 2026 21:13
MrAlias
requested review from
XSAM,
dashpole,
dmathieu,
flc1125 and
pellared
as code owners
June 18, 2026 21:13
pellared
approved these changes
Jun 19, 2026
XSAM
approved these changes
Jun 21, 2026
1 of 2 tasks
NesterovYehor
pushed a commit
to NesterovYehor/opentelemetry-go
that referenced
this pull request
Jul 15, 2026
Fix open-telemetry#8465 Relevant upstream v1.42.0 release notes: > ### Highlights > > - Generative AI Migration: All `gen_ai.*` attributes, metrics, events, and spans have been deprecated and moved to the dedicated OpenTelemetry GenAI Semantic Conventions Repository. ([open-telemetry#3696](open-telemetry/semantic-conventions#3696)) > - Graduations to Stable: A core selection of Kubernetes and container registry resource attributes have officially graduated to `stable` status. ([open-telemetry#3382](open-telemetry/semantic-conventions#3382)) > - Promotions to Release Candidate: Several conventions advanced to `release_candidate`, including `cpu.mode`, process attributes, and core CPU time metrics. ([open-telemetry#3694](open-telemetry/semantic-conventions#3694), [open-telemetry#3041](open-telemetry/semantic-conventions#3041), [open-telemetry#3001](open-telemetry/semantic-conventions#3001)) > > ### Breaking changes > > - `gen-ai`: Move Generative AI semantic conventions to a dedicated repository. ([open-telemetry#3696](open-telemetry/semantic-conventions#3696)) > - `http`: Change `network.peer.address` attribute requirement level from Recommended to Opt-In on the `http.client.open_connections` and `http.client.connection.duration` metrics. ([open-telemetry#3279](open-telemetry/semantic-conventions#3279)) > - `v8js`: Rename `v8js.memory.heap.limit` to `v8js.memory.heap.space.size`, and add a new `v8js.memory.heap.limit` UpDownCounter. ([open-telemetry#3476](open-telemetry/semantic-conventions#3476)) > > ### Bug fixes > > - `container`: Remove kernel from cpu.mode enum and clarify container cpu states. ([open-telemetry#3700](open-telemetry/semantic-conventions#3700)) This PR also: - adds the generated `go.opentelemetry.io/otel/semconv/v1.42.0` package - upgrades repo imports, depguard, documentation examples, and schema URL expectations to `go.opentelemetry.io/otel/semconv/v1.42.0` - keeps deprecated GenAI/MCP/OpenAI declarations out of the new package, matching Go's existing semconv deprecation strategy where users continue importing the older generated package for deprecated declarations GenAI note: Upstream semantic-conventions v1.42.0 deprecates the core GenAI, MCP, and OpenAI definitions after moving them to https://github.com/open-telemetry/semantic-conventions-genai. Since Go's generated semconv packages exclude deprecated conventions, `semconv/v1.42.0` removes those declarations. The separate GenAI package and schema URL design still has open questions for Go, especially package discovery, version pairing with core semconv, and which schema URL instrumentation should use when emitting mixed GenAI and core attributes. That follow-up is being discussed in open-telemetry/semantic-conventions-genai#247.
Merged
MrAlias
added a commit
that referenced
this pull request
Aug 3, 2026
### Added - Add experimental observability metrics to `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log`. (#7124) - Add the experimental `WithUnsafeAttributes` no-copy attribute option to `go.opentelemetry.io/otel/metric/x` for future performance improvements. This API is a work in progress. (#8251) - Add `Map` and `MapValue` functions for the new `MAP` attribute type in `go.opentelemetry.io/otel/attribute`. (#8445) - Support `MAP` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#8453) - Support `MAP` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlplog`. (#8453) - Support `MAP` attributes in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#8453) - Support `MAP` attributes in `go.opentelemetry.io/otel/exporters/zipkin`. (#8453) - Apply `AttributeValueLengthLimit` recursively to values contained in `attribute.MAP` attributes in `go.opentelemetry.io/otel/sdk/trace`. (#8454) - Remove duplicate keys from `attribute.MAP` values in `go.opentelemetry.io/otel/sdk/resource` using last-value-wins semantics. (#8471) - Remove duplicate keys by default from `attribute.MAP` values in instrumentation scope attributes in `go.opentelemetry.io/otel/sdk/log` using last-value-wins semantics. (#8471) - Remove duplicate keys by default from `attribute.MAP` values in span, event, link, and instrumentation scope attributes in `go.opentelemetry.io/otel/sdk/trace` using last-value-wins semantics. (#8471) - Remove duplicate keys by default from `attribute.MAP` values in measurement and instrumentation scope attributes in `go.opentelemetry.io/otel/sdk/metric` using last-value-wins semantics. (#8471) - Extend `WithAllowKeyDuplication` in `go.opentelemetry.io/otel/sdk/log` to disable duplicate-key removal in `attribute.MAP` values for instrumentation scope attributes. (#8471) - Add the `go.opentelemetry.io/otel/semconv/v1.42.0` package. The package contains semantic conventions from the `v1.42.0` version of the OpenTelemetry Semantic Conventions. See the [migration documentation](./semconv/v1.42.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.41.0`. (#8484) - Add `WithoutPanicRecording` as a `TracerProviderOption` in `go.opentelemetry.io/otel/sdk/trace` to disable exception event recording for panics. (#8532) - Add the `go.opentelemetry.io/otel/semconv/v1.43.0` package. The package contains semantic conventions from the `v1.43.0` version of the OpenTelemetry Semantic Conventions. See the [migration documentation](./semconv/v1.43.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.42.0`. (#8628) ### Changed - `HistogramReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` now uses a time-unbiased sampling algorithm for exemplars. (#8306) -⚠️ **Breaking Change:** Use `go.opentelemetry.io/otel/attribute.Value` and `go.opentelemetry.io/otel/attribute.KeyValue` for log bodies and attributes in `go.opentelemetry.io/otel/log`, `go.opentelemetry.io/otel/log/logtest`, `go.opentelemetry.io/otel/sdk/log`, and `go.opentelemetry.io/otel/sdk/log/logtest`. (#8490) - Encode log bodies and attributes as `go.opentelemetry.io/otel/attribute.Value` JSON in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#8490) - Improve the performance of hashing `BOOLSLICE`, `INT64SLICE`, `FLOAT64SLICE`, and `STRINGSLICE` attribute values by avoiding reflection for short slices in `go.opentelemetry.io/otel/attribute`. (#8511) -⚠️ **Breaking Change:** `WithEndpointURL` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` no longer appends the default signal path when an endpoint URL has no path, making the behavior consistent with `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` and with setting the endpoint through `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT`. If the URL has no path component, the root path (`/`) is used. Use `WithEndpointURL(url.JoinPath(endpoint, "/v1/metrics"))` to preserve the previous behavior. (#8538) -⚠️ **Breaking Change:** `WithEndpointURL` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` no longer appends the default signal path when an endpoint URL has no path, making the behavior consistent with `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` and with setting the endpoint through `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`. If the URL has no path component, the root path (`/`) is used. Use `WithEndpointURL(url.JoinPath(endpoint, "/v1/traces"))` to preserve the previous behavior. (#8538) ### Deprecated - Deprecate `WithExportBufferSize` in `go.opentelemetry.io/otel/sdk/log`. The option remains available for source compatibility but no longer affects behavior; `BatchProcessor` no longer maintains a separate export-request buffer. (#8620) ### Removed -⚠️ **Breaking Change:** Remove `Kind`, `Value`, `KeyValue`, their constructors, and attribute conversion helpers from `go.opentelemetry.io/otel/log`. (#8490) -⚠️ **Breaking Change:** Remove the `AttributeValueLengthLimit` and `AttributeCountLimit` fields from `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest`; records produced by the factory now keep attribute limits disabled so test code can append exact attributes. (#8556) ### Fixed - Fix an off-by-one error in `FixedSizeReservoir` in `go.opentelemetry.io/otel/sdk/metric/exemplar` that prevented the first exemplar from being sampled after the reservoir was filled. (#8309) - Interpret HTTP `Retry-After` header values as seconds instead of nanoseconds when retrying OTLP HTTP exports in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, and `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8383) - Fix a memory leak in the `Reservoir` implementation in `go.opentelemetry.io/otel/sdk/metric/exemplar`, where storing the full `context.Context` pinned large objects such as gRPC transport buffers. (#8389) - Prevent a non-empty attribute set whose computed hash is zero from collapsing to an empty set in `go.opentelemetry.io/otel/attribute`. (#8402) - Fix histogram data point reuse in `go.opentelemetry.io/otel/sdk/metric` aggregation to avoid leaking stale sum, minimum, and maximum values when they are disabled in subsequent collections. (#8403) - Avoid preallocating scope attributes when they are disabled in `go.opentelemetry.io/otel/exporters/prometheus`. (#8404) - Support HTTP-date values in the HTTP `Retry-After` header when retrying OTLP HTTP exports in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, and `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#8417) - Reduce histogram heap allocations by reusing `BucketCounts` and `Exemplars` slices across `Collect` cycles in the cumulative histogram aggregation in `go.opentelemetry.io/otel/sdk/metric`. (#8428) - Fix `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` self-observability to record `error.type` on the operation-duration histogram when the `exportedSpans` metric is disabled. (#8432) - Stop including trace exporter endpoint configuration in internal logs from `go.opentelemetry.io/otel/sdk/trace`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, and `go.opentelemetry.io/otel/exporters/zipkin`. (#8438) - Fix invalid error formatting for out-of-range JSON code values in `go.opentelemetry.io/otel/codes`. (#8497) - Clarify in `go.opentelemetry.io/otel/log` that `Logger.Enabled` should be checked for every log emission because its result may change over time. (#8565) - Preserve user-provided exception attributes while independently deriving missing exception message and type attributes in `go.opentelemetry.io/otel/sdk/log`. (#8566) - Make `WithAttributeCountLimit(0)` and `OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT=0` discard all log record attributes in `go.opentelemetry.io/otel/sdk/log`. (#8570) - Clarify that the `Record` methods of `Float64Histogram` and `Int64Histogram` in `go.opentelemetry.io/otel/metric` expect non-negative values. (#8574) - Clarify in `go.opentelemetry.io/otel/log` that `LoggerProvider` implementations should retain an empty `Logger` name instead of replacing it with a default. (#8587) - Ensure that the built-in processors in `go.opentelemetry.io/otel/sdk/log` call exporter `ForceFlush` during `Shutdown`. (#8599) - Prevent panics in `go.opentelemetry.io/otel/bridge/opentracing` when OpenTracing baggage is propagated concurrently with `Span.SetBaggageItem`. ([GHSA-42cj-99w8-cp2p](GHSA-42cj-99w8-cp2p)) - Prevent processor operations in `go.opentelemetry.io/otel/sdk/log` from overlapping with processor shutdown or running after `LoggerProvider` shutdown. (#8608) - Prevent `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` from busy-spinning under exporter backpressure and serialize dequeue, export, force-flush, and shutdown work in one worker. (#8620) - Make `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` return errors encountered while draining records during `ForceFlush` and `Shutdown`, while continuing to attempt later batches as long as the request context remains valid. (#8620) - Keep the default `BatchProcessor` maximum export batch size in `go.opentelemetry.io/otel/sdk/log` at or below the configured maximum queue size. (#8620)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #8465
Relevant upstream v1.42.0 release notes:
This PR also:
go.opentelemetry.io/otel/semconv/v1.42.0packagego.opentelemetry.io/otel/semconv/v1.42.0GenAI note:
Upstream semantic-conventions v1.42.0 deprecates the core GenAI, MCP, and OpenAI definitions after moving them to https://github.com/open-telemetry/semantic-conventions-genai. Since Go's generated semconv packages exclude deprecated conventions,
semconv/v1.42.0removes those declarations. The separate GenAI package and schema URL design still has open questions for Go, especially package discovery, version pairing with core semconv, and which schema URL instrumentation should use when emitting mixed GenAI and core attributes. That follow-up is being discussed in open-telemetry/semantic-conventions-genai#247.