-
Notifications
You must be signed in to change notification settings - Fork 202
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
Increase export throughput #2204
Conversation
This reverts commit b2c60e7.
flushRequested.set(null); | ||
CompletableResultCode.ofAll(pendingExports).join(exporterTimeoutNanos, TimeUnit.NANOSECONDS); | ||
CompletableResultCode flushResult = flushRequested.get(); | ||
if (flushResult != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is null check needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled this change in from upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe upstream needs to be updated? based on the old code, null check doesn't seem to be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like upstream added the null check to make for nullaway static analysis happy, I'd rather stay in sync with them
pendingExports.remove(result); | ||
}); | ||
} else { | ||
result.join(exporterTimeoutNanos, TimeUnit.NANOSECONDS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add log here to warn users that the maxPendingExports is reached here?
pendingExports.add(result); | ||
result.whenComplete( | ||
() -> { | ||
pendingExports.remove(result); | ||
}); | ||
} else { | ||
addAsyncExport.recordFailure( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to track this via statsbeat?
can we add a todo? it's hard to go through the review with the whole team to create a new meter for this in StatsbeatNetwork.. but we can track it through StatsbeatFeature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't expect this to be common, it allows 100 concurrent exports
The first commit is reverting the previous implementation (which was a mess from a diff perspective), so recommend reviewing just the second commit which contains the new implementation, which is much better from a diff perspective, and aligns with the approach we will probably end up with upstream in otel.