-
Notifications
You must be signed in to change notification settings - Fork 900
Sdk builders extended with addProcessorFirst methods #7243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b516f56
1f7c407
6f8a181
a493302
6460057
e719247
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
Comparing source compatibility of opentelemetry-sdk-trace-1.50.0-SNAPSHOT.jar against opentelemetry-sdk-trace-1.49.0.jar | ||
No changes. | ||
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.sdk.trace.SdkTracerProviderBuilder (not serializable) | ||
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0 | ||
+++ NEW METHOD: PUBLIC(+) io.opentelemetry.sdk.trace.SdkTracerProviderBuilder addSpanProcessorFirst(io.opentelemetry.sdk.trace.SpanProcessor) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,6 +96,24 @@ public SdkLoggerProviderBuilder addLogRecordProcessor(LogRecordProcessor process | |
return this; | ||
} | ||
|
||
/** | ||
* Add a log processor as first. {@link LogRecordProcessor#onEmit(Context, ReadWriteLogRecord)} | ||
* will be called each time a log is emitted by {@link Logger} instances obtained from the {@link | ||
* SdkLoggerProvider}. | ||
* | ||
* <p>Compared to {@link SdkLoggerProviderBuilder#addLogRecordProcessor(LogRecordProcessor)}, this | ||
* method adds the processor to the beginning of the processor pipeline. So the {@code processor} | ||
* given will be executed before than the other processors already added. | ||
* | ||
* @param processor the log processor | ||
* @return this | ||
*/ | ||
public SdkLoggerProviderBuilder addLogRecordProcessorFirst(LogRecordProcessor processor) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This name follows the naming convention of While it initially seems like a verbose name, I think its probably the best we can do to balance consistency with the existing "addLogRecordProcessor" and the precedent in java with |
||
requireNonNull(processor, "processor"); | ||
logRecordProcessors.add(0, processor); | ||
return this; | ||
} | ||
|
||
/** | ||
* Assign a {@link Clock}. | ||
* | ||
|
Uh oh!
There was an error while loading. Please reload this page.