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

Add standards-compatible instrumentation to the interceptor #321

Open
arschles opened this issue Nov 12, 2021 · 6 comments
Open

Add standards-compatible instrumentation to the interceptor #321

arschles opened this issue Nov 12, 2021 · 6 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request stale-bot-ignore All issues that should not be automatically closed by our stale bot

Comments

@arschles
Copy link
Collaborator

arschles commented Nov 12, 2021

The interceptor already has several debugging/observation endpoints that expose several pieces of useful information to be used primarily for debugging purposes. For example, you can fetch a point-in-time copy of the pending queue or the routing table, all via a simple REST API that you can curl. These endpoints are accessible on an HTTP server that runs on a dedicated port, separate from the main interceptor (proxy) server. The target client for these endpoints is more than likely a human.

Since the interceptor is in the critical path of end-user HTTP requests, there are many more metrics that could be captured and most likely consumed by a machine.

Use-Case

I'd like to have the interceptor run an endpoint on which folks can fetch prometheus metrics that describe the current state of the system. For example, it could serve histograms for response codes, counters for total number of requests or timeouts, gauges for in-flight requests, and so forth.

Specification

  • The interceptor is instrumented with prometheus-compatible metrics
  • The interceptor runs a prometheus endpoint
  • Documentation is added (probably to development.md or a new document) regarding these metrics

Resources for Developers

@arschles arschles added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 12, 2021
@arschles arschles added this to the v0.3.0 milestone Nov 12, 2021
@tomkerkhove
Copy link
Member

Another reasonable approach would be through OpenTelemetry but let's keep that out of scope for now.

@arschles
Copy link
Collaborator Author

@tomkerkhove I've barely started this work, so now would be the time to make the choice between prom. and OT. I feel like it would be wise to have KEDA and this project both do the same thing, so shall I follow kedacore/keda#2291 and do OpenTelemetry?

@tomkerkhove
Copy link
Member

The proposal has only just been opened and not agreed upon yet, so it's up to you.

I think the current landscape is still using a lot of Prometheus so the investment would definitely not be lost and align with KEDA Core, but if you prefer to wait then that's also fine for me.

@arschles
Copy link
Collaborator Author

arschles commented Dec 3, 2021

@tomkerkhove ok. I'm planning to continue with #322 at some point, but a bunch of things have come up before it, so when I get back to it I'll check kedacore/keda#2291 to see if the OT decision has made any progress. Otherwise I'll just finish the Prometheus work!

@arschles arschles modified the milestones: v0.2.1, v0.3.0 Dec 3, 2021
@arschles arschles changed the title Add prometheus-compatible instrumentation to the interceptor Add standards-compatible instrumentation to the interceptor Jan 21, 2022
@arschles arschles modified the milestones: v0.4.0, v0.3.0 Jan 21, 2022
@stale
Copy link

stale bot commented Mar 22, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Mar 22, 2022
@arschles arschles added the stale-bot-ignore All issues that should not be automatically closed by our stale bot label Mar 25, 2022
@stale stale bot removed the stale All issues that are marked as stale due to inactivity label Mar 25, 2022
@tomkerkhove
Copy link
Member

I think OpenTelemetry should maybe be the new default. Thoughts?

@tomkerkhove tomkerkhove removed this from the v0.4.0 milestone May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request stale-bot-ignore All issues that should not be automatically closed by our stale bot
Projects
Status: To Do
Development

Successfully merging a pull request may close this issue.

2 participants