From ffad861e2c6b09459469bb742e36d88ee0a083e5 Mon Sep 17 00:00:00 2001 From: Jonny Rhea <5555162+jrhea@users.noreply.github.com> Date: Tue, 6 Jan 2026 10:22:20 -0600 Subject: [PATCH] WithMaxExportBatchSize is specified twice (#16211) **What type of PR is this?** > Bug fix **What does this PR do? Why is it needed?** It's just a simple fix. I was looking at how prysm uses OpenTelemetry and I noticed it. **Which issues(s) does this PR fix?** **Other notes for review** **Acknowledgements** - [x] I have read [CONTRIBUTING.md](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md). - [x] I have included a uniquely named [changelog fragment file](https://github.com/prysmaticlabs/prysm/blob/develop/CONTRIBUTING.md#maintaining-changelogmd). - [x] I have added a description with sufficient context for reviewers to understand this PR. - [x] I have tested that my changes work as expected and I added a testing plan to the PR description (if applicable). --- changelog/jrhea_duplicate_tracer_provider_setting.md | 3 +++ monitoring/tracing/tracer.go | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog/jrhea_duplicate_tracer_provider_setting.md diff --git a/changelog/jrhea_duplicate_tracer_provider_setting.md b/changelog/jrhea_duplicate_tracer_provider_setting.md new file mode 100644 index 0000000000..a360c84a84 --- /dev/null +++ b/changelog/jrhea_duplicate_tracer_provider_setting.md @@ -0,0 +1,3 @@ +### Fixed + +- Don't call trace.WithMaxExportBatchSize(trace.DefaultMaxExportBatchSize) twice. diff --git a/monitoring/tracing/tracer.go b/monitoring/tracing/tracer.go index 4ccfee2dc7..f62747af14 100644 --- a/monitoring/tracing/tracer.go +++ b/monitoring/tracing/tracer.go @@ -45,7 +45,6 @@ func Setup(ctx context.Context, serviceName, processName, endpoint string, sampl exporter, trace.WithMaxExportBatchSize(trace.DefaultMaxExportBatchSize), trace.WithBatchTimeout(trace.DefaultScheduleDelay*time.Millisecond), - trace.WithMaxExportBatchSize(trace.DefaultMaxExportBatchSize), ), trace.WithResource( resource.NewWithAttributes(