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

[#noissue] Improve logging for stream errors #12167

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
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 @@ -123,7 +123,7 @@
final Status status = Status.fromThrowable(t);
final Metadata metadata = Status.trailersFromThrowable(t);
if (thLogger.isInfoEnabled()) {
thLogger.info("Failed to ping stream, id={}, {} metadata:{}", pingSession.getTransportId(), status, metadata);
thLogger.info("Failed to ping stream, transportId={}, header={}, status={}, metadata={}", pingSession.getTransportId(), header, status, metadata);

Check warning on line 126 in collector/src/main/java/com/navercorp/pinpoint/collector/receiver/grpc/service/AgentService.java

View check run for this annotation

Codecov / codecov/patch

collector/src/main/java/com/navercorp/pinpoint/collector/receiver/grpc/service/AgentService.java#L126

Added line #L126 was not covered by tests
}
// responseObserver.onCompleted();
disconnect(pingSession);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,11 @@
Metadata metadata = Status.trailersFromThrowable(throwable);
if (logger.isInfoEnabled()) {
Header header = ServerContext.getAgentInfo();
logger.info("onError: Failed to span streamId={}, {} {} {}", streamId, header, status, metadata);
if (status.getCode() == Status.CANCELLED.getCode()) {
logger.info("Cancelled: streamId={}, applicationName={}, agentId={}, status={}, metadata={}", streamId, header.getApplicationName(), header.getAgentId(), status, metadata);

Check warning on line 73 in collector/src/main/java/com/navercorp/pinpoint/collector/receiver/grpc/service/ServerCallStream.java

View check run for this annotation

Codecov / codecov/patch

collector/src/main/java/com/navercorp/pinpoint/collector/receiver/grpc/service/ServerCallStream.java#L73

Added line #L73 was not covered by tests
} else {
logger.info("onError: Failed to span streamId={}, header={}, status={}, metadata={}", streamId, header, status, metadata);
}
}

responseCompleted();
Expand Down