stdlog observ: remove partial success handling #8174
stdlog observ: remove partial success handling #8174dmathieu merged 8 commits intoopen-telemetry:mainfrom
Conversation
…trumentation tests to accommodate changes in error handling and logging success metrics.
…ameters during log export completion.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8174 +/- ##
=======================================
- Coverage 82.7% 82.6% -0.1%
=======================================
Files 310 309 -1
Lines 24648 24621 -27
=======================================
- Hits 20384 20357 -27
+ Misses 3888 3887 -1
- Partials 376 377 +1
🚀 New features to boost your workflow:
|
|
I need to handle extracting partial successes from I briefly looked into it, and due to the fact that
|
|
I think in stdlog, we only need to pass the successfully exported value along with the corresponding error when an error occurs—similar to how std trace handles it. The reason for implementing this partial successes error in the first place is that in OTLP we can directly obtain the value associated with the success, whereas in stdlog the situation is different. in otlplog if resp != nil && resp.PartialSuccess != nil {
msg := resp.PartialSuccess.GetErrorMessage()
n := resp.PartialSuccess.GetRejectedLogRecords()
if n != 0 || msg != "" {
err := internal.LogPartialSuccessError(n, msg)
uploadErr = errors.Join(uploadErr, err)
}
}like stdtrace // Encode span stubs, one by one
if e := e.encoder.Encode(stub); e != nil {
err = errors.Join(err, fmt.Errorf("failed to encode span %d: %w", i, e))
continue
}
success++ |
@dashpole I think we should keep consistent with stdtrace's instrument, what do you think? |
|
opentelemetry-go/exporters/stdout/stdoutlog/exporter.go Lines 47 to 58 in 2fe7910 We don't currently support partial success in stdoutlog. If we want to match the behavior of stdouttrace, we should support partial sucecss like it does: opentelemetry-go/exporters/stdout/stdouttrace/trace.go Lines 81 to 99 in 2fe7910 |
Yes, that's exactly what I mean. So in this PR, I removed the |
|
I see. I'm OK with this as a first step. |
While adding instrumentation for
stdoutlog, I found thatPartialSuccesshandling is not needed for this exporter.stdoutlogdoes not return partial-export semantics