feat(contrib): add twmb/franz-go integration#4250
feat(contrib): add twmb/franz-go integration#4250gh-worker-dd-mergequeue-cf854d[bot] merged 134 commits into
Conversation
BenchmarksBenchmark execution time: 2026-04-23 13:46:48 Comparing candidate commit e208912 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 271 metrics, 7 unstable metrics.
|
53976be to
1d2f77e
Compare
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: e208912 | Docs | Datadog PR Page | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 97fc6d7ed4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for i, h := range c.record.Headers { | ||
| if h.Key == key { | ||
| c.record.Headers[i].Value = []byte(val) | ||
| return |
There was a problem hiding this comment.
Remove duplicate Kafka propagation headers
When a record already contains multiple headers for the same propagation key (franz-go stores headers as a slice, so this can happen when forwarding or reusing records), this return updates only the first value and leaves stale duplicates behind. ForeachKey later passes every duplicate to tracer.Extract; W3C extraction rejects duplicate traceparent, and Datadog extraction can let a later stale duplicate overwrite the value, so downstream consumers may lose or attach to the wrong parent context.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
When a record already contains multiple headers for the same propagation key (franz-go stores headers as a slice, so this can happen when forwarding or reusing records)
Thank you, Dario! I have to check this assumption. I'll look into it later today :)
darccio
left a comment
There was a problem hiding this comment.
LGTM, although I'd address the Codex finding.
…4629) ### What does this PR do? Adds orchestrion support for the twmb/franz-go integration: - Adds `orchestrion.yml` aspect that hooks into `kgo.NewClient()` and appends `WithTracing()` to enable automatic distributed tracing - Registers the aspect in `orchestrion/all` - Adds an orchestrion integration test at `internal/orchestrion/_integration/twmb_franz_go/` - Adds the franz-go replace directive to the integration test module ### Motivation Enable automatic instrumentation of franz-go Kafka clients via orchestrion, matching the existing pattern used by other integrations (gRPC, segmentio/kafka-go, etc.). ### Reviewer's Checklist - [ ] Changed code has unit tests for its functionality at or near 100% coverage. - [ ] [System-Tests](https://github.com/DataDog/system-tests/) covering this feature have been added and enabled with the va.b.c-dev version tag. - [ ] There is a benchmark for any new code, or changes to existing code. - [ ] If this interacts with the agent in a new way, a system test has been added. - [ ] New code is free of linting errors. You can check this by running `make lint` locally. - [ ] New code doesn't break existing tests. You can check this by running `make test` locally. - [ ] Add an appropriate team label so this PR gets put in the right place for the release notes. - [ ] All generated files are up to date. You can check this by running `make generate` locally. - [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild. Make sure all nested modules are up to date by running `make fix-modules` locally.
…e, apply Set to all occurences
|
Do you know which version are you targeting this for? |
<!-- * New contributors are highly encouraged to read our [CONTRIBUTING](/CONTRIBUTING.md) documentation. * Commit and PR titles should be prefixed with the general area of the pull request's change. --> - Adds a [twmb/franz-go](https://github.com/twmb/franz-go?tab=readme-ov-file) integration. <!-- * A brief description of the change being made with this pull request. * If the description here cannot be expressed in a succinct form, consider opening multiple pull requests instead of a single one. --> #2735 <!-- * What inspired you to submit this pull request? * Link any related GitHub issues or PRs here. * If this resolves a GitHub issue, include "Fixes #XXXX" to link the issue and auto-close it on merge. --> <!-- * Authors can use this list as a reference to ensure that there are no problems during the review but the signing off is to be done by the reviewer(s). --> - [x] Changed code has unit tests for its functionality at or near 100% coverage. - [ ] [System-Tests](https://github.com/DataDog/system-tests/) covering this feature have been added and enabled with the va.b.c-dev version tag. - [ ] There is a benchmark for any new code, or changes to existing code. - [ ] If this interacts with the agent in a new way, a system test has been added. - [ ] New code is free of linting errors. You can check this by running `./scripts/lint.sh` locally. - [ ] Add an appropriate team label so this PR gets put in the right place for the release notes. - [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild. Unsure? Have a question? Request a review! Co-authored-by: genesor <[email protected]> Co-authored-by: rarguelloF <[email protected]> Co-authored-by: augusto.deoliveira <[email protected]>
|
Hi @Teko012, we've included this PR in the ongoing It's currently being tested internally and should be released soon. |
|
Looking forward to this addition! Thank you all who contributed. |
What does this PR do?
Motivation
#2735
Reviewer's Checklist
./scripts/lint.shlocally.Unsure? Have a question? Request a review!