You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This makes it possible to do some processing/filtering of the traces
before sending them to the agent.
Add a FilterRequestsOnUrl processor to remove traces of incoming
requests that match a regexp.
Copy file name to clipboardExpand all lines: docs/index.rst
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -309,6 +309,28 @@ Users can pass along the parent_trace_id and parent_span_id via whatever method
309
309
Advanced Usage
310
310
--------------
311
311
312
+
Trace Filtering
313
+
~~~~~~~~~~~~~~~
314
+
315
+
It is possible to filter or modify traces before they are sent to the agent by configuring the tracer with a processing pipeline. For instance to filter out all traces of incoming requests to a specific url::
All the processors in the processing pipeline will be evaluated sequentially for each trace and the resulting trace will either be sent to the agent or discarded depending on the output of the pipeline.
321
+
322
+
**Use the standard processors**
323
+
324
+
The library comes with a FilterRequestsOnUrl processor that can be used to filter out incoming requests to specific urls:
Creating your own processors is as simple as implementing a class with a process_trace method and adding it to the processing pipeline parameter of Tracer.configure. process_trace should either return a trace to be fed to the next step of the pipeline or None if the trace should be discarded. (see processors.py for example implementations)
0 commit comments