opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

Expose metric for log export failure #6709

Open harshitrjpt opened this issue 1 year ago • 3 comments

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

harshitrjpt avatar Oct 10 '24 14:10 harshitrjpt

CLA Signed

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.

codecov[bot] avatar Oct 10 '24 15:10 codecov[bot]

where does this PR stand? Do we need it if we have the generic metrics already?

jkwatson avatar Sep 11 '25 16:09 jkwatson

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.

jack-berg avatar Dec 12 '25 15:12 jack-berg