-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Trying to implement push OTLP exporter #91
Comments
I'm not a rust person so can't help with the specifics regarding the SDK here. Two things I can say though:
Hope that helps! |
Thank you for your comment, @IvanMerrill. |
Hi @egtwp I'm sorry this didn't work immediately as expected but thank you for the detailed write up and example code! I'm not sure what the issue is yet but I'm looking into it now. |
Hello @emschwartz, many many thanks for your time! |
Ugh, that is an annoying issue. It turns out that the version of the Because the versions are I'm not sure what the best approach would be for this within the |
Hmm. This also means that using a git dependency for |
Thank you @emschwartz! I created a new branch on our repo where I downgraded OTEL dependecies to 0.18 redo the tests. Metrics are now exported, but I think that major of this issue is due to the alpha stage of For the same reason, I onestly can't see a simple way to implement a more loose dependencies in your crate. Maybe implementing and re-exporting a minimum set of functionality could be a solution, at least for our case, but probably not the best to mantain for you. Naturally, I’m still very interested in hearing any different solutions or ideas that you or the autometrics team may have. I’m also open to collaborating on any ideas to find a solution that works for everyone. Thank you again for your help and support. |
Good points. I guess we just need to keep bumping the version to keep the latest autometrics up to date with the latest opentelemetry versions. #93 This unfortunately doesn't help with the git dependency and the fact that their main branch is different again from the published crates. Hopefully this will be a somewhat short-lived issue while they stabilize their APIs a bit more... 🤞 Also, I don't think that re-exporting the opentelemetry functionality is going to work very well in our case because the global statics its using are called by functions that they have scattered all throughout their crate APIs. |
Hi @egtwp, just wanted to follow up on this. We released autometrics v0.5, which includes the opentelemetry 0.19 dependencies. Could you try it again with this updated version and the otel 0.19 versions (not the git dependency)? |
Sure, working on it! |
@emschwartz I updated our example repo with working example for both autometrics 0.5.0 and 0.4.1. Hope this help! |
That's great to hear! Maybe we can tweak it a bit and pull it into the |
I will try! |
Amazing! I think it's pretty close already.
|
Hello team,
My colleagues and I are trying to export autometrics macro-generated metrics to an OTLP collector by implementing a push exporter based on the opentelemetry-rust SDK.
Unfortunately, our attempts were unsuccessful 😅. We hope that with your help, we can achieve our goal and perhaps contribute to the implementation of the idea discussed in Push Vs Pull #34.
From our understanding, when importing the autometrics crate with default features, the macro defaults to your OpenTelemetry tracker. According to the code and issue Make the metrics registry configurable #20, it calls
opentelemetry_api::global::meter("")
to declare and register every metric.We then implemented a metric push controller from the opentelemetry-rust SDK, as shown in this example; The method
set_meter_provider
is called inside thebuild
method of theopentelemetry_otlp::new_pipeline()
constructor.We were able to successfully push custom metrics to the OTLP collector, but we couldn't see the autometrics macro-generated ones!
We have published a basic example of our efforts, along with instructions on how to replicate our tests. We hope this will be useful for you or anyone else interested in implementing this feature to understand what we are trying to do.
Perhaps we are missing something from your or the OpenTelemetry SDK implementation...
Thank you for your time. If you decide to spend time on this, we are at your disposal for any clarification or further testing.
The text was updated successfully, but these errors were encountered: