newrelic-dotnet-agent icon indicating copy to clipboard operation
newrelic-dotnet-agent copied to clipboard

feat: Instrument Lambda invocations in AWS SDK

Open chynesNR opened this issue 1 year ago • 2 comments

Instrument calls to Lambdas and Lambda Aliases from the AWS SDK, with span attributes to allow linking the calls to the actual Lambda (specifically the ARN is what's needed). Includes unit and integration tests. We are able to test without a making a successful call to a lambda, so no live testing resources are necessary.

Note that we are deliberately not creating an External segment, as that would result in an extra entity being created.

chynesNR avatar Sep 27 '24 15:09 chynesNR

Looks like we might want to review the CodeCov report - patch coverage is a bit low...

tippmar-nr avatar Oct 16 '24 16:10 tippmar-nr

This has undergone a significant refactoring, so I'm going to reopen it as a new PR.

chynesNR avatar Nov 25 '24 22:11 chynesNR

Codecov Report

Attention: Patch coverage is 81.67939% with 24 lines in your changes missing coverage. Please review.

Project coverage is 81.42%. Comparing base (0873941) to head (f229fc1).

Files with missing lines Patch % Lines
...gent/Core/Attributes/AttributeDefinitionService.cs 9.09% 10 Missing :warning:
...nt/NewRelic/Agent/Core/Transactions/Transaction.cs 20.00% 8 Missing :warning:
....Agent.Extensions/Collections/ConcurrentHashSet.cs 0.00% 5 Missing :warning:
...ons/NewRelic.Agent.Extensions/AwsSdk/ArnBuilder.cs 98.97% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2784      +/-   ##
==========================================
- Coverage   81.42%   81.42%   -0.01%     
==========================================
  Files         465      466       +1     
  Lines       29563    29692     +129     
  Branches     3278     3305      +27     
==========================================
+ Hits        24071    24176     +105     
- Misses       4698     4721      +23     
- Partials      794      795       +1     
Flag Coverage Δ
Agent 82.34% <81.67%> (-0.01%) :arrow_down:
Profiler 73.13% <ø> (ø)

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.40% <100.00%> (+0.17%) :arrow_up:
...c/Agent/NewRelic/Agent/Core/Metrics/MetricNames.cs 92.21% <ø> (ø)
...ons/NewRelic.Agent.Extensions/AwsSdk/ArnBuilder.cs 98.97% <98.97%> (ø)
....Agent.Extensions/Collections/ConcurrentHashSet.cs 30.00% <0.00%> (-2.73%) :arrow_down:
...nt/NewRelic/Agent/Core/Transactions/Transaction.cs 79.92% <20.00%> (-0.81%) :arrow_down:
...gent/Core/Attributes/AttributeDefinitionService.cs 94.36% <9.09%> (-1.28%) :arrow_down:

codecov-commenter avatar Nov 25 '24 23:11 codecov-commenter