Skip to content

Commit 0afa55f

Browse files
committed
add sanitization environment variable docs
1 parent e65b788 commit 0afa55f

File tree

1 file changed

+16
-0
lines changed
  • instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis

1 file changed

+16
-0
lines changed

Diff for: instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/__init__.py

+16
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,22 @@ def response_hook(span, instance, response):
8888
client = redis.StrictRedis(host="localhost", port=6379)
8989
client.get("my-key")
9090
91+
Configuration
92+
-------------
93+
94+
Query sanitization
95+
******************
96+
To enable query sanitization with an environment variable, set
97+
``OTEL_PYTHON_INSTRUMENTATION_SANITIZE_REDIS`` to "true".
98+
99+
For example,
100+
101+
::
102+
103+
export OTEL_PYTHON_INSTRUMENTATION_SANITIZE_REDIS="true"
104+
105+
will result in traced queries like "SET ? ?".
106+
91107
API
92108
---
93109
"""

0 commit comments

Comments
 (0)