Skip to content

Conversation

@flown4qqqq
Copy link
Collaborator

Changelog entry

Previously, it was not possible to specify the unified agent configuration for the audit configuration. Instead, the configuration audit used the Unified Agent settings that were specified in the LogConfig section.

This was required in order to be able to separate the flows of audit and regular logging, including at the Unified Agent configuration level.

Changelog category

  • New feature

@github-actions
Copy link

github-actions bot commented Nov 10, 2025

2025-11-10 13:42:29 UTC Pre-commit check linux-x86_64-release-asan for b00c2be has started.
2025-11-10 13:42:46 UTC Artifacts will be uploaded here
2025-11-10 13:45:02 UTC ya make is running...
🟡 2025-11-10 16:21:43 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
18232 17823 0 124 258 27

🟢 2025-11-10 16:21:58 UTC Build successful.
🟢 2025-11-10 16:22:24 UTC ydbd size 3.8 GiB changed* by +5.7 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 197fc79 merge: b00c2be diff diff %
ydbd size 4 080 450 064 Bytes 4 080 455 936 Bytes +5.7 KiB +0.000%
ydbd stripped size 1 514 704 840 Bytes 1 514 707 464 Bytes +2.6 KiB +0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented Nov 10, 2025

2025-11-10 13:42:42 UTC Pre-commit check linux-x86_64-relwithdebinfo for b00c2be has started.
2025-11-10 13:42:48 UTC Artifacts will be uploaded here
2025-11-10 13:44:15 UTC ya make is running...
🟡 2025-11-10 16:04:37 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
41716 38891 0 2 2791 32

2025-11-10 16:04:58 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-11-10 16:17:22 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
60 (only retried tests) 44 0 0 0 16

🟢 2025-11-10 16:17:31 UTC Build successful.
🟢 2025-11-10 16:17:51 UTC ydbd size 2.3 GiB changed* by +8.0 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 197fc79 merge: b00c2be diff diff %
ydbd size 2 437 406 376 Bytes 2 437 414 568 Bytes +8.0 KiB +0.000%
ydbd stripped size 518 590 928 Bytes 518 596 112 Bytes +5.1 KiB +0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

🟢 2025-11-10 13:42:47 UTC The validation of the Pull Request description is successful.

@flown4qqqq flown4qqqq self-assigned this Nov 10, 2025
@flown4qqqq flown4qqqq marked this pull request as ready for review November 10, 2025 17:06
@ijon ijon self-requested a review November 11, 2025 07:13
optional EFormat Format = 1 [default = JSON];
optional string LogName = 2;
optional string LogJsonEnvelope = 3; // Json template with text field containing %message% placeholder. For example {"my_enveloped_message": "%message%"}. %message% will be replaced with real audit log message
optional TUAClientConfig UAClientConfig = 4; // If not specified, the configuration is taken from logconfig
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
optional TUAClientConfig UAClientConfig = 4; // If not specified, the configuration is taken from logconfig
optional TUAClientConfig UAClientConfig = 4; // If not specified, the configuration is taken from common TLogConfig section

Comment on lines +170 to 174
auto clusterName = appConfig.HasLogConfig() && appConfig.GetLogConfig().HasClusterName() ? appConfig.GetLogConfig().GetClusterName() : "";
const auto& dnConfig = appConfig.GetDynamicNameserviceConfig();
auto uaCounters = GetServiceCounters(counters, "utils")->GetSubgroup("subsystem", "ua_client");
auto logName = runConfig.AppConfig.GetAuditConfig().GetUnifiedAgentBackend().HasLogName()
? runConfig.AppConfig.GetAuditConfig().GetUnifiedAgentBackend().GetLogName()
: uaClientConfig.GetLogName();
auto logName = uaBackend.HasLogName() ? uaBackend.GetLogName() : uaClientConfig.GetLogName();
auto maxStaticNodeId = dnConfig.GetMaxStaticNodeId();
Copy link
Collaborator

Choose a reason for hiding this comment

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

All these variables, except logName, could be moved outside the lambda since they don't depend on the lambda's argument.

Comment on lines +186 to 190
if (uaBackend.HasUAClientConfig()) {
logBackend = createUaLogBackend(uaBackend.GetUAClientConfig());
} else if (appConfig.HasLogConfig() && appConfig.GetLogConfig().HasUAClientConfig()) {
logBackend = createUaLogBackend(appConfig.GetLogConfig().GetUAClientConfig());
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

And I would suggest moving UAClientConfig selection to a lambda and leave actual log backend creation code on a main path:

  1. try to select config
  2. drop out if there is none
  3. create log backend from the config found at 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants