Expose metric for log export failure #6709
Ran in local, otel collector log shows the metric as following:
ScopeMetrics #1
ScopeMetrics SchemaURL:
InstrumentationScope io.opentelemetry.sdk.logs
...
Metric #2
Descriptor:
-> Name: logsExportFailure
-> Description: Logs export failure in BatchLogRecordProcessor.
-> Unit: 1
-> DataType: Sum
-> IsMonotonic: true
-> AggregationTemporality: Cumulative
NumberDataPoints #0
Data point attributes:
-> processorType: Str(BatchLogRecordProcessor)
StartTimestamp: 2024-10-01 19:05:12.150731 +0000 UTC
Timestamp: 2024-10-01 19:12:12.161627 +0000 UTC
Value: 3
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: harshitrjpt / name: Harshit Rajput (9859eaf81bc22f3add0f5e0e2fae14e145094249, d00c2915cc3acfa13560053552be2ed8ea90846f)
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 90.11%. Comparing base (b927d9d) to head (9859eaf).
:warning: Report is 767 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #6779 +/- ##
============================================
+ Coverage 90.10% 90.11% +0.01%
- Complexity 6541 6542 +1
============================================
Files 728 728
Lines 19695 19703 +8
Branches 1935 1935
============================================
+ Hits 17746 17756 +10
+ Misses 1349 1347 -2
Partials 600 600
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
where does this PR stand? Do we need it if we have the generic metrics already?
There are now standard semantic conventions for this: https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics/
#7895 is working on the implementation for traces, and there will be a followup for logs.