Analytics: Instrument Azure Application Insights (#38553)

* add backend

* read config and pass to backend

* update config docs

* change var name

* use connection string instead of instrumentation key

* add config for endpoint url. update docs

* update default ini

* add spaces

* remove space

* Update docs/sources/administration/configuration.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* Update conf/defaults.ini

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
This commit is contained in:
Erik Sundell
2021-09-15 13:00:38 +02:00
committed by GitHub
co-authored by achatterjee-grafana
parent 6005e6572d
commit 9d3f4f5983
7 changed files with 114 additions and 35 deletions
+7 -3
View File
@@ -369,9 +369,11 @@ type Cfg struct {
Env string
// Analytics
CheckForUpdates bool
ReportingDistributor string
ReportingEnabled bool
CheckForUpdates bool
ReportingDistributor string
ReportingEnabled bool
ApplicationInsightsConnectionString string
ApplicationInsightsEndpointUrl string
// LDAP
LDAPEnabled bool
@@ -908,6 +910,8 @@ func (cfg *Cfg) Load(args CommandLineArgs) error {
if len(cfg.ReportingDistributor) >= 100 {
cfg.ReportingDistributor = cfg.ReportingDistributor[:100]
}
cfg.ApplicationInsightsConnectionString = analytics.Key("application_insights_connection_string").String()
cfg.ApplicationInsightsEndpointUrl = analytics.Key("application_insights_endpoint_url").String()
if err := readAlertingSettings(iniFile); err != nil {
return err