Skip to content

Conversation

jake-kramer
Copy link
Contributor

@jake-kramer jake-kramer commented Oct 8, 2025

Utf-8 label names are valid in the write path if the config client-capability.allow_utf_8_label_names=true is set, and the client capability allow-utf8-labelnames=true is passed in the Accept header for API calls.

Legacy label name validation and sanitization will continue to be enforced on write path, otherwise.

Follow up to #4442

@simonswine @bryanhuhta

@jake-kramer jake-kramer marked this pull request as ready for review October 8, 2025 19:11
@jake-kramer jake-kramer requested review from a team, aleks-p, alsoba13 and marcsanmi as code owners October 8, 2025 19:11
@jake-kramer jake-kramer changed the title WIP feat: Allow utf-8 label names in write path feat: Allow utf-8 label names in write path Oct 8, 2025
Base automatically changed from utf-label-names to main October 9, 2025 12:57
@jake-kramer jake-kramer force-pushed the utf-label-names-write branch from 69072a0 to 4df725b Compare October 9, 2025 13:00
Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

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

The write path should not use allow-utf8-labelnames=true. The capability is a read path only capability.

When profile producers (SDK, profilecli upload, Alloy pyroscope.write) support utf8 label names, they should:

Send the labels in utf8, if they have any.

Then there are two options:

  • Backend support utf8 label names/has enabled support: All is fine
  • Backend doens't support: The first request fails and the client falls back to filtering/translating label names.

So basically you should create a tenant override maybe IngestionAllowUtf8LabelNames, around here:

IngestionRelabelingDefaultRulesPosition RelabelRulesPosition `yaml:"ingestion_relabeling_default_rules_position" json:"ingestion_relabeling_default_rules_position" category:"advanced"`

Then the ingest path should not consider client flags, they should just call limits.IngestionAllowUtf8LabelNames(), and the act accordingly.

@jake-kramer
Copy link
Contributor Author

jake-kramer commented Oct 10, 2025

The write path should not use allow-utf8-labelnames=true. The capability is a read path only capability.

When profile producers (SDK, profilecli upload, Alloy pyroscope.write) support utf8 label names, they should:

Send the labels in utf8, if they have any.

Then there are two options:

  • Backend support utf8 label names/has enabled support: All is fine
  • Backend doens't support: The first request fails and the client falls back to filtering/translating label names.

So basically you should create a tenant override maybe IngestionAllowUtf8LabelNames, around here:

IngestionRelabelingDefaultRulesPosition RelabelRulesPosition `yaml:"ingestion_relabeling_default_rules_position" json:"ingestion_relabeling_default_rules_position" category:"advanced"`

Then the ingest path should not consider client flags, they should just call limits.IngestionAllowUtf8LabelNames(), and the act accordingly.

Adding a metric to determine scope and impact of removing write path sanitization by default #4501

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants