mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Tempo: Remove usage of traceQLStreaming feature toggle (#93033)
* Remove usage of traceqlStreaming feature toggle and stop checking for Tempo version * Increase Grafana Live's ClientQueueMaxSize to 4mb to support larger responses from Tempo
This commit is contained in:
parent
ffa925718e
commit
72ed3107fa
@ -105,9 +105,10 @@ func ProvideService(plugCtxProvider *plugincontext.Provider, cfg *setting.Cfg, r
|
|||||||
// things. For example Node allows to publish messages to channels from server
|
// things. For example Node allows to publish messages to channels from server
|
||||||
// side with its Publish method.
|
// side with its Publish method.
|
||||||
node, err := centrifuge.New(centrifuge.Config{
|
node, err := centrifuge.New(centrifuge.Config{
|
||||||
LogHandler: handleLog,
|
LogHandler: handleLog,
|
||||||
LogLevel: centrifuge.LogLevelError,
|
LogLevel: centrifuge.LogLevelError,
|
||||||
MetricsNamespace: "grafana_live",
|
MetricsNamespace: "grafana_live",
|
||||||
|
ClientQueueMaxSize: 4194304, // 4MB
|
||||||
// Use reasonably large expiration interval for stream meta key,
|
// Use reasonably large expiration interval for stream meta key,
|
||||||
// much bigger than maximum HistoryLifetime value in Node config.
|
// much bigger than maximum HistoryLifetime value in Node config.
|
||||||
// This way stream meta data will expire, in some cases you may want
|
// This way stream meta data will expire, in some cases you may want
|
||||||
|
@ -286,18 +286,13 @@ export class TempoDatasource extends DataSourceWithBackend<TempoQuery, TempoJson
|
|||||||
* Check if streaming for search queries is enabled (and available).
|
* Check if streaming for search queries is enabled (and available).
|
||||||
*
|
*
|
||||||
* We need to check:
|
* We need to check:
|
||||||
* - the `traceQLStreaming` feature toggle, to disable streaming if customer support turned off the toggle in the past, which usually means that streaming does not work properly for the customer
|
* - the Tempo data source plugin toggle, to disable streaming if the user disabled it in the data source configuration
|
||||||
* - the recently created Tempo data source plugin toggle, to disable streaming if the user disabled it in the data source configuration
|
* - if Grafana Live is enabled
|
||||||
* - whether streaming is actually available based on the Tempo version, just as a sanity check
|
|
||||||
*
|
*
|
||||||
* @return true if streaming for search queries is enabled, false otherwise
|
* @return true if streaming for search queries is enabled, false otherwise
|
||||||
*/
|
*/
|
||||||
isStreamingSearchEnabled() {
|
isStreamingSearchEnabled() {
|
||||||
return (
|
return this.streamingEnabled?.search && config.liveEnabled;
|
||||||
(config.featureToggles.traceQLStreaming || this.streamingEnabled?.search) &&
|
|
||||||
this.isFeatureAvailable(FeatureName.streaming) &&
|
|
||||||
config.liveEnabled
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
isTraceQlMetricsQuery(query: string): boolean {
|
isTraceQlMetricsQuery(query: string): boolean {
|
||||||
@ -371,7 +366,7 @@ export class TempoDatasource extends DataSourceWithBackend<TempoQuery, TempoJson
|
|||||||
app: options.app ?? '',
|
app: options.app ?? '',
|
||||||
grafana_version: config.buildInfo.version,
|
grafana_version: config.buildInfo.version,
|
||||||
query: queryValue ?? '',
|
query: queryValue ?? '',
|
||||||
streaming: this.streamingEnabled,
|
streaming: this.isStreamingSearchEnabled(),
|
||||||
});
|
});
|
||||||
subQueries.push(this.handleTraceQlQuery(options, targets, queryValue));
|
subQueries.push(this.handleTraceQlQuery(options, targets, queryValue));
|
||||||
}
|
}
|
||||||
@ -405,7 +400,7 @@ export class TempoDatasource extends DataSourceWithBackend<TempoQuery, TempoJson
|
|||||||
app: options.app ?? '',
|
app: options.app ?? '',
|
||||||
grafana_version: config.buildInfo.version,
|
grafana_version: config.buildInfo.version,
|
||||||
query: queryValueFromFilters ?? '',
|
query: queryValueFromFilters ?? '',
|
||||||
streaming: this.streamingEnabled,
|
streaming: this.isStreamingSearchEnabled(),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.isStreamingSearchEnabled()) {
|
if (this.isStreamingSearchEnabled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user