Skip to content
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

Telemetry support #383

Closed
ghost opened this issue May 1, 2019 · 13 comments
Closed

Telemetry support #383

ghost opened this issue May 1, 2019 · 13 comments

Comments

@ghost
Copy link

ghost commented May 1, 2019

Are you planning to add telemetry support to the library? I can help with a PR.
Maybe it should be added in hackney.

@edgurgel
Copy link
Owner

edgurgel commented May 6, 2019

Great question! I think we should do this inside hackney.

I know that hackney uses erlang-metrics as interface so two options (I think?):

  • Replace erlang-metrics with telemetry
  • Implement a backend for erlang-metrics with telemetry ?

@ghost
Copy link
Author

ghost commented May 6, 2019

erlang-metrics and hackney being the same creator, I think it's up to him to see if he wants to migrate to telemetry and have apps with erlang-metrics migrating to telemetry as well.

If we are not implementing this into httpoison this discussion should be in https://github.com/benoitc/hackney and could be closed.

@PhillippOhlandt
Copy link

I would love telemetry support. Right now, I have a use case where I want to be notified after every request with all the request and response infos.

@ghost
Copy link
Author

ghost commented May 23, 2019

What I have done now is a lib that I used on top of httpoison where I have added my telemetry metrics.

@binaryseed
Copy link

binaryseed commented Feb 28, 2020

Any further thoughts on this? It'd be nice to get telemetry integrated somewhere :)

Ideally, we'd follow the recommendations for emitting start, stop and failure events, which will enable tracing as well as metrics collection...

@GregMefford
Copy link
Contributor

Just stopping by to say that I'm also interested - I agree that it would be useful to get it added in Hackney itself, but that doesn't preclude HTTPoison also adding it, so that we get it one way or the other. 😉

@3fernandez
Copy link

Hi there! 🙂

I'm working on an XML tool that leverages use HTTPoison.Base, and I'm trying to instrument it using use NewRelic.Tracer. But I don't see how the pieces should fit together. Any advices or tips?

Thanks

@zoidyzoidzoid
Copy link

zoidyzoidzoid commented Aug 19, 2020

@3fernandez I think we wanna emit start/stop/failure events, like @binaryseed mentioned, sort of like:

:telemetry.execute([:ecto, :repo, :init], %{system_time: System.system_time()}, %{repo: repo, opts: opts})

That example is from a Telemetry Ecto example, but in lib/httpoison/base.ex, where instead of repo and opts we'd send some information about the request, maybe some of these fields from opentelemetry_phoenix could work as inspiration here

@ghost ghost closed this as completed Feb 8, 2021
@zoidyzoidzoid
Copy link

The upstream hackney ticket is still open, so I think this one is still unsolved too?

@ghost
Copy link
Author

ghost commented Feb 10, 2021

I am closing long opened issues on my account to make some cleanup.

@zoidyzoidzoid
Copy link

I think it'd be great to track this feature request for httpoison, and track the upstream hackney ticket.

Would I need to make my own ticket that is a dupe of this closed ticket be the ideal solution for you?

@ghost
Copy link
Author

ghost commented Feb 10, 2021

Yes sure.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants