Skip to content

fix(serializers.prometheus): Use legacy validation for metric name#16557

Merged
mstrandboge merged 2 commits into
influxdata:masterfrom
srebhan:prometheus_issue_16550
Mar 4, 2025
Merged

fix(serializers.prometheus): Use legacy validation for metric name#16557
mstrandboge merged 2 commits into
influxdata:masterfrom
srebhan:prometheus_issue_16550

Conversation

@srebhan

@srebhan srebhan commented Feb 25, 2025

Copy link
Copy Markdown
Member

Summary

With PR #16453 we bumped the prometheus package which in turn changed the validation scheme for metric-names and labels to only being UTF-8 conform. However, while changing the label validation scheme back to "legacy" the metric name validation was not. This PR fixes the metric name validation and reverts the check to "legacy". This PR is also relevant for the prometheusremotewrite serializer as it reuses the sanitization code.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #16550

@telegraf-tiger telegraf-tiger Bot added area/prometheus fix pr to fix corresponding bug plugin/serializer labels Feb 25, 2025
@srebhan srebhan self-assigned this Feb 25, 2025
@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 Feb 25, 2025
@srebhan srebhan assigned mstrandboge and unassigned srebhan Feb 25, 2025
Comment thread plugins/serializers/prometheusremotewrite/prometheusremotewrite.go Outdated
@srebhan srebhan requested a review from mstrandboge March 4, 2025 09:36
@telegraf-tiger

telegraf-tiger Bot commented Mar 4, 2025

Copy link
Copy Markdown
Contributor

@mstrandboge mstrandboge merged commit 0551f22 into influxdata:master Mar 4, 2025
@github-actions github-actions Bot added this to the v1.34.0 milestone Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/prometheus fix pr to fix corresponding bug plugin/serializer 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.

Telegraf 1.33.2 unable to send windows metrics to Amazon Managed Prometheus

2 participants