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

Document the need for telemetry in the mix file #609

Open
nathany-copia opened this issue Aug 18, 2023 · 3 comments
Open

Document the need for telemetry in the mix file #609

nathany-copia opened this issue Aug 18, 2023 · 3 comments

Comments

@nathany-copia
Copy link

nathany-copia commented Aug 18, 2023

When adding Tesla.Middleware.Telemetry to a number of different projects, I see this error when running the test suite:

function Tesla.Middleware.Telemetry.call/3 is undefined (module Tesla.Middleware.Telemetry is not available)

This is in combination with exvcr, though not sure if it's related. I don't actually need to capture telemetry during the test suite, but is there a clean way to not cause this error under test while still having basic Telemetry enabled when running in production?

Update: Actually I'm seeing the same error in mix tasks too. 🤔

Not seeing what I'm missing from https://hexdocs.pm/tesla/Tesla.Middleware.Telemetry.html

I'm trying to use Telemetry along with AppSignal -- which appears to work fine when Tesla is used in my Phoenix repository.

But getting this error when working with small client libraries that I've written (which don't themselves include AppSignal).

https://docs.appsignal.com/elixir/integrations/tesla.html

Is :telemetry.attach required? Or do I need to add AppSignal to all my client libraries?

@nathany-copia
Copy link
Author

nathany-copia commented Aug 18, 2023

Looks like adding AppSignal to the library works, but this feels like there could be better documentation in one place or another.

The Tesla readme doesn't even link to the Telemetry middleware yet. Is that intentional?

@nathany-copia
Copy link
Author

nathany-copia commented Aug 18, 2023

I'm an idiot -- needed to add {:telemetry, "~> 1.2"}, to the mix file (which AppSignal brought in automatically in the place I had it).

But that should be documented, yes?

@nathany-copia nathany-copia changed the title function Tesla.Middleware.Telemetry.call/3 is undefined (module Tesla.Middleware.Telemetry is not available) Document the need for telemetry in the mix file Aug 18, 2023
@yordis
Copy link
Member

yordis commented Aug 18, 2023

The Tesla readme doesn't even link to the Telemetry middleware yet. Is that intentional?

It wasn't. Feel free to add it!

But that should be documented, yes?

By all means, please improve the docs!

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

2 participants