EchoSrv interface
Used to send events to all the registered backends. This should be accessed via the getEchoSrv() function. Will, by default, flush events to the backends every 10s or when the flush function is triggered.
Signature
export interface EchoSrv
Import
import { EchoSrv } from '@grafana/runtime';
Methods
Method | Description |
---|---|
addBackend(backend) | Add a new echo backend to the list of backends that will receive events. |
addEvent(event, meta) | Call this to add event that will be sent to the echo backends upon next flush. |
flush() | Call this to flush current events to the echo backends. |
addBackend method
Add a new echo backend to the list of backends that will receive events.
Signature
addBackend(backend: EchoBackend): void;
Parameters
Parameter | Type | Description |
---|---|---|
backend | EchoBackend |
Returns:
void
addEvent method
Call this to add event that will be sent to the echo backends upon next flush.
Signature
addEvent<T extends EchoEvent>(event: Omit<T, 'meta'>, meta?: {}): void;
Parameters
Parameter | Type | Description |
---|---|---|
event | Omit<T, ‘meta’> |
Object containing event information. |
meta | {} |
Object that will extend/override the default meta object. |
Returns:
void
flush method
Call this to flush current events to the echo backends.
Signature
flush(): void;
Returns:
void
Related Grafana video resources
Getting started with Grafana
Take a guided tour of Grafana and learn how to monitor a web service using Prometheus and Loki in this beginner-friendly webinar.
All about Grafana plugins: Visualizing disparate data sources in one place
Grafana Enterprise plugins are integrations with other commercial monitoring tools (such as Datadog, Splunk, New Relic, ServiceNow, Oracle, and Dynatrace) that are created, maintained, and supported by the Grafana Labs team.
Demo: Getting started with Grafana Enterprise and observability
Join the Grafana Labs team for a 30-minute demo of how to get started with the Grafana Stack, so you can go from zero to observability in just a few minutes.