jina
jina copied to clipboard
feat(instrumentation): create basic tracer and meter with console exporter
Goals:
- resolves #5155
- [x] Integrate OpenTelemetry API and SDK.
- [ ] Provide environment variable configurations to enable tracking when required. Use console exporter for now.
- [x] Trace gRPC requests within the Flow.
- [ ] Add helpers for creating traces on request methods with default span attributes.
- [ ] Convert
send_health_check_sync
oris_ready
method to async to prevent the grpc aio interceptor from throwing and capturing an exception. - [x] Extract tracing context from the server and make it available for the Executor methods in the
kwargs
list or arguments. - [ ] check and update documentation. See guide and ask the team.
Codecov Report
Merging #5175 (bb0b003) into master (bcf17c3) will increase coverage by
23.24%
. The diff coverage is52.91%
.
@@ Coverage Diff @@
## master #5175 +/- ##
===========================================
+ Coverage 51.99% 75.23% +23.24%
===========================================
Files 95 100 +5
Lines 6145 6433 +288
===========================================
+ Hits 3195 4840 +1645
+ Misses 2950 1593 -1357
Flag | Coverage Δ | |
---|---|---|
jina | 75.23% <52.91%> (+23.24%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
jina/clients/base/http.py | 91.89% <ø> (+2.70%) |
:arrow_up: |
jina/clients/base/websocket.py | 83.80% <ø> (+7.61%) |
:arrow_up: |
jina/orchestrate/flow/base.py | 90.15% <ø> (+29.81%) |
:arrow_up: |
jina/serve/instrumentation/_aio_server.py | 0.00% <0.00%> (ø) |
|
jina/serve/runtimes/gateway/http/gateway.py | 87.30% <ø> (+63.49%) |
:arrow_up: |
jina/serve/runtimes/gateway/websocket/gateway.py | 85.71% <ø> (+58.92%) |
:arrow_up: |
jina/serve/runtimes/gateway/http/app.py | 38.19% <25.00%> (+29.62%) |
:arrow_up: |
jina/serve/runtimes/gateway/websocket/app.py | 29.03% <25.00%> (+20.42%) |
:arrow_up: |
jina/clients/base/grpc.py | 82.85% <33.33%> (+5.71%) |
:arrow_up: |
jina/serve/runtimes/asyncio.py | 69.02% <44.44%> (+20.06%) |
:arrow_up: |
... and 76 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
The python OpenTelemetry sdk currently doesn't have support for the grpc.aio.Server
. There is an open pull request which will make the implementation easy for us.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
All these usage of 'args' to create or initialise global parameters is not suitable. I will work on removing the instrumentation mixin and move the initialisation to module level. This will work fine when deployed to k8s but there might be some slight unknowns or side effects when running the flow locally.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.