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

PayloadProcessor log entries not useful #34

Open
rossbrigoli opened this issue Sep 9, 2023 · 0 comments
Open

PayloadProcessor log entries not useful #34

rossbrigoli opened this issue Sep 9, 2023 · 0 comments

Comments

@rossbrigoli
Copy link

rossbrigoli commented Sep 9, 2023

The log entries emitted by LoggingPayloadProcessor are NOT very useful because the actual payload data is not displayed correctly. It only logs the number of bytes instead of the actual payload.

Example:

The value of the data field is data=86B.

{"instant":{"epochSecond":1694276873,"nanoOfSecond":586464093},"thread":"pool-4-thread-1","level":"INFO","loggerName":"com.ibm.watson.modelmesh.payload.LoggingPayloadProcessor","message":"Payload: Payload{id='69-1', modelId='with-logging', method='inference.GRPCInferenceService/ModelInfer', status=request, metadata=Metadata(content-type=application/grpc,user-agent=grpc-go/1.51.0,grpcgateway-user-agent=python-requests/2.31.0,authorization=Basic xxxx,grpcgateway-authorization=Basic xxxx,grpcgateway-accept=*/*,grpcgateway-content-type=application/json,x-forwarded-host=with-logging-wines.apps.fmflask2.faisallabs.net,x-forwarded-for=3.105.194.26, 10.131.2.48, ::1), data=63B}","endOfBatch":false,"loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","contextMap":{},"threadId":45,"threadPriority":5}
{"instant":{"epochSecond":1694276873,"nanoOfSecond":586949553},"thread":"pool-4-thread-1","level":"INFO","loggerName":"com.ibm.watson.modelmesh.payload.LoggingPayloadProcessor","message":"Payload: Payload{id='69-1', modelId='with-logging', method='inference.GRPCInferenceService/ModelInfer', status=Status{code=OK, description=null, cause=null}, metadata=Metadata(grpc-encoding=identity,grpc-accept-encoding=gzip), data=86B}","endOfBatch":false,"loggerFqcn":"org.apache.logging.slf4j.Log4jLogger","contextMap":{},"threadId":45,"threadPriority":5}

Wouldn't it be useful if we log the actual payload data instead?

At line 108 of the Payload.java file, i think it will be more useful if we use ByteBuf.toString(charset) instead of .readallbytes().

Jooho pushed a commit to Jooho/modelmesh that referenced this issue Nov 28, 2024
…madiIram-patch-1

add tag and slack changes to tekton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant