chore(deps): update module go.opentelemetry.io/otel/sdk to v1.40.0#28
chore(deps): update module go.opentelemetry.io/otel/sdk to v1.40.0#28EpochBoy wants to merge 6 commits into
Conversation
Added:
- github.com/rabbitmq/amqp091-go client library
- /rabbitmq/status endpoint - connection status + consumed messages
- /rabbitmq/publish endpoint - publish messages (GET or POST)
- Background consumer goroutine for demo queue
- Prometheus metrics: epochcloud_rabbitmq_{messages_published,messages_consumed,publish_errors,connected}_total
- HTML template: RabbitMQ Demo section
Features:
- Graceful handling when RabbitMQ not configured (optional)
- Auto-ack consumer with last 10 messages stored
- Trace ID correlation in messages
- OpenTelemetry spans for all RabbitMQ operations
Env vars (optional):
- RABBITMQ_HOST, RABBITMQ_PORT, RABBITMQ_USERNAME
- RABBITMQ_PASSWORD, RABBITMQ_VHOST, RABBITMQ_URI, RABBITMQ_QUEUE
The app now runs a background connection manager that: - Retries connection with exponential backoff (1s to 30s) - Automatically reconnects when connection is lost - Uses NotifyClose to detect connection drops - Non-blocking startup (app starts immediately, connects when RabbitMQ is ready) This makes the app resilient to RabbitMQ being unavailable at startup.
When CONSUMER_MODE=true: - Only consumes messages from RabbitMQ queue - HTTP server runs minimal endpoints (/health, /metrics only) - No /rabbitmq/publish or other producer endpoints This enables: - Separate consumer pods scaled by KEDA based on queue depth - Producer pods that only publish (don't consume own messages) - True microservices pub/sub pattern demonstration
Valkey may not be ready immediately during pod startup, especially with Linkerd mTLS. Added retry logic (5 attempts, exponential backoff 1s→16s) to handle transient connection failures.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenTelemetry SDK module from v1.35.0 to v1.40.0, spanning 5 minor version bumps. The update includes performance improvements, new features like the Enabled method for synchronous instruments, and various bug fixes.
Changes:
- Updates
go.opentelemetry.io/otel/sdkfrom v1.35.0 to v1.40.0
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| go.opentelemetry.io/otel v1.35.0 | ||
| go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.35.0 | ||
| go.opentelemetry.io/otel/sdk v1.35.0 | ||
| go.opentelemetry.io/otel/sdk v1.40.0 |
There was a problem hiding this comment.
This PR only updates the SDK package to v1.40.0, but other OpenTelemetry packages remain at v1.35.0 (lines 9, 10, 12, 31, 32). This creates a version mismatch across the OpenTelemetry ecosystem which may lead to compatibility issues.
When updating OpenTelemetry SDK, it's recommended to update all related packages to compatible versions to ensure proper interoperability. According to the release notes, v1.40.0 includes changes across multiple packages including:
- go.opentelemetry.io/otel
- go.opentelemetry.io/otel/trace
- go.opentelemetry.io/otel/metric
- go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc
Consider updating all OpenTelemetry dependencies to v1.40.0 or compatible versions in a coordinated manner to avoid potential runtime issues or incompatibilities between packages.
This PR contains the following updates:
v1.35.0→v1.40.0Release Notes
open-telemetry/opentelemetry-go (go.opentelemetry.io/otel/sdk)
v1.40.0: /v0.62.0/v0.16.0Compare Source
Overview
Added
Enabledmethod to all synchronous instrument interfaces (Float64Counter,Float64UpDownCounter,Float64Histogram,Float64Gauge,Int64Counter,Int64UpDownCounter,Int64Histogram,Int64Gauge,) ingo.opentelemetry.io/otel/metric. This stabilizes the synchronous instrument enabled feature, allowing users to check if an instrument will process measurements before performing computationally expensive operations. (#7763)AlwaysRecordsampler ingo.opentelemetry.io/otel/sdk/trace. (#7724)go.opentelemetry.io/otel/semconv/v1.39.0package. The package contains semantic conventions from thev1.39.0version of the OpenTelemetry Semantic Conventions. See the migration documentation for information on how to upgrade fromgo.opentelemetry.io/otel/semconv/v1.38.0.(#7783, #7789)Changed
Exporteringo.opentelemetry.io/otel/exporters/prometheusignores metrics with the scopego.opentelemetry.io/contrib/bridges/prometheus. This prevents scrape failures when the Prometheus exporter is misconfigured to get data from the Prometheus bridge. (#7688)go.opentelemetry.io/otel/sdk/metric. (#7474)go.opentelemetry.io/otel/exporters/stdout/stdoutmetric. (#7492)HistogramReservoiringo.opentelemetry.io/otel/sdk/metric/exemplarby 4x. (#7443)go.opentelemetry.io/otel/sdk/metric. (#7478)go.opentelemetry.io/otel/sdk/metric. (#7702)FixedSizeReservoiringo.opentelemetry.io/otel/sdk/metric/exemplar. (#7447)rpc.grpc.status_codeattribute in the experimental metrics emitted fromgo.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpcis replaced with therpc.response.status_codeattribute to align with the semantic conventions. (#7854)rpc.grpc.status_codeattribute in the experimental metrics emitted fromgo.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpcis replaced with therpc.response.status_codeattribute to align with the semantic conventions. (#7854)Fixed
go.opentelemetry.io/otel/sdk/log. (#7662)DroppedAttributesonRecordingo.opentelemetry.io/otel/sdk/logto not count the non-attribute key-value pairs dropped because of key duplication. (#7662)SetAttributesonRecordingo.opentelemetry.io/otel/sdk/logto not log that attributes are dropped when they are actually not dropped. (#7662)WithHostIDdetector ingo.opentelemetry.io/otel/sdk/resourceto use full path forioregcommand on Darwin (macOS). (#7818)request.GetBodyingo.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttpto correctly handle HTTP2 GOAWAY frame. (#7794)Deprecated
go.opentelemetry.io/otel/exporters/zipkin. For more information, see the OTel blog post deprecating the Zipkin exporter. (#7670)What's Changed
8475f28by @renovate[bot] in #7692b6eea26by @renovate[bot] in #769497cd9d5by @renovate[bot] in #7708e75fd47by @renovate[bot] in #77102adc8cfby @renovate[bot] in #77257004b74by @renovate[bot] in #7727e0dd3ddby @renovate[bot] in #7732944ab1fby @renovate[bot] in #77330a764e5by @renovate[bot] in #77403f2a21fby @renovate[bot] in #7739TestEmitinattributeby @itssaharsh in #7751492b5bcby @renovate[bot] in #775919053a8by @renovate[bot] in #7760AlwaysRecordsampler by @vitorvasc in #772499fd39fby @renovate[bot] in #77743f89685by @renovate[bot] in #7785c6413dcby @renovate[bot] in #7795b8f7ae3by @renovate[bot] in #7819e5a2b31by @renovate[bot] in #78218e98ce8by @renovate[bot] in #7829d11affdby @renovate[bot] in #783858372ceby @renovate[bot] in #78398636f87by @renovate[bot] in #7841fcf36f6by @renovate[bot] in #784373d1f95by @renovate[bot] in #7845New Contributors
Full Changelog: open-telemetry/opentelemetry-go@v1.39.0...v1.40.0
v1.39.0Compare Source
Added
AlwaysRecordsampler ingo.opentelemetry.io/otel/sdk/trace. (#7724)Enabledmethod to all synchronous instrument interfaces (Float64Counter,Float64UpDownCounter,Float64Histogram,Float64Gauge,Int64Counter,Int64UpDownCounter,Int64Histogram,Int64Gauge,) ingo.opentelemetry.io/otel/metric.This stabilizes the synchronous instrument enabled feature, allowing users to check if an instrument will process measurements before performing computationally expensive operations. (#7763)
go.opentelemetry.io/otel/semconv/v1.39.0package.The package contains semantic conventions from the
v1.39.0version of the OpenTelemetry Semantic Conventions.See the migration documentation for information on how to upgrade from
go.opentelemetry.io/otel/semconv/v1.38.0.(#7783, #7789)Changed
HistogramReservoiringo.opentelemetry.io/otel/sdk/metric/exemplarby 4x. (#7443)FixedSizeReservoiringo.opentelemetry.io/otel/sdk/metric/exemplar. (#7447)go.opentelemetry.io/otel/sdk/metric. (#7474)go.opentelemetry.io/otel/sdk/metric. (#7478)go.opentelemetry.io/otel/exporters/stdout/stdoutmetric. (#7492)Exporteringo.opentelemetry.io/otel/exporters/prometheusignores metrics with the scopego.opentelemetry.io/contrib/bridges/prometheus.This prevents scrape failures when the Prometheus exporter is misconfigured to get data from the Prometheus bridge. (#7688)
go.opentelemetry.io/otel/sdk/metric. (#7702)rpc.grpc.status_codeattribute in the experimental metrics emitted fromgo.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpcis replaced with therpc.response.status_codeattribute to align with the semantic conventions. (#7854)rpc.grpc.status_codeattribute in the experimental metrics emitted fromgo.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpcis replaced with therpc.response.status_codeattribute to align with the semantic conventions. (#7854)Fixed
go.opentelemetry.io/otel/sdk/log. (#7662)DroppedAttributesonRecordingo.opentelemetry.io/otel/sdk/logto not count the non-attribute key-value pairs dropped because of key duplication. (#7662)SetAttributesonRecordingo.opentelemetry.io/otel/sdk/logto not log that attributes are dropped when they are actually not dropped. (#7662)request.GetBodyingo.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttpto correctly handle HTTP/2GOAWAYframe. (#7794)WithHostIDdetector ingo.opentelemetry.io/otel/sdk/resourceto use full path forioregcommand on Darwin (macOS). (#7818)Deprecated
go.opentelemetry.io/otel/exporters/zipkin.For more information, see the OTel blog post deprecating the Zipkin exporter. (#7670)
v1.38.0Compare Source
Added
AlwaysRecordsampler ingo.opentelemetry.io/otel/sdk/trace. (#7724)Enabledmethod to all synchronous instrument interfaces (Float64Counter,Float64UpDownCounter,Float64Histogram,Float64Gauge,Int64Counter,Int64UpDownCounter,Int64Histogram,Int64Gauge,) ingo.opentelemetry.io/otel/metric.This stabilizes the synchronous instrument enabled feature, allowing users to check if an instrument will process measurements before performing computationally expensive operations. (#7763)
go.opentelemetry.io/otel/semconv/v1.39.0package.The package contains semantic conventions from the
v1.39.0version of the OpenTelemetry Semantic Conventions.See the migration documentation for information on how to upgrade from
go.opentelemetry.io/otel/semconv/v1.38.0.(#7783, #7789)Changed
HistogramReservoiringo.opentelemetry.io/otel/sdk/metric/exemplarby 4x. (#7443)FixedSizeReservoiringo.opentelemetry.io/otel/sdk/metric/exemplar. (#7447)go.opentelemetry.io/otel/sdk/metric. (#7474)go.opentelemetry.io/otel/sdk/metric. (#7478)go.opentelemetry.io/otel/exporters/stdout/stdoutmetric. (#7492)Exporteringo.opentelemetry.io/otel/exporters/prometheusignores metrics with the scopego.opentelemetry.io/contrib/bridges/prometheus.This prevents scrape failures when the Prometheus exporter is misconfigured to get data from the Prometheus bridge. (#7688)
go.opentelemetry.io/otel/sdk/metric. (#7702)rpc.grpc.status_codeattribute in the experimental metrics emitted fromgo.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpcis replaced with therpc.response.status_codeattribute to align with the semantic conventions. (#7854)rpc.grpc.status_codeattribute in the experimental metrics emitted fromgo.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpcis replaced with therpc.response.status_codeattribute to align with the semantic conventions. (#7854)Fixed
go.opentelemetry.io/otel/sdk/log. (#7662)DroppedAttributesonRecordingo.opentelemetry.io/otel/sdk/logto not count the non-attribute key-value pairs dropped because of key duplication. (#7662)SetAttributesonRecordingo.opentelemetry.io/otel/sdk/logto not log that attributes are dropped when they are actually not dropped. (#7662)request.GetBodyingo.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttpto correctly handle HTTP/2GOAWAYframe. (#7794)WithHostIDdetector ingo.opentelemetry.io/otel/sdk/resourceto use full path forioregcommand on Darwin (macOS). (#7818)Deprecated
go.opentelemetry.io/otel/exporters/zipkin.For more information, see the OTel blog post deprecating the Zipkin exporter. (#7670)
v1.37.0Compare Source
Added
go.opentelemetry.io/otel/sdk/metricusing hashing for map keys. (#7175)WithInstrumentationAttributeSetoption togo.opentelemetry.io/otel/log,go.opentelemetry.io/otel/metric, andgo.opentelemetry.io/otel/tracepackages.This provides a concurrent-safe and performant alternative to
WithInstrumentationAttributesby accepting a pre-constructedattribute.Set. (#7287)go.opentelemetry.io/otel/exporters/prometheus.Check the
go.opentelemetry.io/otel/exporters/prometheus/internal/xpackage documentation for more information. (#7345)go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc. (#7353)DeltaTemporalitySelector,CumulativeTemporalitySelector,LowMemoryTemporalitySelectortogo.opentelemetry.io/otel/sdk/metric. (#7434)go.opentelemetry.io/otel/sdk/log. (#7548)go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc. (#7459)go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp. (#7486)go.opentelemetry.io/otel/sdk/trace. (#7374)go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp. (#7512)go.opentelemetry.io/otel/sdk/metric. (#7524)go.opentelemetry.io/otel/sdk/metric. (#7571)OTEL_EXPORTER_OTLP_LOGS_INSECUREandOTEL_EXPORTER_OTLP_INSECUREenvironmental variables ingo.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp. (#7608)Enabledmethod to theProcessorinterface ingo.opentelemetry.io/otel/sdk/log.All
Processorimplementations now include anEnabledmethod. (#7639)go.opentelemetry.io/otel/semconv/v1.38.0package.The package contains semantic conventions from the
v1.38.0version of the OpenTelemetry Semantic Conventions.See the migration documentation for information on how to upgrade from
go.opentelemetry.io/otel/semconv/v1.37.0.(#7648)Changed
Distinctingo.opentelemetry.io/otel/attributeis no longer guaranteed to uniquely identify an attribute set.Collisions between
Distinctvalues for different Sets are possible with extremely high cardinality (billions of series per instrument), but are highly unlikely. (#7175)WithInstrumentationAttributesingo.opentelemetry.io/otel/tracesynchronously de-duplicates the passed attributes instead of delegating it to the returnedTracerOption. (#7266)WithInstrumentationAttributesingo.opentelemetry.io/otel/metersynchronously de-duplicates the passed attributes instead of delegating it to the returnedMeterOption. (#7266)WithInstrumentationAttributesingo.opentelemetry.io/otel/logsynchronously de-duplicates the passed attributes instead of delegating it to the returnedLoggerOption. (#7266)OTEL_GO_X_SELF_OBSERVABILITYenvironment variable toOTEL_GO_X_OBSERVABILITYingo.opentelemetry.io/otel/sdk/trace,go.opentelemetry.io/otel/sdk/log, andgo.opentelemetry.io/otel/exporters/stdout/stdouttrace. (#7302)Recordingo.opentelemetry.io/otel/sdk/metricwhen min and max are disabled usingNoMinMax. (#7306)prometheus.NewInvalidMetricingo.opentelemetry.io/otel/exporters/prometheus.Now, when translation would drop data (e.g., invalid label/value), the exporter emits a
NewInvalidMetric, and Prometheus scrapes fail with HTTP 500 by default.To preserve the prior behavior (scrapes succeed while errors are logged), configure your Prometheus HTTP handler with:
promhttp.HandlerOpts{ ErrorHandling: promhttp.ContinueOnError }. (#7363)go.opentelemetry.io/otel/attributefor better performance. (#7371)TranslationStrategyingo.opentelemetry.io/exporters/prometheusis changed fromotlptranslator.NoUTF8EscapingWithSuffixestootlptranslator.UnderscoreEscapingWithSuffixes. (#7421)go.opentelemetry.io/otel/sdk/metric. (#7427)Span.Flagsfield ingo.opentelemetry.io/exporters/otlp/otlptrace/otlptracehttpandgo.opentelemetry.io/exporters/otlp/otlptrace/otlptracegrpc. (#7438)ErrorTypefunction ingo.opentelemetry.io/otel/semconv/v1.37.0now handles custom error types.If an error implements an
ErrorType() stringmethod, the return value of that method will be used as the error type. (#7442)Fixed
WithInstrumentationAttributesoptions ingo.opentelemetry.io/otel/trace,go.opentelemetry.io/otel/metric, andgo.opentelemetry.io/otel/logto properly merge attributes when passed multiple times instead of replacing them.Attributes with duplicate keys will use the last value passed. (#7300)
attribute.Setwhen using theEqualmethod is not affected by the user overriding the empty set pointed to byattribute.EmptySetingo.opentelemetry.io/otel/attribute. (#7357)go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc. (#7372)go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp. (#7372)go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc. (#7372)go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp. (#7372)go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc. (#7372)go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp. (#7372)AddAttributes,SetAttributes,SetBodyonRecordingo.opentelemetry.io/otel/sdk/logto not mutate input. (#7403)RecordSetmethods ingo.opentelemetry.io/otel/semconv/v1.37.0. (#7655)RecordSetmethods ingo.opentelemetry.io/otel/semconv/v1.36.0. (#7656)Removed
FilterProcessorinterface ingo.opentelemetry.io/otel/sdk/log.The
Enabledmethod has been added to theProcessorinterface instead.All
Processorimplementations must now implement theEnabledmethod.Custom processors that do not filter records can implement
Enabledto returntrue. (#7639)v1.36.0Compare Source
Added
go.opentelemetry.io/otel/sdk/metricusing hashing for map keys. (#7175)WithInstrumentationAttributeSetoption togo.opentelemetry.io/otel/log,go.opentelemetry.io/otel/metric, andgo.opentelemetry.io/otel/tracepackages.This provides a concurrent-safe and performant alternative to
WithInstrumentationAttributesby accepting a pre-constructedattribute.Set. (#7287)go.opentelemetry.io/otel/exporters/prometheus.Check the
go.opentelemetry.io/otel/exporters/prometheus/internal/xpackage documentation for more information. (#7345)go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc. (#7353)DeltaTemporalitySelector,CumulativeTemporalitySelector,LowMemoryTemporalitySelectortogo.opentelemetry.io/otel/sdk/metric. (#7434)go.opentelemetry.io/otel/sdk/log. (#7548)go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc. (#7459)go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp. (#7486)go.opentelemetry.io/otel/sdk/trace. (#7374)go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp. (#7512)go.opentelemetry.io/otel/sdk/metric. (#7524)go.opentelemetry.io/otel/sdk/metric. (#7571)OTEL_EXPORTER_OTLP_LOGS_INSECUREandOTEL_EXPORTER_OTLP_INSECUREenvironmental variables ingo.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp. (#7608)Enabledmethod to theProcessorinterface ingo.opentelemetry.io/otel/sdk/log.All
Processorimplementations now include anEnabledmethod. (#7639)go.opentelemetry.io/otel/semconv/v1.38.0package.The package contains semantic conventions from the
v1.38.0version of the OpenTelemetry Semantic Conventions.See the migration documentation for information on how to upgrade from
go.opentelemetry.io/otel/semconv/v1.37.0.([#7648](https://redirect.github.com/open-telemetry/opentelemetry-go/issuConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.