zalando-zmon / opentracing-utils

Convenient utilities for adding OpenTracing support in your python projects
MIT License
20 stars 8 forks source link

Support skipping a trace in the trace decorator #17

Closed mvalkon closed 6 years ago

mvalkon commented 6 years ago

Adds functionality for the @trace-decorator to accept a callable skip_trace. This callable should return a bool depending on whether to skip a trace based on some parameters in either *args or **kwargs. For example, when using the trace_requests=(ignore_url_pattern[..]), a matcher function is used to validate the request.url against any patterns in the list.

Resolves #16

codecov[bot] commented 6 years ago

Codecov Report

Merging #17 into master will increase coverage by 0.06%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17      +/-   ##
=======================================
+ Coverage   97.94%   98%   +0.06%     
=======================================
  Files           7     7              
  Lines         243   251       +8     
=======================================
+ Hits          238   246       +8     
  Misses          5     5
Impacted Files Coverage Δ
opentracing_utils/decorators.py 100% <100%> (ø) :arrow_up:
opentracing_utils/libs/_requests.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7833f8c...9d09070. Read the comment docs.

mohabusama commented 6 years ago

Thanks @mvalkon !

mohabusama commented 6 years ago

👍

mvalkon commented 6 years ago

👍