Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
lzchen committed Jul 30, 2020
1 parent 91dd6a4 commit 53a1454
Show file tree
Hide file tree
Showing 28 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
import grpc

from opentelemetry import trace
from opentelemetry.instrumentation.grpc import client_interceptor
from opentelemetry.instrumentation.grpc.grpcext import intercept_channel
from opentelemetry.instrumentation.grpcz import client_interceptor
from opentelemetry.instrumentation.grpcz.grpcext import intercept_channel
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
import grpc

from opentelemetry import trace
from opentelemetry.instrumentation.grpc import server_interceptor
from opentelemetry.instrumentation.grpc.grpcext import intercept_server
from opentelemetry.instrumentation.grpcz import server_interceptor
from opentelemetry.instrumentation.grpcz.grpcext import intercept_server
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
import grpc

from opentelemetry import trace
from opentelemetry.instrumentation.grpc import client_interceptor
from opentelemetry.instrumentation.grpc.grpcext import intercept_channel
from opentelemetry.instrumentation.grpcz import client_interceptor
from opentelemetry.instrumentation.grpcz.grpcext import intercept_channel
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
import grpc

from opentelemetry import trace
from opentelemetry.instrumentation.grpc import server_interceptor
from opentelemetry.instrumentation.grpc.grpcext import intercept_server
from opentelemetry.instrumentation.grpcz import server_interceptor
from opentelemetry.instrumentation.grpcz.grpcext import intercept_server
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down
2 changes: 1 addition & 1 deletion docs/instrumentation/grpc/grpc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OpenTelemetry gRPC Instrumentation
Module contents
---------------

.. automodule:: opentelemetry.instrumentation.grpc
.. automodule:: opentelemetry.instrumentation.grpcz
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"opentelemetry.ext.dbapi": DatadogSpanTypes.SQL,
"opentelemetry.instrumentation.django": DatadogSpanTypes.WEB,
"opentelemetry.instrumentation.flask": DatadogSpanTypes.WEB,
"opentelemetry.instrumentation.grpc": DatadogSpanTypes.GRPC,
"opentelemetry.instrumentation.grpcz": DatadogSpanTypes.GRPC,
"opentelemetry.ext.jinja2": DatadogSpanTypes.TEMPLATE,
"opentelemetry.ext.mysql": DatadogSpanTypes.SQL,
"opentelemetry.ext.psycopg2": DatadogSpanTypes.SQL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def test_span_types(self):
"opentelemetry.ext.dbapi",
"opentelemetry.instrumentation.django",
"opentelemetry.instrumentation.flask",
"opentelemetry.instrumentation.grpc",
"opentelemetry.instrumentation.grpcz",
"opentelemetry.ext.jinja2",
"opentelemetry.ext.mysql",
"opentelemetry.ext.psycopg2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ where = src

[options.entry_points]
opentelemetry_instrumentor =
grpc_client = opentelemetry.instrumentation.grpc:GrpcInstrumentorClient
grpc_server = opentelemetry.instrumentation.grpc:GrpcInstrumentorServer
grpc_client = opentelemetry.instrumentation.grpcz:GrpcInstrumentorClient
grpc_server = opentelemetry.instrumentation.grpcz:GrpcInstrumentorServer
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import grpc
from opentelemetry import trace
from opentelemetry.instrumentation.grpc import GrpcInstrumentorClient, client_interceptor
from opentelemetry.instrumentation.grpcz import GrpcInstrumentorClient, client_interceptor
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down Expand Up @@ -77,8 +77,8 @@ def run():
import grpc
from opentelemetry import trace
from opentelemetry.instrumentation.grpc import GrpcInstrumentorServer, server_interceptor
from opentelemetry.instrumentation.grpc.grpcext import intercept_server
from opentelemetry.instrumentation.grpcz import GrpcInstrumentorServer, server_interceptor
from opentelemetry.instrumentation.grpcz.grpcext import intercept_server
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import (
ConsoleSpanExporter,
Expand Down Expand Up @@ -124,11 +124,11 @@ def serve():
from wrapt import wrap_function_wrapper as _wrap

from opentelemetry import trace
from opentelemetry.instrumentation.grpc.grpcext import (
from opentelemetry.instrumentation.grpcz.grpcext import (
intercept_channel,
intercept_server,
)
from opentelemetry.instrumentation.grpc.version import __version__
from opentelemetry.instrumentation.grpcz.version import __version__
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
from opentelemetry.instrumentation.utils import unwrap

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

import grpc

import opentelemetry.instrumentation.grpc
import opentelemetry.instrumentation.grpcz
from opentelemetry import trace
from opentelemetry.instrumentation.grpc import GrpcInstrumentorClient
from opentelemetry.instrumentation.grpcz import GrpcInstrumentorClient
from opentelemetry.sdk.metrics.export.aggregate import (
MinMaxSumCountAggregator,
SumAggregator,
Expand Down Expand Up @@ -108,7 +108,7 @@ def test_unary_unary(self):

# Check version and name in span's instrumentation info
self.check_span_instrumentation_info(
span, opentelemetry.instrumentation.grpc
span, opentelemetry.instrumentation.grpcz
)

self._verify_success_records(8, 8, "/GRPCTestServer/SimpleMethod")
Expand All @@ -124,7 +124,7 @@ def test_unary_stream(self):

# Check version and name in span's instrumentation info
self.check_span_instrumentation_info(
span, opentelemetry.instrumentation.grpc
span, opentelemetry.instrumentation.grpcz
)

self._verify_success_records(
Expand All @@ -142,7 +142,7 @@ def test_stream_unary(self):

# Check version and name in span's instrumentation info
self.check_span_instrumentation_info(
span, opentelemetry.instrumentation.grpc
span, opentelemetry.instrumentation.grpcz
)

self._verify_success_records(
Expand All @@ -162,7 +162,7 @@ def test_stream_stream(self):

# Check version and name in span's instrumentation info
self.check_span_instrumentation_info(
span, opentelemetry.instrumentation.grpc
span, opentelemetry.instrumentation.grpcz
)

self._verify_success_records(
Expand Down Expand Up @@ -294,5 +294,5 @@ def test_unary_unary(self):

# Check version and name in span's instrumentation info
self.check_span_instrumentation_info(
span, opentelemetry.instrumentation.grpc
span, opentelemetry.instrumentation.grpcz
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

import grpc

import opentelemetry.instrumentation.grpc
import opentelemetry.instrumentation.grpcz
from opentelemetry import trace
from opentelemetry.instrumentation.grpc import (
from opentelemetry.instrumentation.grpcz import (
GrpcInstrumentorServer,
server_interceptor,
)
from opentelemetry.instrumentation.grpc.grpcext import intercept_server
from opentelemetry.instrumentation.grpcz.grpcext import intercept_server
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.test.test_base import TestBase

Expand Down Expand Up @@ -80,7 +80,7 @@ def handler(request, context):
self.assertEqual(span.name, "test")
self.assertIs(span.kind, trace.SpanKind.SERVER)
self.check_span_instrumentation_info(
span, opentelemetry.instrumentation.grpc
span, opentelemetry.instrumentation.grpcz
)
grpc_server_instrumentor.uninstrument()

Expand Down Expand Up @@ -147,7 +147,7 @@ def handler(request, context):

# Check version and name in span's instrumentation info
self.check_span_instrumentation_info(
span, opentelemetry.instrumentation.grpc
span, opentelemetry.instrumentation.grpcz
)

def test_span_lifetime(self):
Expand Down

0 comments on commit 53a1454

Please sign in to comment.