Skip to content

Commit

Permalink
make span attribute available to urllib (#1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
DiptoChakrabarty committed Apr 12, 2022
1 parent 7deea05 commit e9f83e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- `opentelemetry-instrumentation-urllib` make span attributes available to sampler
([1014](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1014))
- `opentelemetry-instrumentation-flask` Fix non-recording span bug
([#999])(https://github.com/open-telemetry/opentelemetry-python-contrib/pull/999)
- `opentelemetry-instrumentation-tornado` Fix non-recording span bug
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,11 @@ def _instrumented_open_call(
}

with tracer.start_as_current_span(
span_name, kind=SpanKind.CLIENT
span_name, kind=SpanKind.CLIENT, attributes=labels
) as span:
exception = None
if callable(request_hook):
request_hook(span, request)
if span.is_recording():
span.set_attribute(SpanAttributes.HTTP_METHOD, method)
span.set_attribute(SpanAttributes.HTTP_URL, url)

headers = get_or_create_headers()
inject(headers)
Expand Down

0 comments on commit e9f83e1

Please sign in to comment.