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

Investigate backend GraphQL resolvers histogram #2802

Closed
Tracked by #2777
mkurapov opened this issue Jul 9, 2024 · 2 comments
Closed
Tracked by #2777

Investigate backend GraphQL resolvers histogram #2802

mkurapov opened this issue Jul 9, 2024 · 2 comments
Assignees

Comments

@mkurapov
Copy link
Contributor

mkurapov commented Jul 9, 2024

(Blocked by #2808)

Context

We need to determine how long each of our GraphQL APIs take so we can get an estimate on how performant each of the operations are, and get an relative idea of how long a payment might take.

There is a few options of doing this, either manually instrumenting histograms per resolver, or since adding traces in #2808, we can potentially automatically generate metrics from Tempo as well via https://grafana.com/docs/tempo/latest/metrics-generator/

The metrics generation from Tempo should include generating histograms.

This ticket will be looking into seeing how we can do that/what will be easier.

@mkurapov mkurapov mentioned this issue Jul 9, 2024
8 tasks
@github-project-automation github-project-automation bot moved this to Backlog in Rafiki Jul 9, 2024
@mkurapov mkurapov moved this from Backlog to Todo in Rafiki Jul 9, 2024
@mkurapov mkurapov moved this from Todo to Backlog in Rafiki Jul 12, 2024
@mkurapov mkurapov changed the title Add histogram metrics for backend GraphQL resolvers Investigate backend GraphQL resolvers histogram Jul 16, 2024
@mkurapov mkurapov changed the title Investigate backend GraphQL resolvers histogram [Draft] Investigate backend GraphQL resolvers histogram Jul 16, 2024
@mkurapov mkurapov moved this from Backlog to Todo in Rafiki Jul 16, 2024
@mkurapov mkurapov changed the title [Draft] Investigate backend GraphQL resolvers histogram Investigate backend GraphQL resolvers histogram Jul 16, 2024
@BlairCurrey
Copy link
Contributor

BlairCurrey commented Aug 6, 2024

When running with telemetry and viewing the local dashboard after firing of some GQL requests, I see metrics like http_client_duration_milliseconds_bucket. We could use something like this to make histograms or get performance for different percentiles.

image

However, I don't see this for the graphql resolvers, but I'm not sure why. That's what I'm currently investigating. I tried changing the config for the gql instrumentation but that didnt change anything. I expect the instrumentation should produce similar metrics, in which case we dont need to add explicit histogram metrics using our telemetry service.

@BlairCurrey
Copy link
Contributor

OK, metric generation from spans working here: https://github.com/interledger/rafiki/tree/bc/2802/investigate-span-metrics-generator

We can use the traces_spanmetrics_latency_bucket metric and span_label (mutation CreateQuote for example) to visualize the resolver durations as histograms.
image

Just to follow up on my previous comment, it seems like for whatever reason the HTTPInstrumentation just collects these metrics by default whereas graphql does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants