EchoSrv: Add BrowserConsoleBackend to log analytics events (#95554)

* EchoSrv: Add BrowserConsoleBackend to log analytics events

* rename config name

* warn on non-scalar property values
This commit is contained in:
Josh Hunt
2024-10-29 18:20:54 +00:00
committed by GitHub
parent d480900a9b
commit 189802d3c3
10 changed files with 68 additions and 1 deletions
+2
View File
@@ -187,6 +187,8 @@ type FrontendSettingsDTO struct {
RudderstackConfigUrl string `json:"rudderstackConfigUrl"`
RudderstackIntegrationsUrl string `json:"rudderstackIntegrationsUrl"`
AnalyticsConsoleReporting bool `json:"analyticsConsoleReporting"`
FeedbackLinksEnabled bool `json:"feedbackLinksEnabled"`
ApplicationInsightsConnectionString string `json:"applicationInsightsConnectionString"`
ApplicationInsightsEndpointUrl string `json:"applicationInsightsEndpointUrl"`
+1
View File
@@ -213,6 +213,7 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
RudderstackSdkUrl: hs.Cfg.RudderstackSDKURL,
RudderstackConfigUrl: hs.Cfg.RudderstackConfigURL,
RudderstackIntegrationsUrl: hs.Cfg.RudderstackIntegrationsURL,
AnalyticsConsoleReporting: hs.Cfg.FrontendAnalyticsConsoleReporting,
FeedbackLinksEnabled: hs.Cfg.FeedbackLinksEnabled,
ApplicationInsightsConnectionString: hs.Cfg.ApplicationInsightsConnectionString,
ApplicationInsightsEndpointUrl: hs.Cfg.ApplicationInsightsEndpointUrl,
+2
View File
@@ -382,6 +382,7 @@ type Cfg struct {
RudderstackConfigURL string
RudderstackIntegrationsURL string
IntercomSecret string
FrontendAnalyticsConsoleReporting bool
// LDAP
LDAPAuthEnabled bool
@@ -1158,6 +1159,7 @@ func (cfg *Cfg) parseINIFile(iniFile *ini.File) error {
cfg.RudderstackConfigURL = analytics.Key("rudderstack_config_url").String()
cfg.RudderstackIntegrationsURL = analytics.Key("rudderstack_integrations_url").String()
cfg.IntercomSecret = analytics.Key("intercom_secret").String()
cfg.FrontendAnalyticsConsoleReporting = analytics.Key("browser_console_reporter").MustBool(false)
cfg.ReportingEnabled = analytics.Key("reporting_enabled").MustBool(true)
cfg.ReportingDistributor = analytics.Key("reporting_distributor").MustString("grafana-labs")