Skip to content

Commit

Permalink
Merge pull request #2052 from newrelic/fix/kinesis-npe
Browse files Browse the repository at this point in the history
Fix an issue where the Kinesis instrumentation is generating ERROR logs due to a NullPointerException
  • Loading branch information
obenkenobi authored Sep 19, 2024
2 parents 857433f + bbb433f commit b3669bc
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,12 @@ private void recordMessageBrokerMetrics(MessageConsumeParameters messageConsumeP
}

private void recordFaasAttributes(CloudParameters cloudParameters) {
setAgentAttribute(AttributeNames.CLOUD_PLATFORM, cloudParameters.getPlatform());
setAgentAttribute(AttributeNames.CLOUD_RESOURCE_ID, cloudParameters.getResourceId());
if (cloudParameters.getPlatform() != null) {
setAgentAttribute(AttributeNames.CLOUD_PLATFORM, cloudParameters.getPlatform());
}
if (cloudParameters.getResourceId() != null) {
setAgentAttribute(AttributeNames.CLOUD_RESOURCE_ID, cloudParameters.getResourceId());
}
}

private <T> void recordSlowQueryData(SlowQueryDatastoreParameters<T> slowQueryDatastoreParameters) {
Expand Down

0 comments on commit b3669bc

Please sign in to comment.