how to attach FastStream NATS OpenTelemetry middleware #228
Unanswered
theobouwman
asked this question in
Q&A
Replies: 1 comment
-
please describe your problem in more detail |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I already have our
NATSService
used by our FastAPI instance which works great. Up until now just for KV store for some caching. I want to add fastStream as a separate instance which will need to use the common shared code like all services/repos/config/observability etc.The problem is: I initialise the broker in the
NATSProvider
which is already being used by other services, but how can I attach that instance to the FastStream instance and attach handlers to it?Here my provider:
my container:
here the observability init, this is shared code in the
shared/
folder, used by my FastAPI API and FastStream Worker:And here is the FastStream
app.py
:Beta Was this translation helpful? Give feedback.
All reactions