File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,23 @@ func handleProbe(logger log.Logger) http.HandlerFunc {
7878registry .MustRegister (probeSuccessGauge )
7979registry .MustRegister (probeDurationGauge )
8080
81+ opts := []ExporterOpt {
82+ DisableDefaultMetrics (* disableDefaultMetrics ),
83+ DisableSettingsMetrics (* disableSettingsMetrics ),
84+ AutoDiscoverDatabases (* autoDiscoverDatabases ),
85+ WithUserQueriesPath (* queriesPath ),
86+ WithConstantLabels (* constantLabelsList ),
87+ ExcludeDatabases (* excludeDatabases ),
88+ IncludeDatabases (* includeDatabases ),
89+ }
90+
91+ dsns := []string {dsn .GetConnectionString ()}
92+ exporter := NewExporter (dsns , opts ... )
93+ defer func () {
94+ exporter .servers .Close ()
95+ }()
96+ registry .MustRegister (exporter )
97+
8198// Run the probe
8299pc , err := collector .NewProbeCollector (tl , registry , dsn )
83100if err != nil {
You can’t perform that action at this time.
0 commit comments