Skip to content

Add "path" and "dii_type" labels to identity/map metrics#2429

Merged
swibi-ttd merged 7 commits intomainfrom
swi-UID2-6706-identity-map-metrics
Mar 12, 2026
Merged

Add "path" and "dii_type" labels to identity/map metrics#2429
swibi-ttd merged 7 commits intomainfrom
swi-UID2-6706-identity-map-metrics

Conversation

@swibi-ttd
Copy link
Contributor

@swibi-ttd swibi-ttd commented Mar 11, 2026

  • Added path label to all Identity Map metrics to distinguish /v2/ and /v3/ requests
  • Added dii_type label (email, email_hash, phone, phone_hash) to identity_map_inputs metrics. Total count will now be derived via sum by (api_contact, path)
  • Bug fix: uid2_operator_optout_status_optout_size was never initialised - split this metric into a separate cache to fix
  • Implemented IdentityMapV2Input with dii_type and inputList so we can easily pass back dii_type from input parsing (used in metric recording)

Testing

  • Added unit tests
  • Tested metrics both locally and by sending requests to test operator
image image

@swibi-ttd swibi-ttd changed the title (draft) add "path" label to identity/map metrics Add "path" and "dii_type" labels to identity/map metrics Mar 11, 2026
.summary();
assertNotNull(phoneHashSummary);
assertEquals(1.0, phoneHashSummary.totalAmount());

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add an emailHashSummary and phoneSummary (=0) as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good idea - have added assertions for all 4 DII types in the tests

@swibi-ttd swibi-ttd force-pushed the swi-UID2-6706-identity-map-metrics branch from ce0f347 to 25e8cc7 Compare March 12, 2026 02:17
@swibi-ttd swibi-ttd merged commit 6804339 into main Mar 12, 2026
9 checks passed
@swibi-ttd swibi-ttd deleted the swi-UID2-6706-identity-map-metrics branch March 12, 2026 02:25
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