mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-30 05:32:30 +08:00
make span attribute available to urllib (#1014)
This commit is contained in:

committed by
GitHub

parent
7deea055dd
commit
e9f83e1292
@ -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
|
||||
|
@ -184,14 +184,11 @@ def _instrument(
|
||||
}
|
||||
|
||||
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)
|
||||
|
Reference in New Issue
Block a user