Skip to content

ROX-33893: glob patterns for header name#19723

Open
parametalol wants to merge 1 commit intomichael/telemetry-requestparam-refactoringfrom
michael/ROX-33893-header-name-glob-v2
Open

ROX-33893: glob patterns for header name#19723
parametalol wants to merge 1 commit intomichael/telemetry-requestparam-refactoringfrom
michael/ROX-33893-header-name-glob-v2

Conversation

@parametalol
Copy link
Copy Markdown
Contributor

@parametalol parametalol commented Mar 31, 2026

Description

Support glob patterns in telemetry header names, not just values. Previously, campaigns could only match exact header names. Now both header names and values support globs (e.g., "Rh-*": NoHeaderOrAnyValue).

Key changes:

  • APICallCampaignCriterion.Headers: map[string]glob.Pattern -> map[glob.Pattern]glob.Pattern
  • Headers.GetAll: matches both header names and values using globs
  • ServiceNow integration now uses "Rh-*" pattern instead of hardcoded header name

Motivation:
ServiceNow sets headers with a common Rh- prefix, but the exact name may vary. Glob patterns for header names allow tracking related headers without hardcoding each variant.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

  • Unit tests cover glob matching on header names and values, including match/no-match/error cases
  • Existing campaign, interceptor, and request_params tests updated for the refactored Headers field
  • ServiceNow integration test validates "Rh-*" pattern matching
  • All tests pass: go test ./pkg/telemetry/phonehome/... ./central/telemetry/centralclient/...

Current dependencies on/for this PR:

@parametalol parametalol changed the title michael/ROX-33893-header-name-glob-v2 ROX-33893: add support for glob patterns in API call telemetry interceptor header name Mar 31, 2026
@parametalol parametalol changed the title ROX-33893: add support for glob patterns in API call telemetry interceptor header name ROX-33893: glob patterns in telemetry campaign criterion header name Mar 31, 2026
@parametalol parametalol changed the title ROX-33893: glob patterns in telemetry campaign criterion header name ROX-33893: glob patterns for header name Mar 31, 2026
@rhacs-bot
Copy link
Copy Markdown
Contributor

rhacs-bot commented Mar 31, 2026

Images are ready for the commit at 8050edc.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-513-g8050edce31.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 75.75758% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.58%. Comparing base (27967f6) to head (8050edc).

Files with missing lines Patch % Lines
pkg/telemetry/phonehome/campaign.go 37.50% 3 Missing and 2 partials ⚠️
central/telemetry/centralclient/interceptors.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@                             Coverage Diff                             @@
##           michael/telemetry-requestparam-refactoring   #19723   +/-   ##
===========================================================================
  Coverage                                       49.58%   49.58%           
===========================================================================
  Files                                            2756     2756           
  Lines                                          207951   207969   +18     
===========================================================================
+ Hits                                           103117   103128   +11     
- Misses                                          97172    97178    +6     
- Partials                                         7662     7663    +1     
Flag Coverage Δ
go-unit-tests 49.58% <75.75%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@parametalol parametalol force-pushed the michael/telemetry-requestparam-refactoring branch from 2e708df to 27967f6 Compare April 1, 2026 07:58
@parametalol parametalol force-pushed the michael/ROX-33893-header-name-glob-v2 branch from 737025b to 8050edc Compare April 1, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants