Fix inconsistencies around harvest limit config settings#1737
Conversation
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts
|
4b5de40 to
160baf3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1737 +/- ##
==========================================
- Coverage 82.03% 82.00% -0.03%
==========================================
Files 215 215
Lines 26309 26324 +15
Branches 4150 4153 +3
==========================================
+ Hits 21582 21588 +6
- Misses 3312 3320 +8
- Partials 1415 1416 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d409118 to
2f269f2
Compare
Previously an error message would be logged if we tried to delete a setting that didn't exist. Instead, check if the setting exists before deleteing to avoid logging a confusing error message.
8eb355e to
1a86e9f
Compare
There was a problem hiding this comment.
There are 3 issues in this PR that were surfaced by hand testing.
- Log messages now incorrectly use the setting value instead of setting names.
The changes incorrectly assume truthiness is a valid way of comparing settings, when a literal 0 is a valid setting with a real meaning. This causes the following 2 issues.
- Precedence is being ignored where the deprecated setting can win over the new setting if the new setting is set to 0.
- Log messages detailing which settings are in use are incorrect if either is set to 0.
As part of the review, I added 2 test cases to the existing tests to validate that the value of 0 is being respected over both the default settings, and the deprecated settings. I pushed that in a new commit.
|
Another issue worth considering, we seem to have missed the setting for ml_event_data. We still use the old naming convention entirely for that setting. Would it be worth changing That would require moving a fair bit of code around to fix, so maybe it would be best for a follow up. The other problem with this is noise for customers who have it set, but this setting is incredibly rare in the wild. |
|
A note on the PR description:
The ml_event_data was never expected to be in the allowlist before, and we don't ever check the presence of it in the allowlist. Adding it there only makes it show up in the UI under the agent settings now, which is less confusing. It's still not checked to this day, as the The customer who originally reported the missing method from the allowlist was upset about their LLM data not being visible in the UI. That data does not have any relevance to the ml_event_data settings, as that's exclusively used for SKLearn instrumentation and ML happening on host. (That customer's data was also being reported in the first place as we found the historical data. They were having an issue with the UI tab not appearing which was later fixed without our intervention.) |
Co-authored-by: Timothy Pansino <11214426+TimPansino@users.noreply.github.com>
…ewrelic-python-agent into fix-serverside-ml-event-order
TimPansino
left a comment
There was a problem hiding this comment.
Approving, with the note that the ml_event_data setting name is out of sync with the others but that's out of scope for this PR. We'll likely want to change that in a future major version.

Overview