-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add OpenTelemetry setup function #11
Conversation
7eb6574
to
181e5cf
Compare
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #11 +/- ##
===========================================
+ Coverage 67.24% 77.80% +10.55%
===========================================
Files 5 8 +3
Lines 232 491 +259
===========================================
+ Hits 156 382 +226
- Misses 76 109 +33
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
2cc3d5e
to
9f45534
Compare
We should probably guard this behind cargo feature |
3bb5329
to
4c1d1df
Compare
7e9a05f
to
ac11152
Compare
06f3601
to
5ad809d
Compare
What's the difference between stdout layer and logs layer? |
5ad809d
to
e355992
Compare
the stdout layer only logs to the stdout and the logs layer only exports the logs to and otel collector |
ea95e16
to
85d0e49
Compare
f8994cd
to
c7bf78c
Compare
9f8bb11
to
31bd81d
Compare
c899ea2
to
4dce311
Compare
ea2004a
to
cc1cd81
Compare
5f81383
to
f21c2ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM aside from few cosmetic nits
f21c2ab
to
338fe33
Compare
338fe33
to
b922cd1
Compare
This code got to big and was moved to a separated repo. This PR was replaced by https://github.com/famedly/rust-telemetry/pull/1 |
This PR adds a function to setup the Opentelemetry exporting for logs, traces and metrics.
This function will setup everything, all that will be left to do on the services is to setup the propagation layer (example for axum) and configure the
#[instrument]
macro on the functions.For metric I setup to use the traces for metrics using the crate tracing-opentelemetry. Other options are the opentelemetry sdk itself, and the metrics.
The metrics doesn't seem to have an opentelemtry exporter but it does have an prometheus exporter. If we choose to use an collector that supports both, otel and prometheus endpoints, like grafana alloy, the metrics crate can also be an option