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

Fix log pipeline - populate logs into kusto #170

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

kaibocai
Copy link
Member

Issue describing the changes in this PR

With the current logging logic in the SDK, the logs are not recorded anywhere, causing the logs in the SDK to be meaningless.

This PR updates the current Java Util Logger with FunctionKustoHandler, a customized java.util.logging.Handler that will stream the logs into kusto table. The picture below shows an example.
image

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes are added to the CHANGELOG.md
  • I have added all required tests (Unit tests, E2E tests)

Additional information

Additional PR information

import java.util.logging.LogRecord;

class FunctionKustoHandler extends Handler {
private static final String FUNCTIONSKUSTOPREFIX = "LanguageWorkerConsoleLog";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core logging abstractions can be in durabletask-client but anything specific to the either Kusto or Functions should instead go into the durabletask-azure-functions package. This is very important because durabletask-client will also be used outside of Azure by Dapr OSS customers, and we don't want to add any Azure-specific logic or dependencies for those users.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

@kaibocai kaibocai marked this pull request as draft October 13, 2023 13:03
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.

2 participants