Closed mardiros closed 2 years ago
Merging #33 (a371694) into master (7719133) will increase coverage by
3.55%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #33 +/- ##
==========================================
+ Coverage 86.75% 90.31% +3.55%
==========================================
Files 8 8
Lines 287 289 +2
==========================================
+ Hits 249 261 +12
+ Misses 38 28 -10
Impacted Files | Coverage Δ | |
---|---|---|
starlette_zipkin/middleware.py | 91.74% <100.00%> (+9.50%) |
: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 7719133...a371694. Read the comment docs.
@mchlvl
If you are ok with this pull request, I can merge it.
Looks good!
Here is a second pass of the tests where we add unit tests of the middleware.
some tests does not override the transport and the
await middleware.tracer.close()
is used at the end of the tests. (it could be improved by using a pytest fixture actually.)The tests
test_dispatch_trace_reuse_tracer
is written to ensure the tracer is reused.I also update the code to use
new_trace
instead of raising 500 errors if the call contains invalid zipkin headers ( a trace without a span for instance )