Sha256: df219de0784b4ce09e28d4e5a5a562f8bfcd6679b7c12b7823737b8b37823d98
Contents?: true
Size: 811 Bytes
Versions: 5
Compression:
Stored size: 811 Bytes
Contents
# This file is distributed under New Relic's license terms. # See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details. # frozen_string_literal: true module NewRelic::Agent::Instrumentation module LogStasher INSTRUMENTATION_NAME = NewRelic::Agent.base_name(name) def self.enabled? NewRelic::Agent.config[:'instrumentation.logstasher'] != 'disabled' end def build_logstash_event_with_new_relic(*args) logstasher_event = yield log = logstasher_event.instance_variable_get(:@data) ::NewRelic::Agent.record_instrumentation_invocation(INSTRUMENTATION_NAME) ::NewRelic::Agent.agent.log_event_aggregator.record_logstasher_event(log) ::NewRelic::Agent::LocalLogDecorator.decorate(log) logstasher_event end end end
Version data entries
5 entries across 5 versions & 1 rubygems