Skip to content

Commit 8675443

Browse files
committed
Instrument obsreport.Scraper (#19)
* instrument obsreport.scraper metrics with otel go
1 parent 29d216a commit 8675443

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

obsreport/obsreport_scraper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,4 @@ func (s *Scraper) recordMetrics(scraperCtx context.Context, numScrapedMetrics, n
178178
obsmetrics.ScraperScrapedMetricPoints.M(int64(numScrapedMetrics)),
179179
obsmetrics.ScraperErroredMetricPoints.M(int64(numErroredMetrics)))
180180
}
181-
}
181+
}

obsreport/obsreport_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,4 +560,4 @@ func testProcessorLogRecords(t *testing.T, tt obsreporttest.TestTelemetry, regis
560560
obsrep.LogsDropped(context.Background(), droppedRecords)
561561

562562
require.NoError(t, tt.CheckProcessorLogs(acceptedRecords, refusedRecords, droppedRecords))
563-
}
563+
}

obsreport/obsreporttest/obsreporttest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,4 @@ func SetupTelemetry(id component.ID) (TestTelemetry, error) {
205205
// When this function is called it is required to also call SetupTelemetry as first thing.
206206
func CheckScraperMetrics(tts TestTelemetry, receiver component.ID, scraper component.ID, scrapedMetricPoints, erroredMetricPoints int64) error {
207207
return tts.otelPrometheusChecker.checkScraperMetrics(receiver, scraper, scrapedMetricPoints, erroredMetricPoints)
208-
}
208+
}

obsreport/obsreporttest/obsreporttest_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,4 @@ func TestCheckExporterLogsViews(t *testing.T) {
255255
assert.Error(t, tt.CheckExporterLogs(7, 7))
256256
assert.Error(t, tt.CheckExporterLogs(0, 0))
257257
assert.Error(t, tt.CheckExporterLogs(0, 7))
258-
}
258+
}

obsreport/obsreporttest/otelprometheuschecker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,4 @@ func attributesForProcessorMetrics(processor component.ID) []attribute.KeyValue
198198
// attributesForReceiverMetrics returns the attributes that are needed for the receiver metrics.
199199
func attributesForExporterMetrics(exporter component.ID) []attribute.KeyValue {
200200
return []attribute.KeyValue{attribute.String(exporterTag, exporter.String())}
201-
}
201+
}

0 commit comments

Comments
 (0)