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

Kinesis instrumentation #2974

Open
wants to merge 13 commits into
base: dev
Choose a base branch
from
Open

Kinesis instrumentation #2974

wants to merge 13 commits into from

Conversation

hannahramadan
Copy link
Contributor

@hannahramadan hannahramadan commented Nov 26, 2024

Add support for aws-sdk-kinesis.

Copy link
Contributor

SimpleCov Report

Coverage Threshold
Line 93.87% 93%

@hannahramadan hannahramadan marked this pull request as ready for review December 17, 2024 20:47
hannahramadan and others added 2 commits December 17, 2024 17:13
kaylareopelle
kaylareopelle previously approved these changes Dec 18, 2024
Copy link
Contributor

@kaylareopelle kaylareopelle left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for all your hard work on this!

def get_arn(params)
return params[:stream_arn] if params&.dig(:stream_arn)

NewRelic::Agent::Aws.create_arn(KINESIS.downcase, "stream/#{params[:stream_name]}", config&.region, nr_account_id) if params&.dig(:stream_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

how come the if is checking for params&.dig(:stream_name), but method is using just params[:stream_name]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah I was using the params&.dig in part for safe navigation, but to your point this doesnt really make sense to dig and then assume the stream_name is top level. An oversight. Updating!

end

def get_segment_name(method_name, params)
return "#{KINESIS}/#{method_name}/#{params[:stream_name]}" if params&.dig(:stream_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question on the dig VS direct hash on stream_name here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated!

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.

3 participants