def setUp(self):
     super().setUp()
     GrpcInstrumentorClient().instrument()
     self.server = create_test_server(25565)
     self.server.start()
     self.channel = grpc.insecure_channel("localhost:25565")
     self._stub = test_server_pb2_grpc.GRPCTestServerStub(self.channel)
Beispiel #2
0
 def setUp(self):
     super().setUp()
     GrpcInstrumentorClient().instrument()
     self.server = create_test_server(25565)
     self.server.start()
     # use a user defined interceptor along with the opentelemetry client interceptor
     interceptors = [Interceptor()]
     self.channel = grpc.insecure_channel("localhost:25565")
     self.channel = grpc.intercept_channel(self.channel, *interceptors)
     self._stub = test_server_pb2_grpc.GRPCTestServerStub(self.channel)
    def setUp(self):
        super().setUp()
        self.server = create_test_server(25565)
        self.server.start()
        meter = metrics.get_meter(__name__)
        interceptor = client_interceptor()
        self.channel = intercept_channel(
            grpc.insecure_channel("localhost:25565"), interceptor
        )
        self._stub = test_server_pb2_grpc.GRPCTestServerStub(self.channel)

        self._controller = PushController(
            meter, self.memory_metrics_exporter, 30
        )