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

Track latency metric for based on webhook #322

Open
chaitanyasingla-dt opened this issue Jun 7, 2022 · 3 comments
Open

Track latency metric for based on webhook #322

chaitanyasingla-dt opened this issue Jun 7, 2022 · 3 comments
Assignees

Comments

@chaitanyasingla-dt
Copy link

Hi @schmidtw
There has been an addition in caduceus to track latency metrics for outbound senders.

Scenario:
Let's suppose we have multiple webhooks getting tracked and only one of them is increasing the latency of the request. If all the webhooks latency metric is getting tracked under the same name that is code = strconv.Itoa(resp.StatusCode), we will not be able to identify the source of the increase in latency of the requests.

cc: @Sachin4403

@kristinapathak
Copy link
Contributor

Hi @chaitanyasingla-dt,

The webhook URL is added into its own metric label before we create a new outbound sender (there is one outbound sender per webhook):

metricWrapper, err := newMetricWrapper(time.Now, osf.QueryLatency.With("url", inValue.ID))

So we can differentiate between codes in that way. Is this what you're looking for?

@kristinapathak
Copy link
Contributor

Hi @chaitanyasingla-dt, have you had a chance to look at this? Does this solve your problem?

@chaitanyasingla-dt
Copy link
Author

Hi @kristinapathak, I am still looking into this. I will get back to you.

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