Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class RequestInfo:
class URLLib3Instrumentor(BaseInstrumentor):
def instrumentation_dependencies(self) -> Collection[str]:
return _instruments

_instrumented = False
def _instrument(self, **kwargs):
"""Instruments the urllib3 module

Expand All @@ -214,6 +214,9 @@ def _instrument(self, **kwargs):
list of regexes used to exclude URLs from tracking
"""
# initialize semantic conventions opt-in if needed
if self._instrumented:
return
self._instrumented = True
_OpenTelemetrySemanticConventionStability._initialize()
sem_conv_opt_in_mode = _OpenTelemetrySemanticConventionStability._get_opentelemetry_stability_opt_in_mode(
_OpenTelemetryStabilitySignalType.HTTP,
Expand Down