@@ -898,7 +898,7 @@ private void recordOperatorServedSdkUsage(RoutingContext rc, Integer siteId, Str
898898 CLIENT_VERSION_COUNTERS .computeIfAbsent (
899899 new Tuple .Tuple2 <>(Integer .toString (siteId ), clientVersion ),
900900 tuple -> Counter
901- .builder ("uid2.client_sdk_versions " )
901+ .builder ("uid2_client_sdk_versions_total " )
902902 .description ("counter for how many http requests are processed per each operator-served sdk version" )
903903 .tags ("site_id" , tuple .getItem1 (), "api_contact" , apiContact , "client_version" , tuple .getItem2 (), "path" , path )
904904 .register (Metrics .globalRegistry )
@@ -1807,26 +1807,26 @@ private void recordIdentityMapStats(RoutingContext rc, int inputCount, int inval
18071807 String apiContact = getApiContact (rc );
18081808
18091809 DistributionSummary ds = _identityMapMetricSummaries .computeIfAbsent (apiContact , k -> DistributionSummary
1810- .builder ("uid2.operator.identity.map.inputs " )
1810+ .builder ("uid2_operator_identity_map_inputs " )
18111811 .description ("number of emails or email hashes passed to identity map batch endpoint" )
18121812 .tags ("api_contact" , apiContact )
18131813 .register (Metrics .globalRegistry ));
18141814 ds .record (inputCount );
18151815
18161816 Tuple .Tuple2 <Counter , Counter > ids = _identityMapUnmappedIdentifiers .computeIfAbsent (apiContact , k -> new Tuple .Tuple2 <>(
1817- Counter .builder ("uid2.operator.identity.map.unmapped " )
1817+ Counter .builder ("uid2_operator_identity_map_unmapped_total " )
18181818 .description ("invalid identifiers" )
18191819 .tags ("api_contact" , apiContact , "reason" , "invalid" )
18201820 .register (Metrics .globalRegistry ),
1821- Counter .builder ("uid2.operator.identity.map.unmapped " )
1821+ Counter .builder ("uid2_operator_identity_map_unmapped_total " )
18221822 .description ("optout identifiers" )
18231823 .tags ("api_contact" , apiContact , "reason" , "optout" )
18241824 .register (Metrics .globalRegistry )));
18251825 if (invalidCount > 0 ) ids .getItem1 ().increment (invalidCount );
18261826 if (optoutCount > 0 ) ids .getItem2 ().increment (optoutCount );
18271827
18281828 Counter rs = _identityMapRequestWithUnmapped .computeIfAbsent (apiContact , k -> Counter
1829- .builder ("uid2.operator.identity.map.unmapped_requests " )
1829+ .builder ("uid2_operator_identity_map_unmapped_requests_total " )
18301830 .description ("number of requests with unmapped identifiers" )
18311831 .tags ("api_contact" , apiContact )
18321832 .register (Metrics .globalRegistry ));
@@ -1845,7 +1845,7 @@ private void recordIdentityMapStatsForServiceLinks(RoutingContext rc, String api
18451845 final String serviceName = rc .get (SecureLinkValidatorService .SERVICE_NAME );
18461846 final String metricKey = serviceName + serviceLinkName ;
18471847 DistributionSummary ds = _identityMapMetricSummaries .computeIfAbsent (metricKey ,
1848- k -> DistributionSummary .builder ("uid2.operator.identity.map.services.inputs " )
1848+ k -> DistributionSummary .builder ("uid2_operator_identity_map_services_inputs " )
18491849 .description ("number of emails or phone numbers passed to identity map batch endpoint by services" )
18501850 .tags (Arrays .asList (Tag .of ("api_contact" , apiContact ),
18511851 Tag .of ("service_name" , serviceName ),
@@ -1855,14 +1855,14 @@ private void recordIdentityMapStatsForServiceLinks(RoutingContext rc, String api
18551855
18561856 Tuple .Tuple2 <Counter , Counter > counterTuple = _identityMapUnmappedIdentifiers .computeIfAbsent (metricKey ,
18571857 k -> new Tuple .Tuple2 <>(
1858- Counter .builder ("uid2.operator.identity.map.services.unmapped " )
1858+ Counter .builder ("uid2_operator_identity_map_services_unmapped_total " )
18591859 .description ("number of invalid identifiers passed to identity map batch endpoint by services" )
18601860 .tags (Arrays .asList (Tag .of ("api_contact" , apiContact ),
18611861 Tag .of ("reason" , "invalid" ),
18621862 Tag .of ("service_name" , serviceName ),
18631863 Tag .of ("service_link_name" , serviceLinkName )))
18641864 .register (Metrics .globalRegistry ),
1865- Counter .builder ("uid2.operator.identity.map.services.unmapped " )
1865+ Counter .builder ("uid2_operator_identity_map_services_unmapped_total " )
18661866 .description ("number of optout identifiers passed to identity map batch endpoint by services" )
18671867 .tags (Arrays .asList (Tag .of ("api_contact" , apiContact ),
18681868 Tag .of ("reason" , "optout" ),
@@ -1928,14 +1928,14 @@ private void handleOptoutStatus(RoutingContext rc) {
19281928 private void recordOptOutStatusEndpointStats (RoutingContext rc , int inputCount , int optOutCount ) {
19291929 String apiContact = getApiContact (rc );
19301930 DistributionSummary inputDistSummary = optOutStatusCounters .computeIfAbsent (apiContact , k -> DistributionSummary
1931- .builder ("uid2.operator.optout.status.input_size " )
1931+ .builder ("uid2_operator_optout_status_input_size " )
19321932 .description ("number of UIDs received in request" )
19331933 .tags ("api_contact" , apiContact )
19341934 .register (Metrics .globalRegistry ));
19351935 inputDistSummary .record (inputCount );
19361936
19371937 DistributionSummary optOutDistSummary = optOutStatusCounters .computeIfAbsent (apiContact , k -> DistributionSummary
1938- .builder ("uid2.operator.optout.status.optout_size " )
1938+ .builder ("uid2_operator_optout_status_optout_size " )
19391939 .description ("number of UIDs that have opted out" )
19401940 .tags ("api_contact" , apiContact )
19411941 .register (Metrics .globalRegistry ));
@@ -1956,7 +1956,7 @@ public TokenVersion getRefreshTokenVersion(String s) {
19561956 }
19571957
19581958 private void recordRefreshTokenVersionCount (String siteId , TokenVersion tokenVersion ) {
1959- Counter .builder ("uid2_refresh_token_received_count " )
1959+ Counter .builder ("uid2_refresh_token_received_count_total " )
19601960 .description (String .format ("Counter for the amount of refresh token %s received" , tokenVersion .toString ().toLowerCase ()))
19611961 .tags ("site_id" , siteId )
19621962 .tags ("refresh_token_version" , tokenVersion .toString ().toLowerCase ())
@@ -2017,7 +2017,7 @@ private TokenResponseStatsCollector.PlatformType getPlatformType(RoutingContext
20172017 private void recordRefreshDurationStats (Integer siteId , String apiContact , Duration durationSinceLastRefresh , boolean hasOriginHeader , Duration identityExpiresAfter ) {
20182018 DistributionSummary ds = _refreshDurationMetricSummaries .computeIfAbsent (new Tuple .Tuple2 <>(apiContact , hasOriginHeader ), k ->
20192019 DistributionSummary
2020- .builder ("uid2.token_refresh_duration_seconds " )
2020+ .builder ("uid2_token_refresh_duration_seconds " )
20212021 .description ("duration between token refreshes" )
20222022 .tag ("site_id" , String .valueOf (siteId ))
20232023 .tag ("site_name" , getSiteName (siteProvider , siteId ))
@@ -2030,7 +2030,7 @@ private void recordRefreshDurationStats(Integer siteId, String apiContact, Durat
20302030 boolean isExpired = durationSinceLastRefresh .compareTo (identityExpiresAfter ) > 0 ;
20312031 Counter c = _advertisingTokenExpiryStatus .computeIfAbsent (new Tuple .Tuple3 <>(String .valueOf (siteId ), hasOriginHeader , isExpired ), k ->
20322032 Counter
2033- .builder ("uid2.advertising_token_expired_on_refresh " )
2033+ .builder ("uid2_advertising_token_expired_on_refresh_total " )
20342034 .description ("status of advertiser token expiry" )
20352035 .tag ("site_id" , String .valueOf (siteId ))
20362036 .tag ("site_name" , getSiteName (siteProvider , siteId ))
@@ -2163,15 +2163,15 @@ private Tuple.Tuple2<OptoutCheckPolicy, String> readOptoutCheckPolicy(JsonObject
21632163
21642164 private void recordTokenGeneratePolicy (String apiContact , OptoutCheckPolicy policy , String policyParameterKey ) {
21652165 _tokenGeneratePolicyCounters .computeIfAbsent (new Tuple .Tuple3 <>(apiContact , policy , policyParameterKey ), triple -> Counter
2166- .builder ("uid2.token_generate_policy_usage " )
2166+ .builder ("uid2_token_generate_policy_usage_total " )
21672167 .description ("Counter for token generate policy usage" )
21682168 .tags ("api_contact" , triple .getItem1 (), "policy" , String .valueOf (triple .getItem2 ()), "policy_parameter" , triple .getItem3 ())
21692169 .register (Metrics .globalRegistry )).increment ();
21702170 }
21712171
21722172 private void recordTokenGenerateTCFUsage (String apiContact ) {
21732173 _tokenGenerateTCFUsage .computeIfAbsent (apiContact , contact -> Counter
2174- .builder ("uid2.token_generate_tcf_usage " )
2174+ .builder ("uid2_token_generate_tcf_usage_total " )
21752175 .description ("Counter for token generate tcf usage" )
21762176 .tags ("api_contact" , contact )
21772177 .register (Metrics .globalRegistry )).increment ();
0 commit comments