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

ETW logging implementation in CNI #2668

Merged

Conversation

sivakami-projects
Copy link
Contributor

@sivakami-projects sivakami-projects commented Apr 2, 2024

Feat: Features 🌈 Added support for logging to ETW using zap logger.

Reason for Change:

  • Implemented logging to ETW using the zap logger to provide a unified logging experience in Azure Container Networking.
  • This feature introduces a zap writer syncer capable of writing to ETW, facilitating more efficient debugging and monitoring.

Requirements:

Notes:

  • The implementation introduces a zap core that directs logging output to ETW.
  • ETW logs are written for all windows machines.
  • This configuration allows Azure Container Networking to log simultaneously to ETW and the file system, ensuring that logs are accessible through ETW while still being persisted to files.
  • This addition is designed to be transparent to existing logging mechanisms and does not interfere with the current logging functionality.

@sivakami-projects sivakami-projects requested review from a team as code owners April 2, 2024 16:31
@sivakami-projects sivakami-projects changed the title [DRAFT] ETW logging implementation in CNI [DRAFT] [WIP] ETW logging implementation in CNI Apr 2, 2024
@sivakami-projects sivakami-projects marked this pull request as draft April 2, 2024 16:33
@sivakami-projects sivakami-projects self-assigned this Apr 2, 2024
@sivakami-projects sivakami-projects added cni Related to CNI. logging labels Apr 2, 2024
Copy link
Member

@timraymond timraymond left a comment

Choose a reason for hiding this comment

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

Looks pretty good. Just had a few thoughts.

cni/log/logger.go Outdated Show resolved Hide resolved
cni/log/logger.go Outdated Show resolved Hide resolved
zapetw/write_syncer.go Outdated Show resolved Hide resolved
zapetw/write_syncer.go Outdated Show resolved Hide resolved
@sivakami-projects sivakami-projects requested review from paulyufan2 and removed request for tamilmani1989 April 2, 2024 19:36
zapetw/write_syncer_windows.go Outdated Show resolved Hide resolved
zapetw/write_syncer_windows.go Outdated Show resolved Hide resolved
zapetw/core_windows.go Outdated Show resolved Hide resolved
zapetw/core_windows.go Outdated Show resolved Hide resolved
@paulyufan2 paulyufan2 requested a review from tamilmani1989 April 3, 2024 19:40
@sivakami-projects sivakami-projects force-pushed the CNI_ETW_Sivakami_Logger_Branch branch from 5fe906d to a408dc5 Compare April 3, 2024 20:33
Copy link
Contributor

@rbtr rbtr left a comment

Choose a reason for hiding this comment

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

some initial comments

zapetw/unsupported_linux.go Outdated Show resolved Hide resolved
zapetw/write_syncer_windows.go Outdated Show resolved Hide resolved
zapetw/core_windows.go Outdated Show resolved Hide resolved
zapetw/core_windows.go Show resolved Hide resolved
zapetw/core_windows.go Outdated Show resolved Hide resolved
zapetw/core_windows.go Show resolved Hide resolved
zapetw/write_syncer_windows.go Outdated Show resolved Hide resolved
zapetw/write_syncer_windows.go Outdated Show resolved Hide resolved
@sivakami-projects sivakami-projects marked this pull request as ready for review April 8, 2024 16:59
@sivakami-projects sivakami-projects changed the title [DRAFT] [WIP] ETW logging implementation in CNI ETW logging implementation in CNI Apr 8, 2024
@paulyufan2
Copy link
Contributor

lgtm, please get approval from Evan and TM.

paulyufan2
paulyufan2 previously approved these changes Apr 8, 2024
@paulyufan2
Copy link
Contributor

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

cni/log/logger_linux.go Outdated Show resolved Hide resolved
cni/log/logger_windows.go Outdated Show resolved Hide resolved
cni/log/logger.go Outdated Show resolved Hide resolved
rbtr
rbtr previously approved these changes Apr 11, 2024
Copy link
Contributor

@rbtr rbtr left a comment

Choose a reason for hiding this comment

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

couple nits, mostly LGTM

cni/log/logger.go Outdated Show resolved Hide resolved
cni/log/logger.go Outdated Show resolved Hide resolved
@sivakami-projects sivakami-projects force-pushed the CNI_ETW_Sivakami_Logger_Branch branch from 7f99728 to f75e2a2 Compare April 16, 2024 16:21
@sivakami-projects
Copy link
Contributor Author

/azp run Azure Container Networking PR

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@sivakami-projects sivakami-projects added this pull request to the merge queue Apr 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 16, 2024
@sivakami-projects sivakami-projects added this pull request to the merge queue Apr 17, 2024
@sivakami-projects sivakami-projects removed this pull request from the merge queue due to a manual request Apr 17, 2024
@sivakami-projects sivakami-projects added this pull request to the merge queue Apr 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 18, 2024
@sivakami-projects sivakami-projects added this pull request to the merge queue Apr 18, 2024
Merged via the queue into Azure:master with commit 1eed84e Apr 18, 2024
12 checks passed
@sivakami-projects sivakami-projects deleted the CNI_ETW_Sivakami_Logger_Branch branch April 18, 2024 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cni Related to CNI. logging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants