Skip to content

chore(deps): bump go.opentelemetry.io/otel/sdk from 1.37.0 to 1.40.0#205

Merged
blue4209211 merged 1 commit into
mainfrom
dependabot/go_modules/go.opentelemetry.io/otel/sdk-1.40.0
Mar 7, 2026
Merged

chore(deps): bump go.opentelemetry.io/otel/sdk from 1.37.0 to 1.40.0#205
blue4209211 merged 1 commit into
mainfrom
dependabot/go_modules/go.opentelemetry.io/otel/sdk-1.40.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Mar 1, 2026

Copy link
Copy Markdown
Contributor

Bumps go.opentelemetry.io/otel/sdk from 1.37.0 to 1.40.0.

Changelog

Sourced from go.opentelemetry.io/otel/sdk's changelog.

[1.40.0/0.62.0/0.16.0] 2026-02-02

Added

  • Add AlwaysRecord sampler in go.opentelemetry.io/otel/sdk/trace. (#7724)
  • Add Enabled method to all synchronous instrument interfaces (Float64Counter, Float64UpDownCounter, Float64Histogram, Float64Gauge, Int64Counter, Int64UpDownCounter, Int64Histogram, Int64Gauge,) in go.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)
  • Add go.opentelemetry.io/otel/semconv/v1.39.0 package. The package contains semantic conventions from the v1.39.0 version 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

  • Improve the concurrent performance of HistogramReservoir in go.opentelemetry.io/otel/sdk/metric/exemplar by 4x. (#7443)
  • Improve the concurrent performance of FixedSizeReservoir in go.opentelemetry.io/otel/sdk/metric/exemplar. (#7447)
  • Improve performance of concurrent histogram measurements in go.opentelemetry.io/otel/sdk/metric. (#7474)
  • Improve performance of concurrent synchronous gauge measurements in go.opentelemetry.io/otel/sdk/metric. (#7478)
  • Add experimental observability metrics in go.opentelemetry.io/otel/exporters/stdout/stdoutmetric. (#7492)
  • Exporter in go.opentelemetry.io/otel/exporters/prometheus ignores metrics with the scope go.opentelemetry.io/contrib/bridges/prometheus. This prevents scrape failures when the Prometheus exporter is misconfigured to get data from the Prometheus bridge. (#7688)
  • Improve performance of concurrent exponential histogram measurements in go.opentelemetry.io/otel/sdk/metric. (#7702)
  • The rpc.grpc.status_code attribute in the experimental metrics emitted from go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc is replaced with the rpc.response.status_code attribute to align with the semantic conventions. (#7854)
  • The rpc.grpc.status_code attribute in the experimental metrics emitted from go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc is replaced with the rpc.response.status_code attribute to align with the semantic conventions. (#7854)

Fixed

  • Fix bad log message when key-value pairs are dropped because of key duplication in go.opentelemetry.io/otel/sdk/log. (#7662)
  • Fix DroppedAttributes on Record in go.opentelemetry.io/otel/sdk/log to not count the non-attribute key-value pairs dropped because of key duplication. (#7662)
  • Fix SetAttributes on Record in go.opentelemetry.io/otel/sdk/log to not log that attributes are dropped when they are actually not dropped. (#7662)
  • Fix missing request.GetBody in go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp to correctly handle HTTP/2 GOAWAY frame. (#7794)
  • WithHostID detector in go.opentelemetry.io/otel/sdk/resource to use full path for ioreg command on Darwin (macOS). (#7818)

Deprecated

[1.39.0/0.61.0/0.15.0/0.0.14] 2025-12-05

Added

  • Greatly reduce the cost of recording metrics in go.opentelemetry.io/otel/sdk/metric using hashing for map keys. (#7175)
  • Add WithInstrumentationAttributeSet option to go.opentelemetry.io/otel/log, go.opentelemetry.io/otel/metric, and go.opentelemetry.io/otel/trace packages. This provides a concurrent-safe and performant alternative to WithInstrumentationAttributes by accepting a pre-constructed attribute.Set. (#7287)
  • Add experimental observability for the Prometheus exporter in go.opentelemetry.io/otel/exporters/prometheus. Check the go.opentelemetry.io/otel/exporters/prometheus/internal/x package documentation for more information. (#7345)
  • Add experimental observability metrics in go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc. (#7353)
  • Add temporality selector functions DeltaTemporalitySelector, CumulativeTemporalitySelector, LowMemoryTemporalitySelector to go.opentelemetry.io/otel/sdk/metric. (#7434)
  • Add experimental observability metrics for simple log processor in go.opentelemetry.io/otel/sdk/log. (#7548)
  • Add experimental observability metrics in go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc. (#7459)

... (truncated)

Commits
  • a3a5317 Release v1.40.0 (#7859)
  • 77785da chore(deps): update github/codeql-action action to v4.32.1 (#7858)
  • 56fa1c2 chore(deps): update module github.com/clipperhouse/uax29/v2 to v2.5.0 (#7857)
  • 298cbed Upgrade semconv use to v1.39.0 (#7854)
  • 3264bf1 refactor: modernize code (#7850)
  • fd5d030 chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.27...
  • 8d3b4cb chore(deps): update actions/cache action to v5.0.3 (#7847)
  • 91f7cad chore(deps): update github.com/timakin/bodyclose digest to 73d1f95 (#7845)
  • fdad1eb chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.27...
  • c46d3ba chore(deps): update golang.org/x/telemetry digest to fcf36f6 (#7843)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.37.0 to 1.40.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-go@v1.37.0...v1.40.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.40.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update go code labels Mar 1, 2026
@blue4209211 blue4209211 merged commit e73795a into main Mar 7, 2026
1 check passed
@blue4209211 blue4209211 deleted the dependabot/go_modules/go.opentelemetry.io/otel/sdk-1.40.0 branch March 7, 2026 10:39
mayankpande88 added a commit that referenced this pull request Mar 8, 2026
* fix: reduce memory usage, fix race conditions, and prevent corrupted eBPF spans (#206)

* fix: add missing patternsPerLevelLimit param to logparser.NewParser calls

* fix: update logparser dep, sanitize log paths, replace test credential

* fix: update logparser dep to fix sensitive pattern loading

The previous version had a corrupted sensitive_patterns.json that caused
"cannot unmarshal object into Go value of type []SensitivePattern" errors,
breaking sensitive data detection in log parsing.

* fix: reduce memory usage, fix race conditions, and fd leaks

Memory optimizations:
- Auto-tune GOMEMLIMIT to 90% of cgroup memory limit
- Reduce connectionStats LRU cache from 8192 to 4096
- Reduce event channel buffer from 10000 to 2000
- Cap ip2fqdn map at 10000 entries
- Reduce label interner max from 10000 to 5000
- Reduce LLM stream limits (maxActiveStreams 1000->200, buffer 1MB->64KB)
- Cache stripped Go binary paths to avoid repeated uprobe attach attempts
- Reduce GC interval from 10min to 5min
- Clean up HTTP/2 HPACK parsers for dead connections in gc()

Race condition fixes in Container.Collect():
- Snapshot connectionStats LRU under RLock (not concurrent-safe)
- Call getListens/getProxiedListens under RLock
- Protect logSamples map reads/writes with lock
- Read restarts/oomKills under RLock
- Read c.processes under RLock in onConnectionOpen before lock scope

File descriptor leak fixes in logs/tail_reader.go:
- Close file on Stat/Seek failure in NewTailReader
- Close old file before setting nil in moved()
- Cap partial line buffer at 64KB to prevent unbounded growth
- Fix prefix accumulation bug (was replacing instead of appending)

* fix: validate eBPF durations to prevent corrupted spans causing OTel OOM

eBPF kernel probes occasionally produce garbage duration values where the
uint64 has the high bit set. Casting to time.Duration (int64) produces
negative durations, creating spans where end_time < start_time. These
poison spans cause ClickHouse batch rejections, OTel collector retry
accumulation, and eventual OOMKill (165 restarts observed).

Source-level fix (eBPF event parsing):
- Add safeDuration() that returns 0 for values >= 1 hour or == 0
- Replace all uint64->time.Duration casts in perf/ringbuf readers

HTTP/2 parser fix:
- Add safeKernelDuration() for kernel timestamp subtraction
- Prevents unsigned underflow when events arrive out of order

Defense-in-depth (span creation):
- createSpan: drop spans with duration <= 0 or > 1 hour
- LLMRequest: drop spans with zero/invalid timestamps or > 1 hour

* fix: address review comments

- Use double-checked locking for logSamples to avoid redundant writes
- Use strconv.ParseInt instead of fmt.Sscanf for stricter cgroup parsing

* fix: gofmt alignment in llm_stream.go

* fix: use debug.SetMemoryLimit instead of runtime.SetMemoryLimit

* chore(deps): bump go.opentelemetry.io/otel/sdk from 1.37.0 to 1.40.0 (#205)

Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.37.0 to 1.40.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-go@v1.37.0...v1.40.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.40.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: resolve IP-based destinations to FQDN via HTTP headers (#215)

* fix: resolve IP-based destinations to FQDN via HTTP headers and eBPF dport extraction

Two complementary fixes for the ip_to_fqdn resolution gap where external
destinations show raw IPs instead of FQDNs in metrics:

1. Go: Use HTTP Host header and HTTP/2 :authority pseudo-header to resolve
   IP-based DestinationKeys to FQDNs when DNS capture fails (due to Go
   goroutine migration breaking pid-based eBPF tracking). Extracts
   migrateConnectionKeyToFQDN helper from migrateConnectionKeyIfNeeded.

2. eBPF: Extract destination port from connect() sockaddr arguments so
   non-TCP connections (UDP DNS) get proper dport in active_connections.
   Previously sys_exit_connect created entries with dport=0 for UDP,
   preventing DNS protocol detection for port 53.

* fix: address review feedback - return ip2fqdn for HTTP/2 and add early return guard

* fix: reduce memory footprint by removing unused labels and shrinking eBPF maps (#217)

* fix: reduce memory footprint by removing unused labels and shrinking eBPF maps

- Remove 7 unused labels from TCP/L7 metrics (src_region, src_az,
  destination_workload_region, destination_workload_az,
  actual_destination_region, actual_destination_az,
  actual_destination_instance). These are derivable server-side via
  container_info joins.
- Reduce MAX_CONNECTIONS from 1M to 100K (saves ~100MB kernel memory)
- Reduce MAX_PAYLOAD_SIZE from 8192 to 4096
- Reduce active_l7_requests max_entries from 8192 to 4096
- Reduce connectionStatsCacheSize from 4096 to 2048

* fix: sync MaxPayloadSize Go constant with eBPF MAX_PAYLOAD_SIZE (4096)

Without this, the Go agent reads L7 response data at the wrong offset,
breaking all L7 protocol monitoring.

* fix: prevent OOMKills by lowering GOMEMLIMIT and reducing memory allocations (#218)

- Lower GOMEMLIMIT from 90% to 60% of cgroup limit. The cgroup OOM
  killer counts kernel memory (~80MB for eBPF maps) and page cache
  (~200MB from /proc reads) which GOMEMLIMIT doesn't control.
- Fix Event struct Payload/Response arrays: use MaxPayloadSize (4096)
  instead of hardcoded 8192. Saves ~16MB in the 2000-entry event
  channel buffer.
- Reduce l7_events ring buffer from 16MB to 8MB. With 4KB payloads,
  8MB still holds ~2000 events.

* fix: detect Go applications on listen events for container_application_type (#216)

attachTlsUprobes (which detects Go binaries via buildinfo) was only
called on outbound connection events. Go servers that only listen for
incoming connections were never detected as golang apps. Add the same
call on ListenOpen events so server-only Go processes are properly
identified.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix: eliminate scrape deadlock, Prometheus wrapping allocs, and K8s informer memory (#219)

* fix: eliminate WrapRegistererWith allocation storm on Prometheus scrapes

Removes the 3-layer WrapRegistererWith wrapping chain for container
metrics that caused ~200MB of transient allocations per scrape on busy
nodes. Container metrics now embed const labels directly, and L7
CounterVec/HistogramVec use ConstLabels on their opts for zero
per-scrape overhead. ip2fqdn and LLM metrics retain minimal wrapping.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use NodeConstLabels struct instead of magic indices, fix variable shadowing

Addresses PR review: replaces []string with named struct fields for
node-level const labels. Also fixes variable shadowing where loop
variable `c` in GetSensitiveCounters range shadowed the Container
receiver, causing a compile error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: reduce K8s informer memory by stripping cached objects and removing redundant API calls

- Add SetTransform functions to all 9 informers to strip unneeded fields
  (ManagedFields, Annotations, Spec.Containers, Status.Conditions, etc.)
  before objects enter the informer cache, reducing memory by ~80%.
- Remove getFullClusterSnapshot() which did redundant List() API calls
  for all resource types at startup (informers already do their own
  initial List). Replace with factory.WaitForCacheSync() + updateIpMapping()
  to eliminate the double-fetch memory spike.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: push-model metrics to eliminate c.lock deadlock on scrapes

Root cause: Collect() held c.lock.RLock() for extended periods while
reading connectionStats, failedConnectionAttempts, activeConnections,
and logSamples. Event handlers (onConnectionOpen, onL7Request, etc.)
need c.lock.Lock() — creating a deadlock when a pending writer blocks
recursive readers. Additionally, Registry.Collect() sent to
trafficStatsUpdateCh (consumed by the event handler goroutine), so if
the event handler was blocked on c.lock.Lock(), Registry.Collect()
blocked too → Gather() never returns → zombie goroutines accumulate.

Changes:
- New TCPMetrics struct (CounterVec/GaugeVec) updated by event handlers
  at event time, not scrape time. Collect() calls tcpMetrics.collect(ch)
  without any c.lock — same pattern as existing L7Stats.
- Remove connectionStats LRU cache (no longer needed for accumulation)
- Remove failedConnectionAttempts map (push directly to CounterVec)
- onConnectionOpen/onRetransmission push metrics before acquiring c.lock
- updateConnectionTrafficStats pushes byte deltas to TCPMetrics
- Active connections gauge refreshed periodically by event handler
- Move updateStatsFromEbpfMapsIfNecessary() from Registry.Collect()
  into event handler ticker — eliminates trafficStatsUpdateCh deadlock
- Remove trafficStatsUpdateCh/nodejsStatsUpdateCh/pythonStatsUpdateCh
  channels — event handler calls container methods directly
- logSamples changed from map[string]string to sync.Map for lock-free
  LoadOrStore (eliminates c.lock.Lock() in Collect for log samples)
- Restarts/OOMKills pushed to TCPMetrics counter at event time

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: use single containerCollector instead of per-container registration

prometheus.Registry.Unregister does not work for unchecked collectors
(empty Describe). It only searches collectorsByID, never the
uncheckedCollectors slice. This meant every container replacement
(process restart within same pod) leaked the old Container object in
the registry — Gather() collected duplicate metrics and returned
HTTP 500.

Register a single containerCollector on the raw registry that iterates
containersById under RLock. Individual container Register/Unregister
calls removed entirely.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Raman Kumar <raman.kharche@nudgebee.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant