This commit is contained in:
Lauri Tulmin 2021-09-09 02:40:31 +03:00 committed by GitHub
parent dc69d5fb56
commit a279b7d5be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -49,7 +49,7 @@ public final class KafkaSingletons {
return Instrumenter.<ReceivedRecords, Void>newBuilder(
GlobalOpenTelemetry.get(), INSTRUMENTATION_NAME, spanNameExtractor)
.addAttributesExtractor(attributesExtractor)
.setTimeExtractors(ReceivedRecords::startTime, (request, response) -> request.now())
.setTimeExtractors(ReceivedRecords::startTime, (request, response, error) -> request.now())
.newInstrumenter(SpanKindExtractor.alwaysConsumer());
}

View File

@ -26,7 +26,8 @@ class TwilioExperimentalAttributesExtractor extends AttributesExtractor<String,
protected void onStart(AttributesBuilder attributes, String s) {}
@Override
protected void onEnd(AttributesBuilder attributes, String s, @Nullable Object result) {
protected void onEnd(
AttributesBuilder attributes, String s, @Nullable Object result, @Nullable Throwable error) {
if (result == null) {
return;
}