rasa
rasa copied to clipboard
jaeger tracing / open telemetry
hi Rasa team, Do you have plans to either expose the "app" created as part of the Sanic Server creation process / provide some options to supply an open tracing configuration like the following ?
Its important for observing rasa in production environments. If there is a way to instrument it - please share, if not please consider adding it as its fairly low effort.
Example
from sanic import Sanic from sanic import response as res from jaeger_client import Config from sanic_opentracing import SanicTracing
app = Sanic(name)
@app.route("/") async def test(req): return res.text("I'm a teapot", status=418)
def initialize_tracer(): config = Config( config={ # usually read from some yaml config 'sampler':
{ 'type': 'const', 'param': 1, }
, 'logging': True, }, service_name='your-app-name', validate=True, ) return config.initialize_tracer() tracing = SanicTracing(tracer=initialize_tracer, trace_all_requests=True, app=app)
if name == 'main': app.run(host="0.0.0.0", port=8000)
Defintion of done
- [ ] Review 2.8 prototype
- [ ] Consider if https://github.com/RasaHQ/rasa/issues/6319 should be in scope
- [ ] Draft implementation proposal
- [ ] Get feedback from CSE
- [ ] Get feedback from infrastructure
- [ ] Determine scope for v1
- [ ] Create issues for implementation
Exalate commented:
sara-tagger commented:
Thanks for submitting this feature request
Exalate commented:
akelad commented:
@rgstephens
Exalate commented:
rgstephens commented:
Yes, there's currently work on this which you can find in the Rasa open-telemetry branch and there's also an example action server in the Sara/Rasa Demo bot also in an open-telemetry branch.
I hope to post more about this work in the coming weeks. In the mean time, there's also a Rasa 2.0.2 docker image stephens/rasa-otel. It currently uses OpenTracing/Jaeger but I will be switching this to OpenTelemetry soon.
Here's an example Jaeger screenshot of a trace including action server call:
Exalate commented:
listaction commented:
could you describe how to run the container ? docker run stephens/rasa-otel:latest throws a bunch of permission errors.
Exalate commented:
rgstephens commented:
You should be using it as part of either the standard docker-compose setup either of the Kubernetes based installs - quick start which uses k3s or helm. (However, the kubernetes based installs require a bit more setup to use the Jaeger Kubernetes Operator and sidecar injection).
You can also do a local python setup by pulling the rasa git repo, switch to the open-telemetry branch and run locally.
Exalate commented:
wochinge commented:
cc @TyDunn
Exalate commented:
JustinDroege commented:
Hello. How is the status and if is already implemented, is there any documentation?
Exalate commented:
rgstephens commented:
Would be good to add accepting of injected context from front end. Both rest and sockets.
Exalate commented:
rgstephens commented:
I built an updated image of 2.8.1 with OpenTracing/Jaeger and also sanic-prometheus. If anyone used the older image, the endpoints.yml values have changed. See the image readme for details and a description of how to enable the /metrics endpoint in your endpoints.yml.
Exalate commented:
z-bodikova commented:
Hey @TyDunn and @joejuzl - just FYI: this work is something that one of our customers is really keen on. I'll drop more information in the Slack channel.
Exalate commented:
hsm207 commented:
Another customer is also keen on this
Exalate commented:
zfallahnejad commented:
Any update on this issue?
Hi rasa team , just wondering , is this still a working progress ??
Closing as this is now part of Rasa Pro.
Hi All, we are using RASA opensource on k8s, any info or point of direction how can it be instrumented to k8s https://hub.docker.com/r/stephens/rasa-otel
