Frontend: Support tracing with Faro (#91237)

Move code from previous PR
This commit is contained in:
Tobias Skarhed
2024-07-31 15:13:05 +02:00
committed by GitHub
parent 057c04ed9d
commit e8c30c86f0
9 changed files with 214 additions and 7 deletions

View File

@ -8,6 +8,7 @@ type GrafanaJavascriptAgent struct {
ErrorInstrumentalizationEnabled bool `json:"errorInstrumentalizationEnabled"`
ConsoleInstrumentalizationEnabled bool `json:"consoleInstrumentalizationEnabled"`
WebVitalsInstrumentalizationEnabled bool `json:"webVitalsInstrumentalizationEnabled"`
TracingInstrumentalizationEnabled bool `json:"tracingInstrumentalizationEnabled"`
InternalLoggerLevel int `json:"internalLoggerLevel"`
ApiKey string `json:"apiKey"`
}
@ -22,6 +23,7 @@ func (cfg *Cfg) readGrafanaJavascriptAgentConfig() {
ErrorInstrumentalizationEnabled: raw.Key("instrumentations_errors_enabled").MustBool(true),
ConsoleInstrumentalizationEnabled: raw.Key("instrumentations_console_enabled").MustBool(true),
WebVitalsInstrumentalizationEnabled: raw.Key("instrumentations_webvitals_enabled").MustBool(true),
TracingInstrumentalizationEnabled: raw.Key("instrumentations_tracing_enabled").MustBool(true),
InternalLoggerLevel: raw.Key("internal_logger_level").MustInt(0),
ApiKey: raw.Key("api_key").String(),
}