Skip to content

OpenTelemetry: How can I count requests for each downstream? #2266

Answered by MihaZupan
tuanhd9173 asked this question in Q&A
Discussion options

You must be logged in to vote

The ReverseProxy.Metrics.Sample project shows how you can correlate those IForwarderTelemetryConsumer (and other) events back to the route/cluster/destination.

E.g. in ForwarderTelemetryConsumer.OnForwarderStart, you can look at metrics.DestinationId.

.NET 8 will include more HttpClient metrics out of the box, so there should be less of a need to expose some of these metrics manually.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by karelz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants