mirror of
https://github.com/grafana/grafana.git
synced 2024-11-29 04:04:00 -06:00
EchoBackend: Make EchoSrvTransport batched (#70012)
Make EchoSrvTransport batched With the update of faro web sdk to 1.1.0, batching was introduced, in which several telemetry signals can be grouped together in a fixed interval or buffer length. The current setup in which the EchoSrvTransport was proxying signals through the Echo Backend was yielding the following issue. The updated Fetch transport is batched but the way it was being used by the `GrafanaJavascriptAgentBackend` was pushing single items.
This commit is contained in:
parent
b60b43640f
commit
9f065a8835
@ -3,12 +3,17 @@ import { getEchoSrv, EchoEventType, config } from '@grafana/runtime';
|
||||
export class EchoSrvTransport extends BaseTransport {
|
||||
readonly name: string = 'EchoSrvTransport';
|
||||
readonly version: string = config.buildInfo.version;
|
||||
send(event: TransportItem) {
|
||||
send(items: TransportItem[]) {
|
||||
getEchoSrv().addEvent({
|
||||
type: EchoEventType.GrafanaJavascriptAgent,
|
||||
payload: event,
|
||||
payload: items,
|
||||
});
|
||||
}
|
||||
|
||||
isBatched() {
|
||||
return true;
|
||||
}
|
||||
|
||||
getIgnoreUrls() {
|
||||
return [];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user