Skip to content

Conversation

@rbtr
Copy link
Collaborator

@rbtr rbtr commented Aug 7, 2025

backport loggerv2 to 1.6 release

* feat: add migration shim and config for v2 logger

Signed-off-by: Evan Baker <[email protected]

* add logger config to CNS config

Signed-off-by: Evan Baker <[email protected]>

* map telemetry metadata fields and compose logger

Signed-off-by: Evan Baker <[email protected]>

---------

Signed-off-by: Evan Baker <[email protected]
Signed-off-by: Evan Baker <[email protected]>
Copilot AI review requested due to automatic review settings August 7, 2025 16:58
@rbtr rbtr requested review from a team as code owners August 7, 2025 16:58
@rbtr rbtr requested a review from vakalapa August 7, 2025 16:58
@rbtr rbtr changed the title feat: cns logger v2 [2/2] (#3438) backport: feat: cns logger v2 [2/2] (#3438) Aug 7, 2025
@rbtr rbtr self-assigned this Aug 7, 2025
@rbtr rbtr added cns Related to CNS. release/1.6 Change affects 1.6 release train labels Aug 7, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a backport of CNS logger v2 to the 1.6 release, introducing a new Zap-based logging system alongside the existing v1 logger. The change enables optional migration to structured logging with support for multiple output targets including Application Insights, file, stdout, and ETW.

  • Adds a complete v2 logger package built on Zap with support for multiple output cores
  • Implements a shim layer to maintain backward compatibility with the existing v1 logger interface
  • Integrates the new logger into CNS main service with conditional enablement via configuration

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
cns/service/main.go Integrates v2 logger initialization and conditionally replaces global logger
cns/logger/v2/*.go New v2 logger implementation with Zap core, configuration, and platform-specific support
cns/logger/log.go Adds deprecation warnings and interface abstraction for logger compatibility
cns/logger/cnslogger.go Refactors v1 logger to implement new interface for backward compatibility
cns/configuration/configuration.go Adds EnableLoggerV2 flag and v2 logger configuration to CNS config
aitelemetry/telemetrywrapper*.go Centralizes metadata file path configuration across platforms

@rbtr
Copy link
Collaborator Author

rbtr commented Aug 8, 2025

/azp run Azure Container Networking PR

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rbtr rbtr enabled auto-merge August 8, 2025 18:16
@rbtr rbtr disabled auto-merge August 8, 2025 22:00
@rbtr rbtr added this pull request to the merge queue Aug 8, 2025
Merged via the queue into release/v1.6 with commit f9ce354 Aug 9, 2025
10 of 15 checks passed
@rbtr rbtr deleted the backport-logger-v2 branch August 9, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cns Related to CNS. release/1.6 Change affects 1.6 release train

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants