Skip to content

Commit

Permalink
Merge branch 'main' into instr
Browse files Browse the repository at this point in the history
  • Loading branch information
alrex committed Jun 30, 2021
2 parents 865ca59 + 5b43a59 commit 09bbefe
Show file tree
Hide file tree
Showing 14 changed files with 227 additions and 209 deletions.
1 change: 1 addition & 0 deletions docs-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ sphinx-autodoc-typehints
-e "git+https://github.com/open-telemetry/opentelemetry-python.git#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions"
-e "git+https://github.com/open-telemetry/opentelemetry-python-contrib.git#egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation"
-e "git+https://github.com/open-telemetry/opentelemetry-python.git#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk"
-e "git+https://github.com/open-telemetry/opentelemetry-python-contrib.git#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http"

# Required by opentelemetry-instrumentation
fastapi>=0.65.2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import typing

import wrapt
from aiopg.utils import _ContextManager, _PoolAcquireContextManager
from aiopg.utils import ( # pylint: disable=no-name-in-module
_ContextManager,
_PoolAcquireContextManager,
)

from opentelemetry.instrumentation.dbapi import (
CursorTracer,
Expand Down Expand Up @@ -61,7 +64,9 @@ def __init__(self, connection, *args, **kwargs):

def cursor(self, *args, **kwargs):
coro = self._cursor(*args, **kwargs)
return _ContextManager(coro)
return _ContextManager( # pylint: disable=no-value-for-parameter
coro
)

async def _cursor(self, *args, **kwargs):
# pylint: disable=protected-access
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@

import aiopg
import wrapt
from aiopg.utils import _ContextManager, _PoolContextManager
from aiopg.utils import ( # pylint: disable=no-name-in-module
_ContextManager,
_PoolContextManager,
)

from opentelemetry.instrumentation.aiopg.aiopg_integration import (
AiopgIntegration,
Expand Down Expand Up @@ -108,7 +111,7 @@ def wrap_connect_(
version=version,
tracer_provider=tracer_provider,
)
return _ContextManager(
return _ContextManager( # pylint: disable=no-value-for-parameter
db_integration.wrapped_connection(wrapped, args, kwargs)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
from unittest.mock import MagicMock

import aiopg
from aiopg.utils import _ContextManager, _PoolAcquireContextManager
from aiopg.utils import ( # pylint: disable=no-name-in-module
_ContextManager,
_PoolAcquireContextManager,
)

import opentelemetry.instrumentation.aiopg
from opentelemetry import trace as trace_api
Expand Down Expand Up @@ -542,7 +545,7 @@ def __init__(self, database, server_port, server_host, user):
# pylint: disable=no-self-use
def cursor(self):
coro = self._cursor()
return _ContextManager(coro)
return _ContextManager(coro) # pylint: disable=no-value-for-parameter

async def _cursor(self):
return MockCursor()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import sys
import unittest
import unittest.mock as mock
from unittest import mock

import opentelemetry.instrumentation.asgi as otel_asgi
from opentelemetry import trace as trace_api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def BidirectionalStreamingMethod(self, request_iterator, context):


def create_test_server(port):
# pylint: disable=consider-using-with
server = grpc.server(futures.ThreadPoolExecutor(max_workers=1))

test_server_pb2_grpc.add_GRPCTestServerServicer_to_server(
Expand Down
Loading

0 comments on commit 09bbefe

Please sign in to comment.