docstr: Test that both HTTP and gRPC proxies are detected by telemetry.
  
  When both HTTP and gRPC proxies are used, both telemetry should be detected.
docstr_tok: ["Test","that","both","HTTP","and","gRPC","proxies","are","detected","by","telemetry",".","When","both","HTTP","and","gRPC","proxies","are","used",",","both","telemetry","should","be","detected","."]
code: def test_both_proxies_detected(manage_ray, ray_shutdown):
      """Test that both HTTP and gRPC proxies are detected by telemetry.
  
      When both HTTP and gRPC proxies are used, both telemetry should be detected.
      """
      result = get_extra_usage_tags_to_report(
          ray.experimental.internal_kv.internal_kv_get_gcs_client()
      )
      report = {"extra_usage_tags": result}
  
      # Ensure neither the HTTP nor gRPC proxy telemetry exist.
      assert (
          ServeUsageTag.HTTP_PROXY_USED.get_value_from_report(report)
          is None
      )
      assert (
          ServeUsageTag.GRPC_PROXY_USED.get_value_from_report(report)
          is None
      )
  
      grpc_servicer_functions = [
          "ray.serve.generated.serve_pb2_grpc."
          "add_UserDefinedServiceServicer_to_server",
      ]
      serve.start(
          grpc_options={
              "grpc_servicer_functions": grpc_servicer_functions
          }
      )
  
      result = get_extra_usage_tags_to_report(
          ray.experimental.internal_kv.internal_kv_get_gcs_client()
      )
      report = {"extra_usage_tags": result}
  
      # Ensure both HTTP and gRPC proxy telemetry exist.
      assert (
          int(
              ServeUsageTag.HTTP_PROXY_USED.get_value_from_report(
                  report
              )
          )
          == 1
      )
      assert (
          int(
              ServeUsageTag.GRPC_PROXY_USED.get_value_from_report(
                  report
              )
          )
          == 1
      )
  
imports: import subprocess
  import sys
  import time
  import pytest
  import requests
  import yaml
  from fastapi import FastAPI
  import ray
  from ray import serve
  from ray._private.test_utils import wait_for_condition
  from ray._private.usage.usage_lib import get_extra_usage_tags_to_report
  from ray.serve._private.common import ApplicationStatus
  from ray.serve._private.constants import SERVE_MULTIPLEXED_MODEL_ID
  from ray.serve._private.test_utils import TELEMETRY_ROUTE_PREFIX, TelemetryStorage, check_ray_started, receiver_app, start_telemetry_app
  from ray.serve._private.usage import ServeUsageTag
  from ray.serve.context import _get_global_client
  from ray.serve.schema import ServeDeploySchema
label_desc: Use image node_id 1 for calling the TestProxyTelemetry obj's underlying member method code with example usage: obj.test_both_proxies_detected(manage_ray, ray_shutdown) without return types