fix(config_migrate): logs were disabled#1792
Merged
gsanchezgavier merged 2 commits intomainfrom Oct 24, 2025
Merged
Conversation
We use a filtering mechanism in which we disabled all logs not coming from `newrelic_agent_control` crate, which excluded `newrelic_config_migrate` the filters used make it tricky to configure logging properly for config_migrate. For example, debug log level cannot be activated, and previously the logs would be emitted depending on if the 'callsite' is inside the AC crate or not. the error handling of `config_migrate` needs to be improved in any case.
Contributor
|
Let's also check the config for on-host and k8s |
paologallinaharbur
previously approved these changes
Oct 22, 2025
| name: "everything default", | ||
| config: Default::default(), | ||
| expected: "newrelic_agent_control=info,opamp_client=info,off", | ||
| expected: "newrelic_config_migrate=info,newrelic_agent_control=info,opamp_client=info,off", |
Member
There was a problem hiding this comment.
the PR looks good but tests are still broken
thread 'instrumentation::config::logs::config::tests::test_valid_logging_filtering' panicked at agent-control\src\instrumentation\config\logs\config.rs:196:17:
assertion `left == right` failed: empty insecure fine grained does not apply
left: "newrelic_config_migrate=info,newrelic_agent_control=info,opamp_client=info,off"
right: "newrelic_agent_control=info,opamp_client=info,off"
a0b9c66 to
1cc90bd
Compare
danielorihuela
approved these changes
Oct 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
We use a filtering mechanism in which we disabled all logs not coming from
newrelic_agent_controlcrate, which excludednewrelic_config_migratethe filters used make it tricky to configure logging properly for
config_migrate. For example,debuglog level cannot be activated, and previously the logs would be emitted depending on if the 'callsite' is inside the AC crate or not.the error handling of
config_migrateneeds to be improved in any case.Which issue this PR fixes
The logs seemed unpredictable, sometimes they are seen and sometimes they're not, depending if some error was found when migrating.
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
docsis aligned with the change.CONTRIBUTING.md.log level guidelines.