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

[Bug Fix]missing system logs in ksuto #593

Merged
merged 1 commit into from
Jul 28, 2022
Merged

Conversation

kaibocai
Copy link
Member

@kaibocai kaibocai commented Jun 22, 2022

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

     Check if the logging namespace belongs to system log, invocation log should be categorized to user type (default), others should
     be categorized to system type.
     
                   local_console   customer_app_insight    functions_kusto_table
      system_log   false,           false,                   true
      user_log     true,            true,                    false

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

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes should not be added to the release notes for the next release
    • Otherwise: I've added my notes to release_notes.md
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

@kaibocai
Copy link
Member Author

Also checkout Azure/azure-functions-host#8222

@kaibocai kaibocai changed the title fix bug missing system logs in ksuto [Bug Fix]missing system logs in ksuto Jun 23, 2022
@kaibocai kaibocai force-pushed the kaibocai/bugfix-system-log branch from db722cc to ebfe5ae Compare July 28, 2022 20:45
@kaibocai kaibocai merged commit c4d4c33 into dev Jul 28, 2022
@kaibocai kaibocai deleted the kaibocai/bugfix-system-log branch July 28, 2022 21:15
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

Successfully merging this pull request may close these issues.

3 participants