Skip to content

Commit

Permalink
More review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Lang committed May 5, 2020
1 parent cc3cdb6 commit 14548cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def create_trace_config(
Example usage:
.. code-block:: python
.. code:: python
import aiohttp
from opentelemetry.ext.aiohttp_client import create_trace_config
Expand Down Expand Up @@ -218,8 +218,7 @@ async def on_request_exception(
_end_trace(trace_config_ctx)

def _trace_config_ctx_factory(**kwargs):
if kwargs.get("trace_request_ctx", None) is None:
kwargs["trace_request_ctx"] = {}
kwargs.setdefault("trace_request_ctx", {})
return types.SimpleNamespace(
span_name=span_name, tracer=tracer, url_filter=url_filter, **kwargs
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def test_url_path_span_name(self):
self.assertEqual(actual, expected)
self.assertIsInstance(actual, str)

# Helper to start an aiohttp test server and send an actual HTTP request to it.
@staticmethod
def _http_request(
trace_config,
Expand All @@ -73,6 +72,7 @@ def _http_request(
request_handler: typing.Callable = None,
**kwargs
) -> typing.Tuple[str, int]:
"""Helper to start an aiohttp test server and send an actual HTTP request to it."""
async def do_request():
async def default_handler(unused_request):
return aiohttp.web.Response(status=int(status_code))
Expand Down

0 comments on commit 14548cc

Please sign in to comment.