code: def test_multiprotocol_gateway_instrumentation(
      jaeger_port,
      otlp_collector,
      otlp_receiver_port,
  ):
      grpc_port, http_port, websocket_port = (
          random_port(),
          random_port(),
          random_port(),
      )
      f = Flow(
          protocol=["grpc", "http", "websocket"],
          port=[grpc_port, http_port, websocket_port],
          tracing=True,
          traces_exporter_host="http://localhost",
          traces_exporter_port=otlp_receiver_port,
      ).add(
          uses=ExecutorTestWithTracing,
          tracing=True,
          traces_exporter_host="http://localhost",
          traces_exporter_port=otlp_receiver_port,
      )
  
      with f:
          from docarray import DocumentArray
  
          Client(
              protocol="grpc",
              port=grpc_port,
              tracing=True,
              traces_exporter_host="http://localhost",
              traces_exporter_port=otlp_receiver_port,
          ).post(
              f"/search", DocumentArray.empty(), continue_on_error=True
          )
          Client(
              protocol="http",
              port=http_port,
              tracing=True,
              traces_exporter_host="http://localhost",
              traces_exporter_port=otlp_receiver_port,
          ).post(
              f"/search", DocumentArray.empty(), continue_on_error=True
          )
          Client(
              protocol="websocket",
              port=websocket_port,
              tracing=True,
              traces_exporter_host="http://localhost",
              traces_exporter_port=otlp_receiver_port,
          ).post(
              f"/search", DocumentArray.empty(), continue_on_error=True
          )
  
          # give some time for the tracing and metrics exporters to finish exporting.
          # the client is slow to export the data
          time.sleep(20)
  
      services = get_services(jaeger_port)
      expected_services = [
          "executor0/rep-0",
          "gateway/rep-0",
          "GRPCClient",
          "HTTPClient",
          "WebSocketClient",
      ]
      assert len(services) == 5
      assert set(services).issubset(expected_services)
  
      gateway_traces = get_traces(jaeger_port, "gateway/rep-0")
      (
          server_spans,
          client_spans,
          executor_spans,
      ) = partition_spans_by_kind(gateway_traces)
      assert len(client_spans) == 9
      assert len(server_spans) == 10
  
file_path: jina/tests/integration/instrumentation/test_flow_instrumentation.py
imports: import time
  import pytest
  from jina import Client, Flow
  from jina.helper import random_port
  from tests.integration.instrumentation import ExecutorFailureWithTracing, ExecutorTestWithTracing, get_exported_jobs, get_flow_metric_labels, get_histogram_rate_and_exported_jobs_by_name, get_metrics_and_exported_jobs_by_name, get_services, get_trace_ids, get_traces, partition_spans_by_kind, spans_with_error
label_desc: Use image node_id 2 for calling a global function with example usage: test_multiprotocol_gateway_instrumentation(jaeger_port, otlp_collector, otlp_receiver_port) without return types