Skip to content

Commit c05a3a5

Browse files
committed
remove prom endpoint config field
1 parent cbc1c77 commit c05a3a5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

telemetry/metrics.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ type Config struct {
9494
// Otlp Exporter fields
9595
OtlpExporterEnabled bool `mapstructure:"otlp-exporter-enabled"`
9696
OtlpCollectorHttpAddr string `mapstructure:"otlp-collector-http-addr"`
97-
PrometheusEndpoint string `mapstructure:"prometheus-endpoint"`
9897
OtlpServiceName string `mapstructure:"otlp-service-name"`
9998
OtlpPushInterval time.Duration `mapstructure:"otlp-push-interval"`
10099
}

telemetry/otlp_exporter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ func StartOtlpExporter(cfg Config) {
4848

4949
go func() {
5050
for {
51-
if err := scrapePrometheusMetrics(ctx, cfg.PrometheusEndpoint, meter, gauges, histograms); err != nil {
51+
if err := scrapePrometheusMetrics(ctx, meter, gauges, histograms); err != nil {
5252
log.Printf("error scraping metrics: %v", err)
5353
}
5454
time.Sleep(cfg.OtlpPushInterval)
5555
}
5656
}()
5757
}
5858

59-
func scrapePrometheusMetrics(ctx context.Context, promEndpoint string, meter otmetric.Meter, gauges map[string]otmetric.Float64Gauge, histograms map[string]otmetric.Float64Histogram) error {
59+
func scrapePrometheusMetrics(ctx context.Context, meter otmetric.Meter, gauges map[string]otmetric.Float64Gauge, histograms map[string]otmetric.Float64Histogram) error {
6060
metricFamilies, err := prometheus.DefaultGatherer.Gather()
6161
if err != nil {
6262
log.Printf("failed to gather prometheus metrics: %v", err)

0 commit comments

Comments
 (0)