Skip to content
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

feat(outputs.influxdb_v2): Preserve custom query parameters on write #15475

Merged
merged 3 commits into from
Jun 7, 2024

Conversation

glinton
Copy link
Contributor

@glinton glinton commented Jun 7, 2024

Summary

Preserves any custom query parameters used in URLs in the influxdb_v2 output plugin.

This also speeds up the write path by building the non-changing parts of the "writeURL" once while still allowing for tag (or otherwise) defined destination buckets.

BenchmarkOldMakeWriteURL-16    	 1556631	       683.2 ns/op	     424 B/op	      14 allocs/op
BenchmarkNewMakeWriteURL-16    	 2084415	       496.5 ns/op	     280 B/op	       9 allocs/op

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15474

This also speeds up the write path by building the non-changing parts of
the "writeURL" once while still allowing for tag (or otherwise) defined
destination buckets.
@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Jun 7, 2024
@srebhan srebhan changed the title feat: preserve custom query parameters in influxdb_v2 output feat(outputs.influxdb_v2): Preserve custom query parameters on write Jun 7, 2024
@telegraf-tiger telegraf-tiger bot added area/influxdb plugin/output 1. Request for new output plugins 2. Issues/PRs that are related to out plugins labels Jun 7, 2024
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for the nice speedup and feature @glinton! I do have one comment in the code. Furthermore, could you please rebase this PR on the latest master to make tests pass!?

plugins/outputs/influxdb_v2/http.go Outdated Show resolved Hide resolved
@srebhan srebhan self-assigned this Jun 7, 2024
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Jun 7, 2024

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks a lot @glinton!

@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 Jun 7, 2024
@srebhan srebhan assigned powersj and DStrand1 and unassigned srebhan Jun 7, 2024
@powersj powersj merged commit a758311 into influxdata:master Jun 7, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.31.0 milestone Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/influxdb feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin 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.

Preserve custom query parameters in influxdb_v2 output
4 participants