Skip to content

Commit

Permalink
fix: log metadata in debug level
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankrai09 committed Apr 4, 2024
1 parent b7d8562 commit ce0e094
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ public DynamicMessage execute(byte[] logMessage, Headers headers) {
return stencilClient.parse(grpcSinkConfig.getSinkGrpcResponseSchemaProtoClass(), response);

} catch (StatusRuntimeException sre) {
firehoseInstrumentation.logError("GRPC call failed with metadata: {}, error message: {}", metadata.toString(), sre.getMessage());
firehoseInstrumentation.logError("GRPC call failed with error message: {}", sre.getMessage());
firehoseInstrumentation.logDebug("GRPC call metadata: {}", metadata.toString());
firehoseInstrumentation.incrementCounter(Metrics.SINK_GRPC_ERROR_TOTAL, "status=" + sre.getStatus().getCode());
} catch (Exception e) {
firehoseInstrumentation.logError("GRPC call failed with metadata: {}, error message: {}", metadata.toString(), e.getMessage());
firehoseInstrumentation.logError("GRPC call failed with error message: {}", e.getMessage());
firehoseInstrumentation.logDebug("GRPC call metadata: {}", metadata.toString());
firehoseInstrumentation.incrementCounter(Metrics.SINK_GRPC_ERROR_TOTAL, "status=UNIDENTIFIED");
}
return emptyResponse;
Expand Down

0 comments on commit ce0e094

Please sign in to comment.