Jaeger-query URL to get all traces in last X minutes

3,535 views
Skip to first unread message

Aditi Ghag

unread,
Dec 4, 2018, 6:50:49 PM12/4/18
to Jaeger Tracing
Hi,

I'm invoking this Jaeger query to get all the traces recorded in the last 20 minutes - 

wget -O -  http://<jaeger-query-cluster-ip>:16686/api/traces?service=orders&lookback=20m&limit=1

It goes printing lot of text on the screen by ignoring url parameters. 

wget -O -  http://<jaeger-query-cluster-ip>:16686/api/traces?lookback=20m&limit=1

Connecting to <ip>:16686... connected.
HTTP request sent, awaiting response... 400 Bad Request
2018-12-04 15:49:41 ERROR 400: Bad Request.


What's the url endpoint to get all the traces recorded in last X minutes for all the services?

Aditi Ghag

unread,
Dec 4, 2018, 7:06:35 PM12/4/18
to Jaeger Tracing
Also, I need to get the output in a JSON format.

Gary Brown

unread,
Dec 5, 2018, 5:16:03 AM12/5/18
to Aditi Ghag, Jaeger Tracing
From a quick look at the code, it looks like the lookback param may only be used in the UI to set the start param. So you might want to create an issue on https://github.com/jaegertracing/jaeger to have this also supported on the backend - and consider contributing a PR :)


--
You received this message because you are subscribed to the Google Groups "Jaeger Tracing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jaeger-tracin...@googlegroups.com.
To post to this group, send email to jaeger-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jaeger-tracing/b43bc3d6-020a-4f52-9323-e65051eddc36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yuri Shkuro

unread,
Dec 5, 2018, 10:06:12 AM12/5/18
to Gary Brown, Aditi Ghag, Jaeger Tracing
When I need to find the exact URL for an API call, I run the query from the UI and check chrome dev tools for the URL of the Ajax request.

Sent from my iPhone just by thinking it

Aditi Ghag

unread,
Dec 5, 2018, 1:18:25 PM12/5/18
to Jaeger Tracing
Thanks Yuri and Gary.

Yuri,

That's exactly what I ended up doing. :)

Anyway as it turns out, it's not possible to get all the traces unless you specify a service.

This is what worked for me - 


Without setting prettyPrint to true, the output is printed in plain text format (not JSON) and since I set the lookback parameter to 20m, there were lot of traces captured. I also had a typo in my last update, I had actually set the limit to 10.
Reply all
Reply to author
Forward
0 new messages