EmerisHQ / demeris-backend

Monorepo containing all the Demeris backend code and infrastructure definitions.
GNU Affero General Public License v3.0
8 stars 1 forks source link

Fix Sentry transaction name for api-server #760

Closed Pitasi closed 2 years ago

Pitasi commented 2 years ago

Current transaction names are in the form

GET /chain/cosmos-hub/supply

while it should actually be

GET /chain/:chain_name/supply

and chain_name=cosmos-hub can be a tag of the transaction.

image.png

Otherwise we are unable to monitor performance effectively (think of how many API requests include an address in the url, e.g. GET /account/XXX1234/balance).

tbruyelle commented 2 years ago

I see your point, but I'm not sure we can have a simple access to that information in the middleware.

Pitasi commented 2 years ago

I think this solves our issue: https://stackoverflow.com/questions/52982557/how-to-get-matched-route-in-context-in-gin

tbruyelle commented 2 years ago

ah indeed, good find!