Skip to content

fix(config): Error on invalid tagpass/tagdrop list syntax#17664

Open
calvinmachado20 wants to merge 3 commits into
influxdata:masterfrom
calvinmachado20:feature/trigger_invalid_tagpass_error
Open

fix(config): Error on invalid tagpass/tagdrop list syntax#17664
calvinmachado20 wants to merge 3 commits into
influxdata:masterfrom
calvinmachado20:feature/trigger_invalid_tagpass_error

Conversation

@calvinmachado20
Copy link
Copy Markdown

@calvinmachado20 calvinmachado20 commented Sep 20, 2025

Summary

Address open issue: #16398

People work sloppily and try to match metrics with a tagpass = ["mymarkertag"] when the correct version would be tagpass = { "markertag" = ["mymarkertag"] } or similar.
Telegraf doesn't error out, though, and processors and outputs still process and put out the affected metrics because no working tagpass means matching every metric.

But it also matches metrics it shouldn't match and those end up in databases where they shouldn't end up.

Expected behavior
Error out with a config syntax error because tagpass expects a dictionary

Actual behavior
No erroring out and just matching everything leading to metrics in places where they don't belong.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16398

@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 Sep 20, 2025
@skartikey skartikey changed the title feat(config): Tagpass with a list triggers an error fix(config): Error on invalid tagpass/tagdrop list syntax Sep 22, 2025
@telegraf-tiger telegraf-tiger Bot added the fix pr to fix corresponding bug label Sep 22, 2025
@skartikey
Copy link
Copy Markdown
Contributor

@calvinmachado20 Thanks for the PR!
This is a breaking change for users with incorrect configurations, but that's appropriate since those configs were already broken and causing data integrity issues. The clear error message will help them quickly fix their configuration.

@skartikey skartikey self-assigned this Sep 22, 2025
@calvinmachado20
Copy link
Copy Markdown
Author

@skartikey thanks for having a look at this, I agree with what you said

@calvinmachado20
Copy link
Copy Markdown
Author

@skartikey any update on this or is this change good?

Comment thread config/config.go Outdated
@skartikey
Copy link
Copy Markdown
Contributor

It’s worth pointing out that this PR fixes #16398 but does not fix #17500. They may look similar at first, but they are different problems:

@skartikey skartikey added the waiting for response waiting for response from contributor label Oct 3, 2025
Co-authored-by: Thomas Casteleyn <thomas.casteleyn@me.com>
@telegraf-tiger
Copy link
Copy Markdown
Contributor

@telegraf-tiger
Copy link
Copy Markdown
Contributor

Hello! I am closing this issue due to inactivity. I hope you were able to resolve your problem, if not please try posting this question in our Community Slack or Community Forums or provide additional details in this issue and reqeust that it be re-opened. Thank you!

@telegraf-tiger telegraf-tiger Bot closed this Oct 17, 2025
@calvinmachado20
Copy link
Copy Markdown
Author

@skartikey can this PR be opened again? Are there any issues you think with these changes?

@telegraf-tiger telegraf-tiger Bot removed the waiting for response waiting for response from contributor label Nov 10, 2025
@srebhan srebhan reopened this May 8, 2026
@srebhan
Copy link
Copy Markdown
Member

srebhan commented May 8, 2026

Sorry for closing this @calvinmachado20! Are you willing to drive this over the finish line? If so, please rebase the PR on latest master!

@srebhan srebhan assigned srebhan and unassigned skartikey May 8, 2026
@srebhan srebhan removed the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label May 8, 2026
@calvinmachado20
Copy link
Copy Markdown
Author

Yes, happy to do so. Let me do that and comment back

@srebhan srebhan added the waiting for response waiting for response from contributor label May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix pr to fix corresponding bug waiting for response waiting for response from contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tagpass with a list doesn't trigger error and just matches everything

4 participants