Skip to content

security(deps): upgrade otel log sdk to v0.21.0 - #4047

Merged
mdelapenya merged 1 commit into
testcontainers:mainfrom
mdelapenya:codex/security-otel-log-0.21.0
Oct 20, 2026
Merged

mdelapenya merged 1 commit into
testcontainers:mainfrom
mdelapenya:codex/security-otel-log-0.21.0

Conversation

@mdelapenya

Copy link
Copy Markdown
Member

What does this PR do?

Upgrade the Grafana LGTM module's OpenTelemetry log SDK and API from v0.20.0 to v0.21.0. Also upgrade the OTLP HTTP log exporter to v0.21.0 and the otelslog bridge to v0.20.0, which support the updated log API's attribute types.

Changes are limited to modules/grafana-lgtm/go.mod and go.sum.

Why is it important?

Fixes GHSA-hjf4-fphr-2h65 (CVE-2026-81872): the log batch processor can busy-spin and exhaust CPU when export buffers are full. The Grafana LGTM example uses NewBatchProcessor.

Related issues

How to test this PR

Passed locally from modules/grafana-lgtm:

make generate
go mod tidy -diff
go mod verify
golangci-lint run --timeout=5m
# Compile module tests and examples without starting containers.
go test -race -count=1 -run='^$' ./...
# Run the upstream SDK, bridge, and exporter tests against this dependency graph.
go test -race -count=1 -timeout=5m \
  go.opentelemetry.io/otel/sdk/log \
  go.opentelemetry.io/contrib/bridges/otelslog \
  go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp

Docker integration tests are left to CI's AMD64 runner: the pinned grafana/otel-lgtm:0.6.0 image is AMD64-only and fails with exec format error on the local ARM64 Docker host. CI selects only modules/grafana-lgtm for this diff.

@mdelapenya
mdelapenya requested a review from a team as a code owner October 20, 2026 15:28
@mdelapenya mdelapenya added dependencies Dependencies or external services security Vulnerabilities in dependencies or in the library itself labels Oct 20, 2026
@netlify

netlify Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit b0ad115
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-go/deploys/6ad788af47eb60d0bd76326a
😎 Deploy Preview https://deploy-preview-4047--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6dab26b6-e21c-4874-8840-c103ba7ea08f
📥 Commits

Reviewing files that changed from the base of the PR and between 85fcc91 and b0ad115.

⛔ Files ignored due to path filters: 1
  • modules/grafana-lgtm/go.sum is excluded by !**/*.sum
📒 Files selected for processing: 1
  • modules/grafana-lgtm/go.mod

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Summary by CodeRabbit

  • Chores
    • Updated OpenTelemetry logging components to newer versions.
    • No user-facing functionality changes.

Walkthrough

Four OpenTelemetry logging dependencies in the Grafana LGTM module were updated. The logging bridge moved from v0.19.0 to v0.20.0. The OTLP log exporter, OpenTelemetry log API, and SDK log modules moved from v0.20.0 to v0.21.0.

Changes

OpenTelemetry logging dependencies

Layer / File(s) Summary
Update logging module versions
modules/grafana-lgtm/go.mod
The logging bridge, OTLP log exporter, OpenTelemetry log API, and SDK log modules now use the updated versions. Other dependencies remain unchanged.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Suggested reviewers: stevenh

Merge Risk: ⚪ Minimal · up to b0ad1

The dependency upgrades present no identified merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the OpenTelemetry log SDK upgrade to v0.21.0 and relates directly to the main dependency changes.
Description check Passed The description accurately explains the dependency upgrades, security fix, affected files, testing, and CI limitation.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit checks the versions in a row,
Four logging modules get a lift to go.
The bridge hops up, the exporters too,
The API and SDK join the queue.
The other modules stay right where they’ve been,
Then off through the meadow, neat and green.

Comment @coderabbitai help to get the list of available commands.

@mdelapenya
mdelapenya merged commit c5e1b30 into testcontainers:main Oct 20, 2026
18 checks passed
@mdelapenya
mdelapenya deleted the codex/security-otel-log-0.21.0 branch October 20, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependencies or external services security Vulnerabilities in dependencies or in the library itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant