mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboards: Check if Grafana Javascript agent is enabled before using faro.api (#90509)
Check if Grafana Javascript agent is enabled before using faro.api
This commit is contained in:
parent
377079d8b3
commit
a0122187b0
@ -1,5 +1,6 @@
|
|||||||
import { FieldConfigSource } from '@grafana/data';
|
import { FieldConfigSource } from '@grafana/data';
|
||||||
import { faro } from '@grafana/faro-web-sdk';
|
import { faro } from '@grafana/faro-web-sdk';
|
||||||
|
import { config } from 'app/core/config';
|
||||||
import { FIELD_CONFIG_CUSTOM_KEY, FIELD_CONFIG_OVERRIDES_KEY, PanelLogEvents } from 'app/core/log_events';
|
import { FIELD_CONFIG_CUSTOM_KEY, FIELD_CONFIG_OVERRIDES_KEY, PanelLogEvents } from 'app/core/log_events';
|
||||||
|
|
||||||
interface PanelLogInfo {
|
interface PanelLogInfo {
|
||||||
@ -29,6 +30,9 @@ export class PanelOptionsLogger {
|
|||||||
};
|
};
|
||||||
|
|
||||||
logPanelEvent = (eventName: string, newKey: string, newVal: string, oldVal?: string) => {
|
logPanelEvent = (eventName: string, newKey: string, newVal: string, oldVal?: string) => {
|
||||||
|
if (!config.grafanaJavascriptAgent.enabled) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const logObj = {
|
const logObj = {
|
||||||
key: newKey,
|
key: newKey,
|
||||||
newValue: newVal,
|
newValue: newVal,
|
||||||
|
Loading…
Reference in New Issue
Block a user