[Bug Fix]missing system logs in ksuto #593
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue describing the changes in this PR
Fixed issue some logs are missing in kusto logs.
Java worker is not set RpcLogCategory , by default it is set to user type, which will be logged to console as well as cx app insight if invocationId is present. It will not log to kusto. All java worker Rpclog are user type since we didn't set it explicitly, which causing those logs are not logged to kusto. For example: FunctionLoaderRequest log, WorkerStatusRequestHandler Log, etc. They all are user type but not have invocationId, they will be discarded from host side.
We should set them to system type, so they will be log to kusto
Host process rpclog with type user can be found https://github.com/Azure/azure-functions-host/blob/1347a2b1c10fdbd040be5f16f91d365ad69c1466/src/WebJobs.Script.Grpc/Channel/GrpcWorkerChannel.cs#L713, noticed it's discard any log without invocationId here https://github.com/Azure/azure-functions-host/blob/1347a2b1c10fdbd040be5f16f91d365ad69c1466/src/WebJobs.Script.Grpc/Channel/GrpcWorkerChannel.cs#L717.
Host process rpclog with type system can be found https://github.com/Azure/azure-functions-host/blob/1347a2b1c10fdbd040be5f16f91d365ad69c1466/src/WebJobs.Script.Grpc/Channel/GrpcWorkerChannel.cs#L751
Pull request checklist
release_notes.md
Additional information
Additional PR information