Skip to content

Commit

Permalink
Add CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahramadan committed Dec 17, 2024
1 parent 19c6ef1 commit e1f7fd3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## dev

- **Feature: Add instrumentation for aws-sdk-firehose**

The agent now has instrumentation for the [aws-sdk-firehose](https://rubygems.org/gems/aws-sdk-firehose) gem. [PR#2973](https://github.com/newrelic/newrelic-ruby-agent/pull/2973)

- **Bugfix: Do not attempt to decorate logs with `nil` messages**

The agent no longer attempts to add New Relic linking metadata to logs with `nil` messages. Thank you, [@arlando](https://github.com/arlando) for bringing this to our attention! [Issue#2985](https://github.com/newrelic/newrelic-ruby-agent/issues/2985) [PR#2986](https://github.com/newrelic/newrelic-ruby-agent/pull/2986)
Expand Down
2 changes: 1 addition & 1 deletion lib/new_relic/agent/configuration/default_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ def self.notify
:type => String,
:dynamic_name => true,
:allowed_from_server => false,
:description => 'Controls auto-instrumentation of the aws_sdk_firehose library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.'
:description => 'Controls auto-instrumentation of the aws-sdk-firehose library at start-up. May be one of `auto`, `prepend`, `chain`, `disabled`.'
},
:'instrumentation.aws_sdk_lambda' => {
:default => 'auto',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def instrument_method_with_new_relic(method_name, *args)
NewRelic::Agent.record_instrumentation_invocation(FIREHOSE)

params = args[0]
segment = NewRelic::Agent::Tracer.start_segment(name: segment_name(method_name, params))
segment = NewRelic::Agent::Tracer.start_segment(name: get_segment_name(method_name, params))
arn = get_arn(params) if params
segment&.add_agent_attribute('cloud.resource_id', arn) if arn

Expand All @@ -40,7 +40,7 @@ def instrument_method_with_new_relic(method_name, *args)
end
end

def segment_name(method_name, params)
def get_segment_name(method_name, params)
return "#{FIREHOSE}/#{method_name}/#{params[:delivery_stream_name]}" if params&.dig(:delivery_stream_name)

"#{FIREHOSE}/#{method_name}"
Expand Down

0 comments on commit e1f7fd3

Please sign in to comment.