You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to debug where my Go application does too many API requests to a third party service. The service has rate limits and I want to avoid to hit this limit.
Unfortunately I am not very familiar with the code base.
Is there a way to solve this with Prometheus client Go, so that I see which lines of the Go code do requests to the API?
My client uses the standard http package.
I can inject an own transport. This works fine. This way I was able to log all outgoing requests.
Now I could use debug.Stack() but afaik only labels are supported. Can I add the current stack trace while incrementing a counter?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Debug client: too many API calls
I want to debug where my Go application does too many API requests to a third party service. The service has rate limits and I want to avoid to hit this limit.
Unfortunately I am not very familiar with the code base.
Is there a way to solve this with Prometheus client Go, so that I see which lines of the Go code do requests to the API?
My client uses the standard http package.
I can inject an own transport. This works fine. This way I was able to log all outgoing requests.
Now I could use debug.Stack() but afaik only labels are supported. Can I add the current stack trace while incrementing a counter?
Beta Was this translation helpful? Give feedback.
All reactions