Is there any way to batch get trace info by trace ids with tempo #3576
-
Hello, We are in the process of migrating from Jaeger UI with Elasticsearch storage to Tempo with S3 storage. Some of our older services rely on fetching trace information from Jaeger UI for analysis. These services typically operate at a maximum of 20 queries per second (qps), with queries spanning a relatively short time range. During this transition, we noticed that Tempo does not offer a batch API to load trace information, forcing us to send requests individually for each trace ID. Unfortunately, this method frequently triggers an error response: “There are too many awesome requests.” Is there a way to batch retrieve trace information in Tempo? Additionally, we have observed some interesting metrics that might be relevant, which can be found here: https://github.com/grafana/tempo/discussions/3575
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
A single query is split into multiple tiny parts called jobs and sent to querier to be processed. queriers will execute these jobs and fetch the parts of the blocks from backend to read data, and process the query. so a single query from end user can result in lot more queries to backend from querier. we have tiered cached that allows you to cache things like footers, pages, and the whole query results..tiered cache was first release in tempo 2.4.0, so I recommend upgrading to tempo 2.4.1, see docs for more info: https://grafana.com/docs/tempo/v2.4.x/configuration/#cache once you have tiered cache enabled, look at the hit rate of your page cache, and scale your cache if it's not getting enough hits, we usually see page cache hit rate in 90% range. |
Beta Was this translation helpful? Give feedback.
-
❤️ this typo. You can increase the queue size in the frontend to reduce occurence of this error, but you will just delay other queries from executing.
To answer more queries faster you just have to scale out the query path.
As Suraj pointed out, that does not currently exist. You can, however, write TraceQL queries to access subsets of traces which answer a lot of the questions you may have. Can you point out the kinds of questions you are trying to answer? We can probably give you a TraceQL query that gives you what you want w/o pulling every trace. |
Beta Was this translation helpful? Give feedback.
A single query is split into multiple tiny parts called jobs and sent to querier to be processed. queriers will execute these jobs and fetch the parts of the blocks from backend to read data, and process the query. so a single query from end user can result in lot more queries to backend from querier.
we have tiered cached that allows you to cache things like footers, pages, and the whole query results..tiered cache was first release in tempo 2.4.0, so I recommend upgrading to tempo 2.4.1, see docs for more info: https://grafana.com/docs/tempo/v2.4.x/configuration/#cache
once you have tiered cache enabled, look at the hit rate of your page cache, and scale your cache if it's not getting e…