-
Notifications
You must be signed in to change notification settings - Fork 2.8k
kafkaexporter: Opt-in to use franz-go client #40364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
MovieStoreGuy
merged 16 commits into
open-telemetry:main
from
marclop:f/add-kafkaexporter-franz-go-client
Jun 4, 2025
Merged
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0b20abb
kafkaexporter: Opt-in to use franz-go client
marclop 43f3153
Add `internal/kafkaclient` package
marclop ea30e66
`kafkaexporter` changes to use kafkaclient
marclop 64d8041
Update deps for affected extension/receiver
marclop 474bec7
Add changelog
marclop 4f95b3f
Address linting issues
marclop ececad8
Address review comments
marclop ef132a9
undo unrelated changes
marclop 8321cd5
Add FranzSyncProducer tests
marclop 4cbd517
Address more review comments
marclop d2c31f4
Merge remote-tracking branch 'upstream/main' into f/add-kafkaexporter…
marclop a14d9c8
Address axw review comments
marclop f2042fb
Remove local kafka container address override
marclop 1b972cb
Merge remote-tracking branch 'upstream/main' into f/add-kafkaexporter…
marclop d608901
Update .chloggen/f_add-kafkaexporter-franz-go-client.yaml
marclop 5e9c85c
undo formatting changes, benchmark files
marclop File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: 'enhancement' | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: 'kafkaexporter' | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: "Add an Alpha feature gate `exporter.kafkaexporter.UseFranzGoClient` to use franz-go in the Kafka exporter for better performance." | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [40364] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: | | ||
This change adds an experimental opt-in support to use the franz-go client in the Kafka exporter. | ||
The franz-go client is a high-performance Kafka client that can improve the performance of the Kafka exporter. | ||
The default client remains sarama, which is used by the Kafka receiver and other components. | ||
The franz-go client can be enabled by setting `client_type=franz-go` in the configuration. | ||
|
||
# If your change doesn't affect end users or the exported elements of any package, | ||
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. | ||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: [user] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
goos: darwin | ||
goarch: arm64 | ||
pkg: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter | ||
cpu: Apple M2 Pro | ||
BenchmarkLogs-6 11415 108209 ns/op 7305 B/op 80 allocs/op | ||
BenchmarkLogs-6 10000 101705 ns/op 7312 B/op 80 allocs/op | ||
BenchmarkLogs-6 10000 101633 ns/op 7312 B/op 80 allocs/op | ||
BenchmarkLogs-6 10000 102526 ns/op 7304 B/op 80 allocs/op | ||
BenchmarkLogs-6 13101 95475 ns/op 7304 B/op 80 allocs/op | ||
BenchmarkLogs-6 12422 94701 ns/op 7306 B/op 80 allocs/op | ||
BenchmarkLogs-6 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
goos: darwin | ||
goarch: arm64 | ||
pkg: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter | ||
cpu: Apple M2 Pro | ||
BenchmarkLogs-12 31820 34100 ns/op 2236 B/op 29 allocs/op | ||
BenchmarkLogs-12 37599 32024 ns/op 2250 B/op 29 allocs/op | ||
BenchmarkLogs-12 37064 34274 ns/op 2251 B/op 29 allocs/op | ||
BenchmarkLogs-12 35703 34325 ns/op 2257 B/op 29 allocs/op | ||
BenchmarkLogs-12 36334 32198 ns/op 2267 B/op 29 allocs/op | ||
BenchmarkLogs-12 36157 32797 ns/op 2341 B/op 29 allocs/op | ||
BenchmarkLogs-12 37051 32532 ns/op 2226 B/op 29 allocs/op | ||
BenchmarkLogs-12 38035 34004 ns/op 2263 B/op 29 allocs/op | ||
BenchmarkLogs-12 32408 31994 ns/op 2265 B/op 29 allocs/op | ||
BenchmarkLogs-12 36621 34805 ns/op 2270 B/op 29 allocs/op | ||
BenchmarkMetrics-12 33474 36901 ns/op 4426 B/op 32 allocs/op | ||
BenchmarkMetrics-12 30530 39303 ns/op 4650 B/op 32 allocs/op | ||
BenchmarkMetrics-12 31586 38391 ns/op 4465 B/op 32 allocs/op | ||
BenchmarkMetrics-12 31240 39374 ns/op 4535 B/op 32 allocs/op | ||
BenchmarkMetrics-12 28396 45172 ns/op 3901 B/op 32 allocs/op | ||
BenchmarkMetrics-12 26986 46096 ns/op 3695 B/op 32 allocs/op | ||
BenchmarkMetrics-12 26464 63420 ns/op 3722 B/op 32 allocs/op | ||
BenchmarkMetrics-12 26977 40059 ns/op 3740 B/op 32 allocs/op | ||
BenchmarkMetrics-12 34708 35470 ns/op 4783 B/op 32 allocs/op | ||
BenchmarkMetrics-12 33321 35616 ns/op 4461 B/op 32 allocs/op | ||
BenchmarkTraces-12 33794 35456 ns/op 3021 B/op 29 allocs/op | ||
BenchmarkTraces-12 34214 31853 ns/op 3113 B/op 29 allocs/op | ||
BenchmarkTraces-12 36801 40249 ns/op 3055 B/op 29 allocs/op | ||
BenchmarkTraces-12 36147 33660 ns/op 3091 B/op 29 allocs/op | ||
BenchmarkTraces-12 31714 33977 ns/op 2967 B/op 29 allocs/op | ||
BenchmarkTraces-12 31849 37208 ns/op 3058 B/op 29 allocs/op | ||
BenchmarkTraces-12 31228 50109 ns/op 2834 B/op 29 allocs/op | ||
BenchmarkTraces-12 29637 37393 ns/op 2874 B/op 29 allocs/op | ||
BenchmarkTraces-12 32778 34551 ns/op 3148 B/op 29 allocs/op | ||
BenchmarkTraces-12 34215 35971 ns/op 2908 B/op 29 allocs/op | ||
PASS | ||
ok github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter 49.211s |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
goos: darwin | ||
goarch: arm64 | ||
pkg: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter | ||
cpu: Apple M2 Pro | ||
BenchmarkLogs-12 37905 32798 ns/op 2247 B/op 28 allocs/op | ||
BenchmarkLogs-12 33573 33944 ns/op 2190 B/op 28 allocs/op | ||
BenchmarkLogs-12 32331 34712 ns/op 2148 B/op 28 allocs/op | ||
BenchmarkLogs-12 33314 32738 ns/op 2292 B/op 28 allocs/op | ||
BenchmarkLogs-12 38329 35597 ns/op 2239 B/op 28 allocs/op | ||
BenchmarkLogs-12 25082 40580 ns/op 2095 B/op 28 allocs/op | ||
BenchmarkLogs-12 29698 37757 ns/op 2087 B/op 28 allocs/op | ||
BenchmarkLogs-12 30644 44639 ns/op 2070 B/op 28 allocs/op | ||
BenchmarkLogs-12 34958 33982 ns/op 2277 B/op 28 allocs/op | ||
BenchmarkLogs-12 31616 33788 ns/op 2250 B/op 28 allocs/op | ||
BenchmarkMetrics-12 27564 46025 ns/op 3737 B/op 31 allocs/op | ||
BenchmarkMetrics-12 25002 49322 ns/op 3642 B/op 31 allocs/op | ||
BenchmarkMetrics-12 23720 53326 ns/op 3699 B/op 31 allocs/op | ||
BenchmarkMetrics-12 23220 47419 ns/op 3605 B/op 31 allocs/op | ||
BenchmarkMetrics-12 24519 45852 ns/op 3615 B/op 31 allocs/op | ||
BenchmarkMetrics-12 25384 43660 ns/op 3637 B/op 31 allocs/op | ||
BenchmarkMetrics-12 23386 49247 ns/op 3571 B/op 31 allocs/op | ||
BenchmarkMetrics-12 25801 47621 ns/op 3638 B/op 31 allocs/op | ||
BenchmarkMetrics-12 24204 44978 ns/op 3534 B/op 31 allocs/op | ||
BenchmarkMetrics-12 28026 40926 ns/op 3718 B/op 31 allocs/op | ||
BenchmarkTraces-12 35709 34335 ns/op 3093 B/op 28 allocs/op | ||
BenchmarkTraces-12 33123 54130 ns/op 3085 B/op 28 allocs/op | ||
BenchmarkTraces-12 31818 38882 ns/op 2865 B/op 28 allocs/op | ||
BenchmarkTraces-12 30544 40119 ns/op 2733 B/op 28 allocs/op | ||
BenchmarkTraces-12 29344 38750 ns/op 3190 B/op 28 allocs/op | ||
BenchmarkTraces-12 25266 39842 ns/op 2693 B/op 28 allocs/op | ||
BenchmarkTraces-12 31450 34433 ns/op 3003 B/op 28 allocs/op | ||
BenchmarkTraces-12 33896 32715 ns/op 3034 B/op 28 allocs/op | ||
BenchmarkTraces-12 35269 33231 ns/op 3012 B/op 28 allocs/op | ||
BenchmarkTraces-12 36985 33120 ns/op 3054 B/op 28 allocs/op | ||
PASS | ||
ok github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter 49.604s |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
goos: darwin | ||
goarch: arm64 | ||
pkg: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter | ||
cpu: Apple M2 Pro | ||
BenchmarkLogs-12 30254 37892 ns/op 2193 B/op 28 allocs/op | ||
BenchmarkLogs-12 32016 37509 ns/op 2242 B/op 28 allocs/op | ||
BenchmarkLogs-12 32229 37987 ns/op 2254 B/op 28 allocs/op | ||
BenchmarkLogs-12 32034 37779 ns/op 2235 B/op 28 allocs/op | ||
BenchmarkLogs-12 31203 40874 ns/op 2235 B/op 28 allocs/op | ||
BenchmarkLogs-12 31506 36837 ns/op 2265 B/op 28 allocs/op | ||
BenchmarkLogs-12 32593 37027 ns/op 2280 B/op 28 allocs/op | ||
BenchmarkLogs-12 31680 36737 ns/op 2273 B/op 28 allocs/op | ||
BenchmarkLogs-12 32793 37279 ns/op 2266 B/op 28 allocs/op | ||
BenchmarkLogs-12 31646 34648 ns/op 2267 B/op 28 allocs/op | ||
BenchmarkMetrics-12 25560 55624 ns/op 3684 B/op 31 allocs/op | ||
BenchmarkMetrics-12 15206 78654 ns/op 3652 B/op 31 allocs/op | ||
BenchmarkMetrics-12 21764 49204 ns/op 3624 B/op 31 allocs/op | ||
BenchmarkMetrics-12 22341 52381 ns/op 3759 B/op 31 allocs/op | ||
BenchmarkMetrics-12 19746 63729 ns/op 3683 B/op 31 allocs/op | ||
BenchmarkMetrics-12 20154 51729 ns/op 3709 B/op 31 allocs/op | ||
BenchmarkMetrics-12 23184 48399 ns/op 3636 B/op 31 allocs/op | ||
BenchmarkMetrics-12 29370 36697 ns/op 4645 B/op 31 allocs/op | ||
BenchmarkMetrics-12 34242 36338 ns/op 4487 B/op 31 allocs/op | ||
BenchmarkMetrics-12 26121 45026 ns/op 3609 B/op 31 allocs/op | ||
BenchmarkTraces-12 35298 32908 ns/op 3126 B/op 28 allocs/op | ||
BenchmarkTraces-12 35208 32808 ns/op 2998 B/op 28 allocs/op | ||
BenchmarkTraces-12 36322 36239 ns/op 3138 B/op 28 allocs/op | ||
BenchmarkTraces-12 35937 38223 ns/op 3046 B/op 28 allocs/op | ||
BenchmarkTraces-12 34375 37285 ns/op 3007 B/op 28 allocs/op | ||
BenchmarkTraces-12 27420 43349 ns/op 2634 B/op 28 allocs/op | ||
BenchmarkTraces-12 26535 47636 ns/op 2752 B/op 28 allocs/op | ||
BenchmarkTraces-12 24662 42254 ns/op 2706 B/op 28 allocs/op | ||
BenchmarkTraces-12 27678 43330 ns/op 2662 B/op 28 allocs/op | ||
BenchmarkTraces-12 27492 43174 ns/op 2672 B/op 28 allocs/op | ||
PASS | ||
ok github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter 52.557s |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.