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

feat: Include APM Labels in forwarded application logs. #2831

Merged
merged 9 commits into from
Nov 8, 2024

Conversation

jaffinito
Copy link
Member

@jaffinito jaffinito commented Oct 11, 2024

BEGIN_COMMIT_OVERRIDE
notice: New Relic APM language agents now allow you to opt-in to adding your custom tags (labels) to agent-forwarded logs. With custom tags on logs, platform engineers can easily filter, search, and correlate log data for faster and more efficient troubleshooting, improved performance, and optimized resource utilization. To learn more about this feature see the documentation. (#2831)

feat: New Relic APM language agents now allow you to opt-in to adding your custom tags (labels) to agent-forwarded logs. With custom tags on logs, platform engineers can easily filter, search, and correlate log data for faster and more efficient troubleshooting, improved performance, and optimized resource utilization. To learn more about this feature see the documentation. (#2831)
END_COMMIT_OVERRIDE

Description

Adds labels to in-agent forwarded logs.

  • Disabled by default
  • Labels are prefixed with "tags."
  • Labels are added to common attributes, not individual logs.
  • Allows individual labels to be excluded
  • Includes unit and integration tests

Author Checklist

  • Unit tests, Integration tests, and Unbounded tests completed
  • Performance testing completed with satisfactory results (if required)

Reviewer Checklist

  • Perform code review
  • Pull request was adequately tested (new/existing tests, performance tests)

@jaffinito jaffinito changed the title Feature/include labels logs feat:Include APM Labels in forwarded application logs. Oct 11, 2024
@jaffinito jaffinito marked this pull request as ready for review October 23, 2024 21:25
@jaffinito jaffinito requested a review from a team as a code owner October 23, 2024 21:25
tippmar-nr
tippmar-nr previously approved these changes Oct 24, 2024
Copy link
Member

@tippmar-nr tippmar-nr left a comment

Choose a reason for hiding this comment

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

Nice work!

chynesNR
chynesNR previously approved these changes Oct 24, 2024
nrcventura
nrcventura previously approved these changes Oct 24, 2024
@tippmar-nr tippmar-nr changed the title feat:Include APM Labels in forwarded application logs. feat: Include APM Labels in forwarded application logs. Oct 24, 2024
nr-ahemsath
nr-ahemsath previously approved these changes Oct 25, 2024
Copy link
Member

@nr-ahemsath nr-ahemsath left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jaffinito
Copy link
Member Author

Note: Holding off on merging this until we get some official feature/notice text since this is a cross-agent feature.

tippmar-nr
tippmar-nr previously approved these changes Nov 8, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 97.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.43%. Comparing base (0278836) to head (8b8cb52).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...c/Agent/Core/Configuration/DefaultConfiguration.cs 93.33% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2831      +/-   ##
==========================================
+ Coverage   81.41%   81.43%   +0.01%     
==========================================
  Files         465      465              
  Lines       29535    29573      +38     
  Branches     3267     3275       +8     
==========================================
+ Hits        24047    24082      +35     
- Misses       4692     4693       +1     
- Partials      796      798       +2     
Flag Coverage Δ
Agent 82.36% <97.50%> (+0.01%) ⬆️
Profiler 73.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...elic/Agent/Core/AgentHealth/AgentHealthReporter.cs 87.22% <100.00%> (+0.02%) ⬆️
...Relic/Agent/Core/Aggregators/LogEventAggregator.cs 94.84% <100.00%> (+0.10%) ⬆️
.../Agent/Core/Configuration/ReportedConfiguration.cs 95.79% <100.00%> (+0.03%) ⬆️
...erters/LogEventWireModelCollectionJsonConverter.cs 89.58% <100.00%> (+0.94%) ⬆️
.../Agent/NewRelic/Agent/Core/Labels/LabelsService.cs 90.47% <100.00%> (+0.82%) ⬆️
...c/Agent/NewRelic/Agent/Core/Metrics/MetricNames.cs 92.21% <100.00%> (+0.05%) ⬆️
...ent/Core/WireModels/LogEventWireModelCollection.cs 100.00% <100.00%> (ø)
...c/Agent/Core/Configuration/DefaultConfiguration.cs 89.65% <93.33%> (+0.03%) ⬆️

... and 2 files with indirect coverage changes

@jaffinito jaffinito merged commit d1e29ea into main Nov 8, 2024
102 checks passed
@jaffinito jaffinito deleted the feature/include-labels-logs branch November 8, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants