-
Notifications
You must be signed in to change notification settings - Fork 9
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
Write a middleware library for Echo #49
Comments
How is this going? |
Hello, I haven’t had time yet to look into this (as I don’t have a simple Echo app that I could test on, and the time has been a bit lacking). If you want to try to get your hand at it, I think the cleanest solution would be to write the library in a separate package in this repo, like e.Use(middleware.Autometrics(...)) The trick is to be able to set the context properly so that the middleware and the autometrics library can agree on things. I think the way to go is to have the middleware write the relevant data to the If you don’t have time for it that’s fine, I’m mostly writing this up for anyone who wants to take a go at it (which might be future me), but right now I don’t see myself having enough time to make it happen in the next month or so |
@gagbo, thank you for your explanation. It would be great to contribute. I'll probably find some time to do so after my holidays. 😉Thanks! |
Pending #47 merge.
Once the PR is merged, the ability to inject a new trace ID/span ID into an Echo context will only happen through a middleware library, to properly fill the
autometrics.MiddlewareTraceIDKey
andSpanIDKey
fields with hex-encoded byte strings of the relevant IDsThe text was updated successfully, but these errors were encountered: