feat(contrib/zap): add log/trace correlation for uber-go/zap#4781
feat(contrib/zap): add log/trace correlation for uber-go/zap#4781darccio wants to merge 15 commits into
Conversation
Add PackageGoUberOrgZap constant and PackageInfo entry to prepare for the upcoming uber-go/zap logging contrib integration.
Add contrib/go.uber.org/zap with a TraceFields helper that extracts
Datadog trace and span IDs from context and returns them as zap fields.
Supports both 128-bit and 64-bit trace ID formats.
Usage: logger.Info("msg", ddzap.TraceFields(ctx)...)
Add go.uber.org/zap to the contribIntegrations map in tracer/option.go so it shows up in startup diagnostics. Also add the package to supported_integrations.md and update go.work.sum.
Adds an orchestrion.yml that marks go.uber.org/zap as imported when Orchestrion auto-instrumentation is active. Full automatic context injection isn't possible since zap's zapcore.Core.Write() doesn't accept context.Context, but integration discovery is handled.
Was failing CI jobs, after reading through their logs I think I need to set the integration count (56 → 57) and register DD_TRACE_ZAP_ANALYTICS_ENABLED as a supported config
…g-correlation # Conflicts: # go.work.sum
…o v0.15.0 from feedback from failing CI check-modules
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 308415e | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-05-19 09:06:00 Comparing candidate commit 308415e in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 273 metrics, 2 unstable metrics, 1 flaky benchmarks without significant changes.
|
|
Superseded by #4729 (includes orchestrion support) |
What does this PR do?
Clones #4610 to validate the PR's CI.
Motivation
Current security hardening policies don't allow to run workflows on external contributor PRs.
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!