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

[FEATURE] Add Tesla Plugin #132

Open
yordis opened this issue Apr 8, 2022 · 4 comments
Open

[FEATURE] Add Tesla Plugin #132

yordis opened this issue Apr 8, 2022 · 4 comments
Assignees

Comments

@yordis
Copy link

yordis commented Apr 8, 2022

Describe the solution you would like to see

As a user, I want PromEx to include Tesla Plugin.

How would you expect this feature to work

Tesla HTTP Middleware client (fair to say popular) has built-in Telemetry middleware that it would be nice to collect with low effort.

@akoutmos
Copy link
Owner

Hello Yordis and thanks for reaching out!

Support for the Tesla telemetry middleware is indeed on the roadmap. Unfortunately, I won't be able to give you a solid ETA as I am currently working on PromEx features requested by some of my consulting clients. If I were to ballpark estimate...I would say I can get to this in the next 3 months or so.

@yordis
Copy link
Author

yordis commented Apr 12, 2022

@akoutmos how can I help? There is no CONTRIBUTING.md file, so I am not sure the steps I could take and maybe lean on you for direction.

@akoutmos
Copy link
Owner

Good call. I haven't gotten around to making a CONTRIBUTING.md file yet, but I'll add that to the TODO list.

For new PromEx plugins, you will need to create a plugin module that will attach to all of the relevant Telemetry events that the Tesla middleware emits, and you will need to create a Grafana dashboard template to render all those datapoints. A good place to start would be to take a look at some of the existing plugins and dashboards, and follow a consistent style in terms of documentation styling and how the plugin is laid out. Looking at the Tesla docs, if looks like you'll want to attach to the following Telemetry events:

  • [:tesla, :request, :stop]
  • [:tesla, :request, :exception]

You will probably need to create Prometheus distributions for both of those events to capture request time. It will also probably be nice to have the host that the request is directed towards, but that will probably need to be some sort of a config so that all the unique hosts don't create a cardinality problem for Prometheus. It would also be useful to capture the HTTP status code from the request. Lastly, I would make another distribution to capture the response body size (similarly to how it is captured in the Phoenix plugin). Let me know if you have any additional questions or is you require some more clarification. Thanks!

@brandonchoe
Copy link

Hi, I'd like to grab this issue. I'll have a PR up this weekend.

@brandonchoe brandonchoe mentioned this issue Jun 11, 2022
5 tasks
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

3 participants