EchoSrv: Enable auto route tracking for Azure App Insights (#113354)
* Echo: Enable auto route tracking with Azure App Insights * Add server config option to disable auto route tracking * fix not using minified js
This commit is contained in:
@@ -38,8 +38,9 @@ type FSFrontendSettings struct {
|
||||
AnalyticsConsoleReporting bool `json:"analyticsConsoleReporting,omitempty"`
|
||||
GrafanaJavascriptAgent setting.GrafanaJavascriptAgent `json:"grafanaJavascriptAgent,omitempty"`
|
||||
|
||||
ApplicationInsightsConnectionString string `json:"applicationInsightsConnectionString,omitempty"`
|
||||
ApplicationInsightsEndpointUrl string `json:"applicationInsightsEndpointUrl,omitempty"`
|
||||
ApplicationInsightsConnectionString string `json:"applicationInsightsConnectionString,omitempty"`
|
||||
ApplicationInsightsEndpointUrl string `json:"applicationInsightsEndpointUrl,omitempty"`
|
||||
ApplicationInsightsAutoRouteTracking bool `json:"applicationInsightsAutoRouteTracking,omitempty"`
|
||||
|
||||
TrustedTypesDefaultPolicyEnabled bool `json:"trustedTypesDefaultPolicyEnabled,omitempty"`
|
||||
CSPReportOnlyEnabled bool `json:"cspReportOnlyEnabled,omitempty"`
|
||||
|
||||
@@ -67,34 +67,35 @@ func NewIndexProvider(cfg *setting.Cfg, assetsManifest dtos.EntryPointAssets, li
|
||||
// subset of frontend settings needed for the login page
|
||||
// TODO what about enterprise settings here?
|
||||
frontendSettings := FSFrontendSettings{
|
||||
AnalyticsConsoleReporting: cfg.FrontendAnalyticsConsoleReporting,
|
||||
AnonymousEnabled: cfg.Anonymous.Enabled,
|
||||
ApplicationInsightsConnectionString: cfg.ApplicationInsightsConnectionString,
|
||||
ApplicationInsightsEndpointUrl: cfg.ApplicationInsightsEndpointUrl,
|
||||
AuthProxyEnabled: cfg.AuthProxy.Enabled,
|
||||
AutoAssignOrg: cfg.AutoAssignOrg,
|
||||
CSPReportOnlyEnabled: cfg.CSPReportOnlyEnabled,
|
||||
DisableLoginForm: cfg.DisableLoginForm,
|
||||
DisableUserSignUp: !cfg.AllowUserSignUp,
|
||||
GoogleAnalytics4Id: cfg.GoogleAnalytics4ID,
|
||||
GoogleAnalytics4SendManualPageViews: cfg.GoogleAnalytics4SendManualPageViews,
|
||||
GoogleAnalyticsId: cfg.GoogleAnalyticsID,
|
||||
GrafanaJavascriptAgent: cfg.GrafanaJavascriptAgent,
|
||||
Http2Enabled: cfg.Protocol == setting.HTTP2Scheme,
|
||||
JwtHeaderName: cfg.JWTAuth.HeaderName,
|
||||
JwtUrlLogin: cfg.JWTAuth.URLLogin,
|
||||
LdapEnabled: cfg.LDAPAuthEnabled,
|
||||
LoginHint: cfg.LoginHint,
|
||||
PasswordHint: cfg.PasswordHint,
|
||||
ReportingStaticContext: cfg.ReportingStaticContext,
|
||||
RudderstackConfigUrl: cfg.RudderstackConfigURL,
|
||||
RudderstackDataPlaneUrl: cfg.RudderstackDataPlaneURL,
|
||||
RudderstackIntegrationsUrl: cfg.RudderstackIntegrationsURL,
|
||||
RudderstackSdkUrl: cfg.RudderstackSDKURL,
|
||||
RudderstackWriteKey: cfg.RudderstackWriteKey,
|
||||
TrustedTypesDefaultPolicyEnabled: (cfg.CSPEnabled && strings.Contains(cfg.CSPTemplate, "require-trusted-types-for")) || (cfg.CSPReportOnlyEnabled && strings.Contains(cfg.CSPReportOnlyTemplate, "require-trusted-types-for")),
|
||||
VerifyEmailEnabled: cfg.VerifyEmailEnabled,
|
||||
BuildInfo: getBuildInfo(license, cfg),
|
||||
AnalyticsConsoleReporting: cfg.FrontendAnalyticsConsoleReporting,
|
||||
AnonymousEnabled: cfg.Anonymous.Enabled,
|
||||
ApplicationInsightsConnectionString: cfg.ApplicationInsightsConnectionString,
|
||||
ApplicationInsightsEndpointUrl: cfg.ApplicationInsightsEndpointUrl,
|
||||
ApplicationInsightsAutoRouteTracking: cfg.ApplicationInsightsAutoRouteTracking,
|
||||
AuthProxyEnabled: cfg.AuthProxy.Enabled,
|
||||
AutoAssignOrg: cfg.AutoAssignOrg,
|
||||
CSPReportOnlyEnabled: cfg.CSPReportOnlyEnabled,
|
||||
DisableLoginForm: cfg.DisableLoginForm,
|
||||
DisableUserSignUp: !cfg.AllowUserSignUp,
|
||||
GoogleAnalytics4Id: cfg.GoogleAnalytics4ID,
|
||||
GoogleAnalytics4SendManualPageViews: cfg.GoogleAnalytics4SendManualPageViews,
|
||||
GoogleAnalyticsId: cfg.GoogleAnalyticsID,
|
||||
GrafanaJavascriptAgent: cfg.GrafanaJavascriptAgent,
|
||||
Http2Enabled: cfg.Protocol == setting.HTTP2Scheme,
|
||||
JwtHeaderName: cfg.JWTAuth.HeaderName,
|
||||
JwtUrlLogin: cfg.JWTAuth.URLLogin,
|
||||
LdapEnabled: cfg.LDAPAuthEnabled,
|
||||
LoginHint: cfg.LoginHint,
|
||||
PasswordHint: cfg.PasswordHint,
|
||||
ReportingStaticContext: cfg.ReportingStaticContext,
|
||||
RudderstackConfigUrl: cfg.RudderstackConfigURL,
|
||||
RudderstackDataPlaneUrl: cfg.RudderstackDataPlaneURL,
|
||||
RudderstackIntegrationsUrl: cfg.RudderstackIntegrationsURL,
|
||||
RudderstackSdkUrl: cfg.RudderstackSDKURL,
|
||||
RudderstackWriteKey: cfg.RudderstackWriteKey,
|
||||
TrustedTypesDefaultPolicyEnabled: (cfg.CSPEnabled && strings.Contains(cfg.CSPTemplate, "require-trusted-types-for")) || (cfg.CSPReportOnlyEnabled && strings.Contains(cfg.CSPReportOnlyTemplate, "require-trusted-types-for")),
|
||||
VerifyEmailEnabled: cfg.VerifyEmailEnabled,
|
||||
BuildInfo: getBuildInfo(license, cfg),
|
||||
}
|
||||
|
||||
return &IndexProvider{
|
||||
|
||||
Reference in New Issue
Block a user