fix(tracing): persist trimmed endpoint and treat null/nil baggage as empty#25
Merged
qnen merged 1 commit intoJun 16, 2026
Merged
Conversation
…empty - normalizeEndpoint: persist trimmed value back to cfg.CollectorExporterEndpoint in the default (no-scheme) branch so surrounding whitespace is dropped. - sanitizeTenantFromBaggage: treat literal "null"/"nil" (case-insensitive) as empty, mirroring the middleware tenant-sanitization path. Addresses CodeRabbit review comments on PR #19. Requested-by: @qnen
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughTwo defensive fixes in the tracing package: ChangesTracing Input Sanitization
Comment |
Contributor
🔒 Security Scan Results —
|
| Stage | Status | Blocking? |
|---|---|---|
| Filesystem Scan | ✅ Clean | — |
| Docker Image Scan | ➖ Skipped | — |
| Docker Hub Health Score | ➖ Skipped | — |
| Pre-release Version Check | ✅ Clean | — |
Trivy
Filesystem Scan
✅ No vulnerabilities or secrets found.
Pre-release Version Check
✅ No unstable version pins found.
qnen
marked this pull request as ready for review
June 16, 2026 14:17
qnen
approved these changes
Jun 16, 2026
Contributor
🔍 PR Validation Summary✅ PR Mergeable — no blocking failures
|
Contributor
📊 Unit Test Coverage Report:
|
| Metric | Value |
|---|---|
| Overall Coverage | 85.7% ✅ PASS |
| Threshold | 80% |
Coverage by Package
| Package | Coverage |
|---|---|
github.com/LerianStudio/lib-observability/assert |
97.9% |
github.com/LerianStudio/lib-observability/constants |
83.3% |
github.com/LerianStudio/lib-observability/log |
94.9% |
github.com/LerianStudio/lib-observability/metrics |
91.4% |
github.com/LerianStudio/lib-observability/middleware |
76.9% |
github.com/LerianStudio/lib-observability/redaction |
95.8% |
github.com/LerianStudio/lib-observability/runtime |
80.4% |
github.com/LerianStudio/lib-observability/tracing |
84.8% |
github.com/LerianStudio/lib-observability/zap |
96.0% |
github.com/LerianStudio/lib-observability |
91.5% |
Generated by Go PR Analysis workflow
github-actions
Bot
deleted the
fix/coderabbit-otel-normalizeendpoint-sanitize-tenant
branch
June 16, 2026 14:24
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.
Summary
Applies two approved CodeRabbit review fixes from PR #19.
Fix #1 —
tracing/otel.go·normalizeEndpointIn the
default(no-scheme) branch, the trimmed endpoint value (ep) was only held in a local variable;cfg.CollectorExporterEndpointretained the original value with surrounding whitespace. Now persists the trimmed value back into the config.Fix #2 —
tracing/processor.go·sanitizeTenantFromBaggageTreats literal
"null"/"nil"(case-insensitive, viastrings.EqualFold) as empty, mirroring the middleware tenant-sanitization path and preventing JSON-null serialization artifacts from leaking into spantenant.id.Verification
go build ./...— OKgo test -tags unit ./...— all packages passReferences
Addresses CodeRabbit review comments on PR #19.