@@ -747,7 +747,7 @@ def _serve_with_auth() -> None:
747747 for metric in scope_metric .metrics :
748748 if metric .name == "rpc.server.requests" :
749749 for dp in metric .data .data_points :
750- attrs = dict (dp .attributes or {}) # type: ignore[union-attr]
750+ attrs = dict (dp .attributes or {})
751751 if attrs .get ("rpc.vgi_rpc.auth.domain" ) == "jwt" :
752752 found_domain = True
753753 assert found_domain , "rpc.vgi_rpc.auth.domain not found in metrics"
@@ -958,7 +958,7 @@ def _alternating_auth(req: object) -> AuthContext:
958958 for metric in scope_metric .metrics :
959959 if metric .name == "rpc.server.auth_failure" :
960960 for dp in metric .data .data_points :
961- attrs = dict (dp .attributes or {}) # type: ignore[union-attr]
961+ attrs = dict (dp .attributes or {})
962962 et = attrs .get ("error.type" )
963963 if et :
964964 error_types .add (str (et ))
@@ -1012,7 +1012,7 @@ def _bad_auth(req: object) -> AuthContext:
10121012 for metric in scope_metric .metrics :
10131013 if metric .name == "rpc.server.auth_failure" :
10141014 for dp in metric .data .data_points :
1015- attrs = dict (dp .attributes or {}) # type: ignore[union-attr]
1015+ attrs = dict (dp .attributes or {})
10161016 if attrs .get ("deployment.environment" ) == "test" :
10171017 found_env = True
10181018 assert found_env , "custom_attributes not found on auth failure counter"
0 commit comments