Skip to content

chore(outputs.influxdb_v2): Add more trace information - #19619

Open
srebhan wants to merge 1 commit into
influxdata:masterfrom
srebhan:ear-7018
Open

srebhan wants to merge 1 commit into
influxdata:masterfrom
srebhan:ear-7018

Conversation

@srebhan

@srebhan srebhan commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

This PR adds some more tracing information to debug slow writes more efficiently.

Checklist

Related issues

@telegraf-tiger telegraf-tiger Bot added area/influxdb chore plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Sep 3, 2026
@telegraf-tiger

telegraf-tiger Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

⚠️ This pull request increases the Telegraf binary size by 5.68 % for linux amd64 (new size: 325.7 MB, nightly size 308.2 MB)

📦 Click here to get additional PR build artifacts

Artifact URLs

. DEB . RPM . TAR . GZ . ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz

@srebhan srebhan self-assigned this Sep 3, 2026
@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Sep 17, 2026
@srebhan srebhan assigned skartikey and unassigned srebhan Sep 17, 2026
}
return err
}
c.log.Tracef(" Sending %d batches took %.3fms...", len(batches), time.Since(start).Seconds()*1000)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] This stops the clock before the split-and-resend loop below, so when a 413 makes us split batches, the extra round trips don't show up in any stage timing. That's one of the slow paths we'd want to see. Can we move the trace after the split loop, or add one for it?

if errors.As(err, &werr) || errors.Is(err, internal.ErrSizeLimitReached) {
return err
}
i.Log.Tracef(" Writing to %q failed after %.3fms, trying other client...", client.url, time.Since(start).Seconds()*1000)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] On the last client this still says "trying other client", but there's none left and we fall through to the final error. Could be misleading when reading a trace for a total failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/influxdb chore plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants