Frontend Monitoring: Add config option to enable all default instrumentations (#94862)

* Add config options to enable all faro instrumentation

* Fix ts error

* Fix type in test

* Add to default config files
This commit is contained in:
Tobias Skarhed
2024-10-18 15:35:39 +02:00
committed by GitHub
parent a44f718c09
commit bbc4dc3867
7 changed files with 19 additions and 1 deletions

View File

@ -5,6 +5,7 @@ type GrafanaJavascriptAgent struct {
CustomEndpoint string `json:"customEndpoint"`
EndpointRPS int `json:"-"`
EndpointBurst int `json:"-"`
AllInstrumentationsEnabeld bool `json:"allInstrumentationEnabeld"`
ErrorInstrumentalizationEnabled bool `json:"errorInstrumentalizationEnabled"`
ConsoleInstrumentalizationEnabled bool `json:"consoleInstrumentalizationEnabled"`
WebVitalsInstrumentalizationEnabled bool `json:"webVitalsInstrumentalizationEnabled"`
@ -20,6 +21,7 @@ func (cfg *Cfg) readGrafanaJavascriptAgentConfig() {
CustomEndpoint: raw.Key("custom_endpoint").MustString("/log-grafana-javascript-agent"),
EndpointRPS: raw.Key("log_endpoint_requests_per_second_limit").MustInt(3),
EndpointBurst: raw.Key("log_endpoint_burst_limit").MustInt(15),
AllInstrumentationsEnabeld: raw.Key("instrumentations_all_enabled").MustBool(true),
ErrorInstrumentalizationEnabled: raw.Key("instrumentations_errors_enabled").MustBool(true),
ConsoleInstrumentalizationEnabled: raw.Key("instrumentations_console_enabled").MustBool(true),
WebVitalsInstrumentalizationEnabled: raw.Key("instrumentations_webvitals_enabled").MustBool(true),