grpc 1.83.1 → 1.84.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +21 -17
- data/include/grpc/credentials.h +10 -0
- data/include/grpc/grpc_security_constants.h +2 -0
- data/include/grpc/impl/channel_arg_names.h +9 -0
- data/src/core/call/call_filters.h +4 -2
- data/src/core/call/client_call.cc +20 -8
- data/src/core/call/client_call.h +4 -0
- data/src/core/call/interception_chain.cc +2 -0
- data/src/core/call/interception_chain.h +14 -1
- data/src/core/call/metadata.cc +1 -3
- data/src/core/call/metadata_batch.h +13 -5
- data/src/core/call/server_call.cc +31 -14
- data/src/core/call/server_call.h +4 -0
- data/src/core/channelz/text_encode.cc +9 -4
- data/src/core/channelz/v2tov1/convert.cc +2 -2
- data/src/core/client_channel/backup_poller.cc +1 -2
- data/src/core/client_channel/client_channel.cc +6 -33
- data/src/core/client_channel/client_channel_filter.cc +22 -55
- data/src/core/client_channel/client_channel_filter.h +2 -2
- data/src/core/client_channel/client_channel_service_config.cc +3 -19
- data/src/core/client_channel/direct_channel.cc +7 -1
- data/src/core/client_channel/direct_channel.h +2 -2
- data/src/core/client_channel/load_balanced_call_destination.cc +5 -3
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +5 -12
- data/src/core/client_channel/subchannel.cc +310 -1058
- data/src/core/client_channel/subchannel.h +44 -329
- data/src/core/client_channel/subchannel_metrics.cc +48 -0
- data/src/core/client_channel/subchannel_metrics.h +60 -0
- data/src/core/credentials/call/external/file_external_account_credentials.cc +1 -1
- data/src/core/credentials/call/external/url_external_account_credentials.cc +2 -3
- data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +8 -24
- data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.h +3 -6
- data/src/core/credentials/call/gdch_service_account/gdch_service_account_credentials.cc +525 -0
- data/src/core/credentials/call/gdch_service_account/gdch_service_account_credentials.h +138 -0
- data/src/core/credentials/call/json_util.h +1 -0
- data/src/core/credentials/call/jwt/json_token.cc +10 -2
- data/src/core/credentials/call/jwt/jwt_verifier.cc +15 -1
- data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.cc +1 -1
- data/src/core/credentials/call/oauth2/oauth2_credentials.cc +42 -79
- data/src/core/credentials/call/oauth2/oauth2_credentials.h +2 -5
- data/src/core/credentials/call/token_fetcher/token_fetcher_credentials.cc +52 -31
- data/src/core/credentials/call/token_fetcher/token_fetcher_credentials.h +21 -8
- data/src/core/credentials/transport/google_default/google_default_credentials.cc +3 -4
- data/src/core/credentials/transport/ssl/ssl_credentials.cc +59 -72
- data/src/core/credentials/transport/ssl/ssl_credentials.h +9 -8
- data/src/core/credentials/transport/ssl/ssl_security_connector.cc +12 -6
- data/src/core/credentials/transport/ssl/ssl_security_connector.h +4 -4
- data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.cc +29 -18
- data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.h +9 -6
- data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.cc +45 -56
- data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.h +5 -4
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.h +26 -0
- data/src/core/credentials/transport/tls/grpc_tls_crl_provider.cc +1 -1
- data/src/core/credentials/transport/tls/load_system_roots.h +2 -6
- data/src/core/credentials/transport/tls/load_system_roots_fallback.cc +2 -4
- data/src/core/credentials/transport/tls/load_system_roots_supported.cc +13 -15
- data/src/core/credentials/transport/tls/load_system_roots_supported.h +3 -2
- data/src/core/credentials/transport/tls/load_system_roots_windows.cc +5 -8
- data/src/core/credentials/transport/tls/spiffe_utils.cc +1 -1
- data/src/core/credentials/transport/tls/ssl_utils.cc +39 -28
- data/src/core/credentials/transport/tls/ssl_utils.h +12 -49
- data/src/core/credentials/transport/tls/tls_security_connector.cc +48 -33
- data/src/core/credentials/transport/tls/tls_security_connector.h +31 -10
- data/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +15 -11
- data/src/core/ext/filters/http/http_filters_plugin.cc +20 -9
- data/src/core/ext/filters/rbac/rbac_filter.cc +43 -21
- data/src/core/ext/filters/rbac/rbac_filter.h +21 -3
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +2 -2
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +1 -1
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +6 -20
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +32 -67
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +2 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.h +78 -4
- data/src/core/ext/transport/chttp2/transport/frame.h +2 -0
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +3 -4
- data/src/core/ext/transport/chttp2/transport/goaway.h +7 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +5 -3
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +3 -1
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +141 -130
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +22 -22
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +402 -269
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +80 -49
- data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +1 -2
- data/src/core/ext/transport/chttp2/transport/http2_status.h +38 -37
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +178 -5
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +345 -5
- data/src/core/ext/transport/chttp2/transport/parsing.cc +5 -5
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +3 -2
- data/src/core/ext/transport/chttp2/transport/ping_promise.h +25 -5
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +3 -4
- data/src/core/ext/transport/chttp2/transport/read_context.h +30 -3
- data/src/core/ext/transport/chttp2/transport/stream.h +65 -23
- data/src/core/ext/transport/chttp2/transport/writing.cc +0 -3
- data/src/core/ext/transport/inproc/inproc_transport.cc +1 -5
- data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +4 -17
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb.h +1912 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.c +300 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.h +37 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb.h +187 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb_minitable.c +64 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb_minitable.h +31 -0
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb.h +2362 -0
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.c +556 -0
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.h +47 -0
- data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb.h +5 -5
- data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb_minitable.c +3 -3
- data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb_minitable.h +5 -5
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.c +453 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.h +67 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upbdefs.c +142 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upbdefs.h +37 -0
- data/src/core/ext/upbdefs-gen/grpc/channelz/v1/channelz.upbdefs.c +715 -0
- data/src/core/ext/upbdefs-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upbdefs.h +44 -44
- data/src/core/filter/auth/server_auth_filter.cc +2 -3
- data/src/core/filter/composite/composite_filter.cc +45 -33
- data/src/core/filter/composite/composite_filter.h +5 -4
- data/src/core/filter/ext_proc/ext_proc_filter.cc +224 -0
- data/src/core/filter/ext_proc/ext_proc_filter.h +155 -0
- data/src/core/filter/ext_proc/ext_proc_messages.cc +701 -0
- data/src/core/filter/ext_proc/ext_proc_messages.h +297 -0
- data/src/core/filter/filter_args.h +13 -2
- data/src/core/handshaker/http_connect/http_proxy_mapper.cc +30 -3
- data/src/core/handshaker/security/security_handshaker.cc +9 -6
- data/src/core/lib/channel/channel_stack.cc +3 -0
- data/src/core/lib/channel/channel_stack.h +2 -0
- data/src/core/lib/channel/channel_stack_builder_impl.cc +1 -2
- data/src/core/lib/channel/promise_based_filter.cc +132 -20
- data/src/core/lib/channel/promise_based_filter.h +42 -12
- data/src/core/lib/compression/compression_internal.cc +4 -5
- data/src/core/lib/debug/trace_flags.cc +8 -0
- data/src/core/lib/debug/trace_flags.h +3 -0
- data/src/core/lib/event_engine/ares_resolver.cc +54 -50
- data/src/core/lib/event_engine/ares_resolver.h +3 -2
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +3 -3
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +4 -10
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +74 -33
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +4 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +6 -2
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +3 -0
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +3 -0
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +1 -3
- data/src/core/lib/experiments/experiments.cc +60 -96
- data/src/core/lib/experiments/experiments.h +34 -50
- data/src/core/lib/iomgr/cfstream_handle.cc +2 -6
- data/src/core/lib/iomgr/endpoint_cfstream.cc +3 -10
- data/src/core/lib/iomgr/error.cc +2 -6
- data/src/core/lib/iomgr/error_cfstream.cc +1 -1
- data/src/core/lib/iomgr/ev_poll_posix.cc +5 -9
- data/src/core/lib/iomgr/event_engine_shims/closure.cc +1 -1
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +1 -2
- data/src/core/lib/iomgr/event_engine_shims/tcp_client.cc +1 -2
- data/src/core/lib/iomgr/iomgr_posix.cc +0 -4
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +0 -4
- data/src/core/lib/iomgr/iomgr_windows.cc +0 -4
- data/src/core/lib/iomgr/socket_factory_posix.h +1 -1
- data/src/core/lib/iomgr/socket_utils_posix.cc +3 -0
- data/src/core/lib/iomgr/socket_utils_posix.h +3 -0
- data/src/core/lib/iomgr/systemd_utils.cc +0 -1
- data/src/core/lib/iomgr/tcp_client.h +1 -1
- data/src/core/lib/iomgr/tcp_posix.cc +23 -15
- data/src/core/lib/iomgr/tcp_server.h +1 -1
- data/src/core/lib/iomgr/tcp_server_posix.cc +2 -3
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +0 -1
- data/src/core/lib/iomgr/tcp_server_windows.cc +0 -1
- data/src/core/lib/iomgr/tcp_windows.cc +5 -10
- data/src/core/lib/iomgr/unix_sockets_posix.cc +2 -4
- data/src/core/lib/iomgr/unix_sockets_posix.h +3 -1
- data/src/core/lib/iomgr/vsock.h +3 -1
- data/src/core/lib/resource_quota/memory_quota.cc +1 -1
- data/src/core/lib/security/authorization/rbac_policy.cc +139 -56
- data/src/core/lib/security/authorization/rbac_policy.h +21 -3
- data/src/core/lib/surface/call.cc +3 -9
- data/src/core/lib/surface/call_utils.h +113 -0
- data/src/core/lib/surface/channel_create.cc +1 -1
- data/src/core/lib/surface/channel_create.h +0 -2
- data/src/core/lib/surface/channel_init.cc +77 -38
- data/src/core/lib/surface/channel_init.h +30 -16
- data/src/core/lib/surface/filter_stack_call.cc +5 -10
- data/src/core/lib/surface/init.cc +13 -27
- data/src/core/lib/surface/version.cc +1 -1
- data/src/core/lib/transport/error_utils.cc +0 -27
- data/src/core/lib/transport/error_utils.h +0 -16
- data/src/core/lib/transport/transport.h +7 -5
- data/src/core/load_balancing/pick_first/pick_first.cc +2 -0
- data/src/core/load_balancing/rls/rls.cc +28 -11
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +33 -42
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.h +0 -2
- data/src/core/load_balancing/xds/cds.cc +3 -1
- data/src/core/load_balancing/xds/xds_cluster_impl.cc +0 -1
- data/src/core/mitigation_engine/mitigation.h +14 -5
- data/src/core/mitigation_engine/mitigation_engine.h +7 -3
- data/src/core/mitigation_engine/mitigation_provider.h +2 -1
- data/src/core/plugin_registry/grpc_plugin_registry.cc +39 -8
- data/src/core/resolver/dns/{event_engine/event_engine_client_channel_resolver.cc → dns_resolver.cc} +42 -41
- data/src/core/resolver/dns/{event_engine/event_engine_client_channel_resolver.h → dns_resolver.h} +8 -5
- data/src/core/resolver/dns/{event_engine/service_config_helper.cc → service_config_helper.cc} +1 -1
- data/src/core/resolver/dns/{event_engine/service_config_helper.h → service_config_helper.h} +3 -3
- data/src/core/resolver/endpoint_addresses.h +3 -0
- data/src/core/resolver/google_c2p/google_c2p_resolver.cc +2 -1
- data/src/core/resolver/xds/xds_resolver.cc +35 -9
- data/src/core/server/server.cc +2 -6
- data/src/core/server/server_config_selector.h +18 -3
- data/src/core/server/server_config_selector_filter.cc +178 -91
- data/src/core/server/server_config_selector_filter.h +58 -3
- data/src/core/server/xds_server_config_fetcher.cc +196 -129
- data/src/core/server/xds_server_config_fetcher.h +49 -0
- data/src/core/server/xds_server_config_fetcher_legacy.cc +41 -37
- data/src/core/telemetry/histogram.h +94 -14
- data/src/core/telemetry/instrument.cc +179 -74
- data/src/core/telemetry/instrument.h +78 -30
- data/src/core/telemetry/metrics.h +5 -0
- data/src/core/{resolver/dns/dns_resolver_plugin.h → telemetry/telemetry_label.h} +12 -8
- data/src/core/tsi/alts/crypt/aes_gcm.cc +10 -13
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +2 -2
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +3 -1
- data/src/core/tsi/ssl_telemetry_utils.cc +216 -259
- data/src/core/tsi/ssl_telemetry_utils.h +12 -2
- data/src/core/tsi/ssl_transport_security.cc +238 -80
- data/src/core/tsi/ssl_transport_security.h +63 -33
- data/src/core/tsi/tls_telemetry.cc +31 -0
- data/src/core/tsi/tls_telemetry.h +47 -0
- data/src/core/tsi/transport_security.cc +2 -2
- data/src/core/tsi/transport_security.h +1 -1
- data/src/core/tsi/transport_security_interface.h +1 -1
- data/src/core/{resolver/dns/native/dns_resolver.h → util/address_sorting_init.cc} +21 -8
- data/src/core/{resolver/dns/c_ares/grpc_ares_wrapper_posix.cc → util/address_sorting_init.h} +7 -8
- data/src/core/util/http_client/httpcli.cc +16 -53
- data/src/core/util/http_client/httpcli.h +0 -7
- data/src/core/util/http_client/httpcli_security_connector.cc +13 -8
- data/src/core/util/linux/cpu.cc +1 -1
- data/src/core/util/load_file.cc +3 -9
- data/src/core/util/load_file.h +3 -4
- data/src/core/util/matchers.h +8 -0
- data/src/core/util/posix/cpu.cc +1 -1
- data/src/core/util/status_helper.cc +0 -20
- data/src/core/util/status_helper.h +3 -14
- data/src/core/xds/grpc/xds_audit_logger_registry.cc +51 -31
- data/src/core/xds/grpc/xds_audit_logger_registry.h +17 -3
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +2 -10
- data/src/core/xds/grpc/xds_bootstrap_grpc.h +8 -6
- data/src/core/xds/grpc/xds_bootstrap_grpc_builder.cc +488 -0
- data/src/core/xds/grpc/xds_bootstrap_grpc_builder.h +97 -0
- data/src/core/xds/grpc/xds_certificate_provider.cc +7 -7
- data/src/core/xds/grpc/xds_client_grpc.cc +4 -8
- data/src/core/xds/grpc/xds_client_grpc.h +0 -4
- data/src/core/xds/grpc/xds_cluster.h +1 -0
- data/src/core/xds/grpc/xds_cluster_parser.cc +1 -5
- data/src/core/xds/grpc/xds_cluster_parser.h +0 -2
- data/src/core/xds/grpc/xds_cluster_specifier_plugin.cc +0 -2
- data/src/core/xds/grpc/xds_cluster_specifier_plugin.h +0 -2
- data/src/core/xds/grpc/xds_common_types.cc +0 -91
- data/src/core/xds/grpc/xds_common_types.h +1 -47
- data/src/core/xds/grpc/xds_common_types_parser.cc +84 -378
- data/src/core/xds/grpc/xds_common_types_parser.h +9 -11
- data/src/core/xds/grpc/xds_endpoint_parser.cc +0 -2
- data/src/core/xds/grpc/xds_grpc_service_parser.cc +177 -0
- data/src/core/{resolver/dns/c_ares/dns_resolver_ares.h → xds/grpc/xds_grpc_service_parser.h} +14 -9
- data/src/core/xds/grpc/xds_http_composite_filter.cc +26 -21
- data/src/core/xds/grpc/xds_http_composite_filter.h +4 -3
- data/src/core/xds/grpc/xds_http_ext_proc_filter.cc +418 -0
- data/src/core/xds/grpc/xds_http_ext_proc_filter.h +89 -0
- data/src/core/xds/grpc/xds_http_fault_filter.cc +9 -12
- data/src/core/xds/grpc/xds_http_fault_filter.h +1 -4
- data/src/core/xds/grpc/xds_http_filter.cc +2 -1
- data/src/core/xds/grpc/xds_http_filter.h +6 -5
- data/src/core/xds/grpc/xds_http_filter_registry.cc +10 -127
- data/src/core/xds/grpc/xds_http_filter_registry.h +7 -59
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +13 -14
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +3 -2
- data/src/core/xds/grpc/xds_http_rbac_filter.cc +403 -25
- data/src/core/xds/grpc/xds_http_rbac_filter.h +1 -3
- data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +8 -13
- data/src/core/xds/grpc/xds_http_stateful_session_filter.h +1 -4
- data/src/core/xds/grpc/xds_lb_policy_registry.cc +0 -292
- data/src/core/xds/grpc/xds_lb_policy_registry.h +7 -3
- data/src/core/xds/grpc/xds_listener.cc +2 -0
- data/src/core/xds/grpc/xds_listener.h +5 -0
- data/src/core/xds/grpc/xds_listener_parser.cc +16 -11
- data/src/core/xds/grpc/xds_matcher_parse.h +3 -1
- data/src/core/xds/grpc/xds_metadata_parser.cc +6 -1
- data/src/core/xds/grpc/xds_metadata_parser.h +2 -0
- data/src/core/xds/grpc/xds_route_config.cc +2 -0
- data/src/core/xds/grpc/xds_route_config.h +3 -1
- data/src/core/xds/grpc/xds_route_config_parser.cc +13 -79
- data/src/core/xds/grpc/xds_route_config_parser.h +0 -3
- data/src/core/xds/grpc/xds_routing.cc +116 -69
- data/src/core/xds/grpc/xds_routing.h +19 -8
- data/src/core/xds/grpc/xds_tls_context.cc +117 -0
- data/src/core/xds/grpc/xds_tls_context.h +76 -0
- data/src/core/xds/grpc/xds_tls_context_parser.cc +275 -0
- data/src/core/xds/grpc/xds_tls_context_parser.h +35 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +41 -38
- data/src/core/xds/grpc/xds_transport_grpc.h +4 -2
- data/src/ruby/ext/grpc/rb_call.c +26 -15
- data/src/ruby/ext/grpc/rb_completion_queue.c +6 -5
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +3 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/test/client.rb +5 -4
- data/src/ruby/spec/call_spec.rb +14 -0
- data/src/ruby/spec/generic/server_interceptors_spec.rb +3 -6
- metadata +50 -35
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/channelz.upbdefs.c +0 -716
- data/src/core/lib/iomgr/resolve_address.cc +0 -59
- data/src/core/lib/iomgr/resolve_address.h +0 -125
- data/src/core/lib/iomgr/resolve_address_impl.h +0 -58
- data/src/core/lib/iomgr/resolve_address_posix.cc +0 -184
- data/src/core/lib/iomgr/resolve_address_posix.h +0 -78
- data/src/core/lib/iomgr/resolve_address_windows.cc +0 -169
- data/src/core/lib/iomgr/resolve_address_windows.h +0 -76
- data/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +0 -781
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h +0 -93
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +0 -203
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +0 -838
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc +0 -1237
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h +0 -130
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +0 -35
- data/src/core/resolver/dns/dns_resolver_plugin.cc +0 -64
- data/src/core/resolver/dns/native/dns_resolver.cc +0 -173
- data/src/core/util/json/json_util.cc +0 -101
- data/src/core/util/json/json_util.h +0 -163
|
@@ -53,7 +53,10 @@
|
|
|
53
53
|
// * **Counter:** A metric that only increases. Uses `RegisterCounter` and
|
|
54
54
|
// `Storage::Increment`.
|
|
55
55
|
// * **Histogram:** Tracks the distribution of values. Uses
|
|
56
|
-
// `
|
|
56
|
+
// * `DoubleHistogram`: for double values.
|
|
57
|
+
// * `Int64Histogram`: for int64_t values.
|
|
58
|
+
// Uses `RegisterInt64Histogram`, `RegisterDoubleHistogram` and
|
|
59
|
+
// `Storage::Increment`.
|
|
57
60
|
// * **Gauges:** Metrics that can go up or down, representing a current value.
|
|
58
61
|
// * `DoubleGauge`: for double values.
|
|
59
62
|
// * `IntGauge`: for int64_t values.
|
|
@@ -393,9 +396,11 @@ class InstrumentMetadata {
|
|
|
393
396
|
struct DoubleGaugeShape {};
|
|
394
397
|
struct IntGaugeShape {};
|
|
395
398
|
struct UintGaugeShape {};
|
|
396
|
-
using
|
|
399
|
+
using Int64HistogramShape = Int64HistogramBuckets;
|
|
400
|
+
using DoubleHistogramShape = DoubleHistogramBuckets;
|
|
397
401
|
|
|
398
|
-
using Shape = std::variant<CounterShape, UpDownCounterShape,
|
|
402
|
+
using Shape = std::variant<CounterShape, UpDownCounterShape,
|
|
403
|
+
Int64HistogramShape, DoubleHistogramShape,
|
|
399
404
|
DoubleGaugeShape, IntGaugeShape, UintGaugeShape>;
|
|
400
405
|
|
|
401
406
|
// A description of a metric.
|
|
@@ -428,10 +433,13 @@ class MetricsSink;
|
|
|
428
433
|
// to be called when histogram data is collected.
|
|
429
434
|
// This comes with a relatively sever performance penalty. We'd like to be able
|
|
430
435
|
// to remove this in the future.
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
absl::
|
|
434
|
-
|
|
436
|
+
template <typename T>
|
|
437
|
+
using InstrumentCollectionHook =
|
|
438
|
+
absl::AnyInvocable<void(const InstrumentMetadata::Description* instrument,
|
|
439
|
+
absl::Span<const std::string> labels, T value)>;
|
|
440
|
+
|
|
441
|
+
template <typename T>
|
|
442
|
+
void RegisterInstrumentCollectionHook(InstrumentCollectionHook<T> hook);
|
|
435
443
|
|
|
436
444
|
// Defines a scope for collecting metrics, identified by a set of labels of
|
|
437
445
|
// interest. Metric collection via GetStorage+Increment will be filtered
|
|
@@ -491,9 +499,10 @@ class CollectionScope : public RefCounted<CollectionScope> {
|
|
|
491
499
|
|
|
492
500
|
namespace instrument_detail {
|
|
493
501
|
|
|
494
|
-
|
|
502
|
+
template <typename T>
|
|
503
|
+
void CallInstrumentCollectionHooks(
|
|
495
504
|
const InstrumentMetadata::Description* instrument,
|
|
496
|
-
absl::Span<const std::string> labels,
|
|
505
|
+
absl::Span<const std::string> labels, T value);
|
|
497
506
|
|
|
498
507
|
class GaugeStorage {
|
|
499
508
|
public:
|
|
@@ -652,9 +661,12 @@ class QueryableDomain {
|
|
|
652
661
|
const InstrumentMetadata::Description* AllocateUpDownCounter(
|
|
653
662
|
absl::string_view name, absl::string_view description,
|
|
654
663
|
absl::string_view unit);
|
|
655
|
-
const InstrumentMetadata::Description*
|
|
664
|
+
const InstrumentMetadata::Description* AllocateInt64Histogram(
|
|
656
665
|
absl::string_view name, absl::string_view description,
|
|
657
|
-
absl::string_view unit,
|
|
666
|
+
absl::string_view unit, Int64HistogramBuckets bounds);
|
|
667
|
+
const InstrumentMetadata::Description* AllocateDoubleHistogram(
|
|
668
|
+
absl::string_view name, absl::string_view description,
|
|
669
|
+
absl::string_view unit, DoubleHistogramBuckets bounds);
|
|
658
670
|
const InstrumentMetadata::Description* AllocateDoubleGauge(
|
|
659
671
|
absl::string_view name, absl::string_view description,
|
|
660
672
|
absl::string_view unit);
|
|
@@ -836,10 +848,16 @@ class MetricsSink {
|
|
|
836
848
|
virtual void UpDownCounter(InstrumentLabelList label_keys,
|
|
837
849
|
absl::Span<const std::string> label_values,
|
|
838
850
|
absl::string_view name, uint64_t value) = 0;
|
|
839
|
-
virtual void
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
851
|
+
virtual void Int64Histogram(InstrumentLabelList label_keys,
|
|
852
|
+
absl::Span<const std::string> label_values,
|
|
853
|
+
absl::string_view name,
|
|
854
|
+
Int64HistogramBuckets bounds,
|
|
855
|
+
absl::Span<const uint64_t> counts) = 0;
|
|
856
|
+
virtual void DoubleHistogram(InstrumentLabelList label_keys,
|
|
857
|
+
absl::Span<const std::string> label_values,
|
|
858
|
+
absl::string_view name,
|
|
859
|
+
DoubleHistogramBuckets bounds,
|
|
860
|
+
absl::Span<const uint64_t> counts) = 0;
|
|
843
861
|
virtual void DoubleGauge(InstrumentLabelList label_keys,
|
|
844
862
|
absl::Span<const std::string> label_values,
|
|
845
863
|
absl::string_view name, double value) = 0;
|
|
@@ -900,7 +918,8 @@ template <typename Shape, typename... Args>
|
|
|
900
918
|
Shape* GetMemoizedShape(Args&&... args) {
|
|
901
919
|
// Many histograms are created with the same shape, so we try to deduplicate
|
|
902
920
|
// them.
|
|
903
|
-
using ShapeCache =
|
|
921
|
+
using ShapeCache =
|
|
922
|
+
absl::node_hash_map<std::tuple<std::decay_t<Args>...>, Shape*>;
|
|
904
923
|
static ShapeCache* shape_cache = new ShapeCache();
|
|
905
924
|
auto it =
|
|
906
925
|
shape_cache->find(std::forward_as_tuple(std::forward<Args>(args)...));
|
|
@@ -909,8 +928,8 @@ Shape* GetMemoizedShape(Args&&... args) {
|
|
|
909
928
|
shape = it->second;
|
|
910
929
|
} else {
|
|
911
930
|
shape = new Shape(std::forward<Args>(args)...);
|
|
912
|
-
shape_cache->emplace(
|
|
913
|
-
|
|
931
|
+
shape_cache->emplace(
|
|
932
|
+
std::tuple<std::decay_t<Args>...>(std::forward<Args>(args)...), shape);
|
|
914
933
|
}
|
|
915
934
|
return shape;
|
|
916
935
|
}
|
|
@@ -1007,10 +1026,17 @@ class InstrumentDomainImpl final : public QueryableDomain {
|
|
|
1007
1026
|
}
|
|
1008
1027
|
}
|
|
1009
1028
|
|
|
1010
|
-
template <typename Shape>
|
|
1011
|
-
void Increment(const HistogramHandle<Shape>& handle,
|
|
1029
|
+
template <typename Shape, typename T>
|
|
1030
|
+
void Increment(const HistogramHandle<Shape>& handle, T value) {
|
|
1012
1031
|
GRPC_DCHECK_EQ(handle.instrument_domain_, domain());
|
|
1013
|
-
|
|
1032
|
+
if constexpr (std::is_same_v<Shape, LinearDoubleHistogramShape> ||
|
|
1033
|
+
std::is_same_v<Shape, ExponentialDoubleHistogramShape>) {
|
|
1034
|
+
CallInstrumentCollectionHooks<double>(handle.description_, label(),
|
|
1035
|
+
static_cast<double>(value));
|
|
1036
|
+
} else {
|
|
1037
|
+
CallInstrumentCollectionHooks<int64_t>(handle.description_, label(),
|
|
1038
|
+
static_cast<int64_t>(value));
|
|
1039
|
+
}
|
|
1014
1040
|
backend_.Add(handle.offset_ + handle.shape_->BucketFor(value), 1);
|
|
1015
1041
|
}
|
|
1016
1042
|
|
|
@@ -1078,13 +1104,24 @@ class InstrumentDomainImpl final : public QueryableDomain {
|
|
|
1078
1104
|
}
|
|
1079
1105
|
|
|
1080
1106
|
template <typename Shape, typename... Args>
|
|
1081
|
-
HistogramHandle<Shape>
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1107
|
+
HistogramHandle<Shape> RegisterInt64Histogram(absl::string_view name,
|
|
1108
|
+
absl::string_view description,
|
|
1109
|
+
absl::string_view unit,
|
|
1110
|
+
Args&&... args) {
|
|
1085
1111
|
auto* shape = GetMemoizedShape<Shape>(std::forward<Args>(args)...);
|
|
1086
1112
|
const auto* desc =
|
|
1087
|
-
|
|
1113
|
+
AllocateInt64Histogram(name, description, unit, shape->bounds());
|
|
1114
|
+
return HistogramHandle<Shape>{this, desc, shape};
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
template <typename Shape, typename... Args>
|
|
1118
|
+
HistogramHandle<Shape> RegisterDoubleHistogram(absl::string_view name,
|
|
1119
|
+
absl::string_view description,
|
|
1120
|
+
absl::string_view unit,
|
|
1121
|
+
Args&&... args) {
|
|
1122
|
+
auto* shape = GetMemoizedShape<Shape>(std::forward<Args>(args)...);
|
|
1123
|
+
const auto* desc =
|
|
1124
|
+
AllocateDoubleHistogram(name, description, unit, shape->bounds());
|
|
1088
1125
|
return HistogramHandle<Shape>{this, desc, shape};
|
|
1089
1126
|
}
|
|
1090
1127
|
|
|
@@ -1152,6 +1189,9 @@ class InstrumentDomain {
|
|
|
1152
1189
|
template <typename Shape>
|
|
1153
1190
|
using HistogramHandle =
|
|
1154
1191
|
instrument_detail::InstrumentHandle<const Shape*, Derived>;
|
|
1192
|
+
template <typename Shape>
|
|
1193
|
+
using DoubleHistogramHandle =
|
|
1194
|
+
instrument_detail::InstrumentHandle<const Shape*, Derived>;
|
|
1155
1195
|
|
|
1156
1196
|
static auto* Domain() {
|
|
1157
1197
|
static const auto labels = Derived::Labels();
|
|
@@ -1212,10 +1252,18 @@ class InstrumentDomain {
|
|
|
1212
1252
|
}
|
|
1213
1253
|
|
|
1214
1254
|
template <typename Shape, typename... Args>
|
|
1215
|
-
static auto
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
return Domain()->template
|
|
1255
|
+
static auto RegisterInt64Histogram(absl::string_view name,
|
|
1256
|
+
absl::string_view description,
|
|
1257
|
+
absl::string_view unit, Args&&... args) {
|
|
1258
|
+
return Domain()->template RegisterInt64Histogram<Shape>(
|
|
1259
|
+
name, description, unit, std::forward<Args>(args)...);
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
template <typename Shape, typename... Args>
|
|
1263
|
+
static auto RegisterDoubleHistogram(absl::string_view name,
|
|
1264
|
+
absl::string_view description,
|
|
1265
|
+
absl::string_view unit, Args&&... args) {
|
|
1266
|
+
return Domain()->template RegisterDoubleHistogram<Shape>(
|
|
1219
1267
|
name, description, unit, std::forward<Args>(args)...);
|
|
1220
1268
|
}
|
|
1221
1269
|
|
|
@@ -39,6 +39,10 @@
|
|
|
39
39
|
namespace grpc_core {
|
|
40
40
|
|
|
41
41
|
constexpr absl::string_view kMetricLabelTarget = "grpc.target";
|
|
42
|
+
constexpr absl::string_view kMetricLabelTelemetry = "grpc.client.call.custom";
|
|
43
|
+
constexpr absl::string_view kMetricLabelBackendService =
|
|
44
|
+
"grpc.lb.backend_service";
|
|
45
|
+
constexpr absl::string_view kMetricLabelLocality = "grpc.lb.locality";
|
|
42
46
|
|
|
43
47
|
// A global registry of instruments(metrics). This API is designed to be used
|
|
44
48
|
// to register instruments (Counter, Histogram, and Gauge) as part of program
|
|
@@ -327,6 +331,7 @@ class StatsPlugin {
|
|
|
327
331
|
GlobalInstrumentsRegistry::GlobalInstrumentHandle handle, double value,
|
|
328
332
|
absl::Span<const absl::string_view> label_values,
|
|
329
333
|
absl::Span<const absl::string_view> optional_label_values) = 0;
|
|
334
|
+
|
|
330
335
|
// Records a uint64 \a value to the histogram specified by \a handle. \a
|
|
331
336
|
// label_values and \a optional_label_values specify attributes that are
|
|
332
337
|
// associated with this measurement and must match with their corresponding
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright
|
|
1
|
+
// Copyright 2026 gRPC authors.
|
|
2
2
|
//
|
|
3
3
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
// you may not use this file except in compliance with the License.
|
|
@@ -11,17 +11,21 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
#ifndef GRPC_SRC_CORE_RESOLVER_DNS_DNS_RESOLVER_PLUGIN_H
|
|
15
|
-
#define GRPC_SRC_CORE_RESOLVER_DNS_DNS_RESOLVER_PLUGIN_H
|
|
16
|
-
#include <grpc/support/port_platform.h>
|
|
17
14
|
|
|
18
|
-
#
|
|
15
|
+
#ifndef GRPC_SRC_CORE_TELEMETRY_TELEMETRY_LABEL_H
|
|
16
|
+
#define GRPC_SRC_CORE_TELEMETRY_TELEMETRY_LABEL_H
|
|
17
|
+
|
|
18
|
+
#include <grpc/context_types.h>
|
|
19
|
+
|
|
20
|
+
#include "src/core/lib/resource_quota/arena.h"
|
|
19
21
|
|
|
20
22
|
namespace grpc_core {
|
|
21
23
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
template <>
|
|
25
|
+
struct ArenaContextType<TelemetryLabel> {
|
|
26
|
+
static void Destroy(TelemetryLabel*) {}
|
|
27
|
+
};
|
|
24
28
|
|
|
25
29
|
} // namespace grpc_core
|
|
26
30
|
|
|
27
|
-
#endif //
|
|
31
|
+
#endif // GRPC_SRC_CORE_TELEMETRY_TELEMETRY_LABEL_H
|
|
@@ -364,15 +364,14 @@ static grpc_status_code gsec_aes_gcm_aead_crypter_encrypt_iovec(
|
|
|
364
364
|
if (aad_length == 0) {
|
|
365
365
|
continue;
|
|
366
366
|
}
|
|
367
|
-
|
|
367
|
+
int aad_bytes_read = 0;
|
|
368
368
|
if (aad == nullptr) {
|
|
369
369
|
aes_gcm_format_errors("aad is nullptr.", error_details);
|
|
370
370
|
return GRPC_STATUS_INVALID_ARGUMENT;
|
|
371
371
|
}
|
|
372
|
-
if (!EVP_EncryptUpdate(aes_gcm_crypter->ctx, nullptr,
|
|
373
|
-
reinterpret_cast<int*>(&aad_bytes_read), aad,
|
|
372
|
+
if (!EVP_EncryptUpdate(aes_gcm_crypter->ctx, nullptr, &aad_bytes_read, aad,
|
|
374
373
|
static_cast<int>(aad_length)) ||
|
|
375
|
-
aad_bytes_read != aad_length) {
|
|
374
|
+
static_cast<size_t>(aad_bytes_read) != aad_length) {
|
|
376
375
|
aes_gcm_format_errors("Setting authenticated associated data failed",
|
|
377
376
|
error_details);
|
|
378
377
|
return GRPC_STATUS_INTERNAL;
|
|
@@ -514,15 +513,14 @@ static grpc_status_code gsec_aes_gcm_aead_crypter_decrypt_iovec(
|
|
|
514
513
|
if (aad_length == 0) {
|
|
515
514
|
continue;
|
|
516
515
|
}
|
|
517
|
-
|
|
516
|
+
int aad_bytes_read = 0;
|
|
518
517
|
if (aad == nullptr) {
|
|
519
518
|
aes_gcm_format_errors("aad is nullptr.", error_details);
|
|
520
519
|
return GRPC_STATUS_INVALID_ARGUMENT;
|
|
521
520
|
}
|
|
522
|
-
if (!EVP_DecryptUpdate(aes_gcm_crypter->ctx, nullptr,
|
|
523
|
-
reinterpret_cast<int*>(&aad_bytes_read), aad,
|
|
521
|
+
if (!EVP_DecryptUpdate(aes_gcm_crypter->ctx, nullptr, &aad_bytes_read, aad,
|
|
524
522
|
static_cast<int>(aad_length)) ||
|
|
525
|
-
aad_bytes_read != aad_length) {
|
|
523
|
+
static_cast<size_t>(aad_bytes_read) != aad_length) {
|
|
526
524
|
aes_gcm_format_errors("Setting authenticated associated data failed.",
|
|
527
525
|
error_details);
|
|
528
526
|
return GRPC_STATUS_INTERNAL;
|
|
@@ -552,7 +550,7 @@ static grpc_status_code gsec_aes_gcm_aead_crypter_decrypt_iovec(
|
|
|
552
550
|
memset(plaintext_vec.iov_base, 0x00, plaintext_vec.iov_len);
|
|
553
551
|
return GRPC_STATUS_INVALID_ARGUMENT;
|
|
554
552
|
}
|
|
555
|
-
|
|
553
|
+
int bytes_written = 0;
|
|
556
554
|
size_t bytes_to_write = ciphertext_length;
|
|
557
555
|
// Don't include the tag
|
|
558
556
|
if (bytes_to_write > total_ciphertext_length - kAesGcmTagLength) {
|
|
@@ -564,14 +562,13 @@ static grpc_status_code gsec_aes_gcm_aead_crypter_decrypt_iovec(
|
|
|
564
562
|
error_details);
|
|
565
563
|
return GRPC_STATUS_INVALID_ARGUMENT;
|
|
566
564
|
}
|
|
567
|
-
if (!EVP_DecryptUpdate(aes_gcm_crypter->ctx, plaintext,
|
|
568
|
-
|
|
569
|
-
static_cast<int>(bytes_to_write))) {
|
|
565
|
+
if (!EVP_DecryptUpdate(aes_gcm_crypter->ctx, plaintext, &bytes_written,
|
|
566
|
+
ciphertext, static_cast<int>(bytes_to_write))) {
|
|
570
567
|
aes_gcm_format_errors("Decrypting ciphertext failed.", error_details);
|
|
571
568
|
memset(plaintext_vec.iov_base, 0x00, plaintext_vec.iov_len);
|
|
572
569
|
return GRPC_STATUS_INTERNAL;
|
|
573
570
|
}
|
|
574
|
-
if (bytes_written > ciphertext_length) {
|
|
571
|
+
if (static_cast<size_t>(bytes_written) > ciphertext_length) {
|
|
575
572
|
aes_gcm_format_errors("More bytes written than expected.", error_details);
|
|
576
573
|
memset(plaintext_vec.iov_base, 0x00, plaintext_vec.iov_len);
|
|
577
574
|
return GRPC_STATUS_INTERNAL;
|
|
@@ -652,7 +652,7 @@ static tsi_result handshaker_next_dedicated(
|
|
|
652
652
|
user_data, error);
|
|
653
653
|
}
|
|
654
654
|
|
|
655
|
-
static void handshaker_shutdown(tsi_handshaker* self) {
|
|
655
|
+
static void handshaker_shutdown(tsi_handshaker* self, bool /*peer_closed*/) {
|
|
656
656
|
GRPC_CHECK_NE(self, nullptr);
|
|
657
657
|
alts_tsi_handshaker* handshaker =
|
|
658
658
|
reinterpret_cast<alts_tsi_handshaker*>(self);
|
|
@@ -741,7 +741,7 @@ void alts_tsi_handshaker_result_set_unused_bytes(tsi_handshaker_result* result,
|
|
|
741
741
|
size_t bytes_consumed) {
|
|
742
742
|
GRPC_CHECK(recv_bytes != nullptr);
|
|
743
743
|
GRPC_CHECK_NE(result, nullptr);
|
|
744
|
-
if (GRPC_SLICE_LENGTH(*recv_bytes)
|
|
744
|
+
if (GRPC_SLICE_LENGTH(*recv_bytes) <= bytes_consumed) {
|
|
745
745
|
return;
|
|
746
746
|
}
|
|
747
747
|
alts_tsi_handshaker_result* sresult =
|
|
@@ -22,9 +22,11 @@
|
|
|
22
22
|
#include <grpc/grpc.h>
|
|
23
23
|
#include <grpc/support/port_platform.h>
|
|
24
24
|
|
|
25
|
+
#include <optional>
|
|
26
|
+
#include <string>
|
|
27
|
+
|
|
25
28
|
#include "src/core/credentials/transport/alts/grpc_alts_credentials_options.h"
|
|
26
29
|
#include "src/core/lib/iomgr/pollset_set.h"
|
|
27
|
-
#include "src/core/tsi/alts/handshaker/alts_handshaker_client.h"
|
|
28
30
|
#include "src/core/tsi/transport_security.h"
|
|
29
31
|
#include "src/core/tsi/transport_security_interface.h"
|
|
30
32
|
#include "src/proto/grpc/gcp/altscontext.upb.h"
|