-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Injecting into middleware #1375
Comments
I see @willsoto I just didn't really like repeating the code twice, so perhaps there was another solution 😊 |
You can always make them a variable if you want. Nothing that says they have to be declared inline in the |
I think it will be better if we update DOCS as this package is specific to NESTJS. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to inject some metrics into a middleware from my AppModule.
And this is how my middleware is defined:
My Prometheus Module look like so:
Which I import in my
AppModule
under theimports
array.I am getting the error:
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Update
Temporarily solved the issue by adding the
makeCounterProvider
andmakeHistogramProvider
to exports as well, although not very pretty/DRY.The text was updated successfully, but these errors were encountered: