Skip to content

Commit 7b33751

Browse files
api-clients-generation-pipeline[bot]jirikuncarnmuesch
authored
disable tracer for recording (#205)
Co-authored-by: Jiri Kuncar <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: Nicholas Muesch <[email protected]>
1 parent a9d2e09 commit 7b33751

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tests/conftest.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55

66
# First patch httplib
77
tracer = None
8-
try:
9-
from ddtrace import config, patch, tracer
10-
11-
config.httplib["distributed_tracing"] = True
12-
patch(httplib=True)
13-
except ImportError:
14-
pass
8+
if os.getenv("RECORD", "false") != "none":
9+
try:
10+
from ddtrace import config, patch, tracer
11+
12+
config.httplib["distributed_tracing"] = True
13+
patch(httplib=True)
14+
except ImportError:
15+
pass
1516

1617
import importlib
1718
import json

0 commit comments

Comments
 (0)