-
Notifications
You must be signed in to change notification settings - Fork 163
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: implement otlp exporter #360
Conversation
23c65d5
to
b8e216b
Compare
Wow! Thanks for this great PR. The OpenFGA team is on vacation this week, but we’ll try to get around to reviewing this early next week. Thanks again for the contribution! |
Codecov ReportBase: 84.68% // Head: 84.54% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #360 +/- ##
==========================================
- Coverage 84.68% 84.54% -0.15%
==========================================
Files 84 84
Lines 13834 13895 +61
==========================================
+ Hits 11716 11747 +31
- Misses 1736 1759 +23
- Partials 382 389 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
b8e216b
to
6d8a0fc
Compare
@alexandrebrg thanks for contributing 👍 We've had telemetry on the todo list for a hot-minute. I like the approach you've taken here, and we'd love to move forward with your contribution. However, we'd like to minimize the maintenance footprint of the OpenTelemetry integration in OpenFGA. For this reason, we'd prefer to support a single OpenTelemetry exporter and encourage the community to use the OTEL Collector if they need to collect and transform to an alternative format (e.g. prometheus, jaeger, etc..). Would you mind repurposing this PR to expose only the |
Thank you! I'll update the PR accordingly with your request 😄 |
6d8a0fc
to
21df113
Compare
21df113
to
9772ff6
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.
Hi @alexandrebrg, great PR! Thank you for this work. I left a couple of very small comments. I suppose the big issue is the change from gauge to counter. I don't have an opinion yet, but I'll form one and join the conversation there.
Thanks again!
9772ff6
to
f0f8261
Compare
Hello, I applied all of your reviews, thank you for the time given on this PR :) |
c515a96
to
17cca8e
Compare
e539d26
to
8c06ee6
Compare
8c06ee6
to
3864dc0
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.
Thank you for your contribution @alexandrebrg 🙌 This is great!
I added host and runtime metrics to your PR just so we can get it in quickly.
Thanks again!
@alexandrebrg, we're considering replacing our OpenTelemetry metrics for Prometheus metrics. @jon-whit expanded more on our reasoning here: #514 (comment) We wanted to check in with you and get your opinion on this change, please feel free to add any comments on @jon-whit's PR here |
This PR adds the ability to export metrics through OpenTelemetry protocol.
Description
This PR implements a way to use metrics given by OpenFGA. The default behavior is that no metrics are exposed
NoopMeter
is used.How OTLP is implemented ?
Metrics export can be either done by gRPC or by HTTP. The endpoint can also be configured. There isn't a lot of parameters implemented as the SDK can contain a lot of breaking changes through time. Moreover, OpenTelemetry SDK can be configured through environment variables (see SDK).
How to test OTLP implementation ?
(An Otel Collector can be installed easily with
opentelemetry-collector-contrib/examples/demo
)References
#254
Review Checklist
main