-
Notifications
You must be signed in to change notification settings - Fork 599
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
Logstasher instrumentation #2559
Conversation
if the log decorator is given a hash, merge the metadata into the hash
separate out the `return` logic and the `merge` logic to ensure that hashes always result in an early return
log decorator: support hashes
- Aggregator: check for LogStasher - Instrumentation: reurn data v log - Aggregator: don't alter original log
lib/new_relic/agent/instrumentation/logstasher/instrumentation.rb
Outdated
Show resolved
Hide resolved
lib/new_relic/agent/instrumentation/logstasher/instrumentation.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: James Bunch <fallwith@gmail.com>
|
||
if NewRelic::Agent.config[METRICS_ENABLED_KEY] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few blocks of code were shared by create_event
and create_logstasher_event
. This is an example of a block of code moved into a new method (increment_event_counters
is the name for this)
return if severity_too_low?(severity) | ||
return if formatted_message.nil? || formatted_message.empty? | ||
return unless NewRelic::Agent.config[FORWARDING_ENABLED_KEY] | ||
return if @high_security |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block of code lives in a new method, monitoring_conditions_met?
Co-authored-by: James Bunch <fallwith@gmail.com>
SimpleCov Report
|
Add support for LogStasher gem versions 1.0.0 and above.
Full CI run: https://github.com/newrelic/newrelic-ruby-agent/actions/runs/9861763118
Test Coverage: 100% new code coverage
closes #2399