File tree 1 file changed +17
-0
lines changed
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 {
78
78
registry .MustRegister (probeSuccessGauge )
79
79
registry .MustRegister (probeDurationGauge )
80
80
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
+
81
98
// Run the probe
82
99
pc , err := collector .NewProbeCollector (tl , registry , dsn )
83
100
if err != nil {
You can’t perform that action at this time.
0 commit comments