Skip to content
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

Remove logging of context mismatch which will always be logged. #2970

Merged
merged 1 commit into from
May 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,6 @@ public Context doAttach(Context toAttach) {

@Override
public void detach(Context toDetach, Context toRestore) {
io.opentelemetry.context.Context otelContext = io.opentelemetry.context.Context.current();
Context current = otelContext.get(GRPC_CONTEXT);
if (current != toDetach) {
// Log a severe message instead of throwing an exception as the context to attach is assumed
// to be the correct one and the unbalanced state represents a coding mistake in a lower
// layer in the stack that cannot be recovered from here.
logger.log(
Level.SEVERE,
"Context was not attached when detaching",
new Throwable().fillInStackTrace());
}

Scope scope = OTEL_SCOPE.get(toRestore);
if (scope == null) {
logger.log(
Expand Down