rasa icon indicating copy to clipboard operation
rasa copied to clipboard

jaeger tracing / open telemetry

Open listaction opened this issue 5 years ago • 13 comments
trafficstars

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

listaction avatar Nov 05 '20 23:11 listaction

Exalate commented:

sara-tagger commented:

Thanks for submitting this feature request 🚀 @b-quachtran will get back to you about it soon! ✨

sara-tagger avatar Nov 06 '20 07:11 sara-tagger

Exalate commented:

akelad commented:

@rgstephens

akelad avatar Nov 06 '20 08:11 akelad

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:

rgstephens avatar Nov 06 '20 17:11 rgstephens

Exalate commented:

listaction commented:

could you describe how to run the container ? docker run stephens/rasa-otel:latest throws a bunch of permission errors.

listaction avatar Nov 06 '20 22:11 listaction

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.

rgstephens avatar Nov 07 '20 01:11 rgstephens

Exalate commented:

wochinge commented:

cc @TyDunn

wochinge avatar Jan 27 '21 15:01 wochinge

Exalate commented:

JustinDroege commented:

Hello. How is the status and if is already implemented, is there any documentation?

JustinDroege avatar Apr 28 '21 13:04 JustinDroege

Exalate commented:

rgstephens commented:

Would be good to add accepting of injected context from front end. Both rest and sockets.

rgstephens avatar Jun 18 '21 15:06 rgstephens

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.

rgstephens avatar Jul 24 '21 18:07 rgstephens

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.

z-bodikova avatar Jan 11 '22 18:01 z-bodikova

Exalate commented:

hsm207 commented:

Another customer is also keen on this

hsm207 avatar Jan 14 '22 14:01 hsm207

Exalate commented:

zfallahnejad commented:

Any update on this issue?

zfallahnejad avatar Mar 08 '22 06:03 zfallahnejad

Hi rasa team , just wondering , is this still a working progress ??

fagurto avatar Jul 01 '22 18:07 fagurto

Closing as this is now part of Rasa Pro.

m-vdb avatar Oct 25 '22 15:10 m-vdb

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

gb-kriss avatar Mar 30 '23 16:03 gb-kriss