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

Add AWS v2 DynamoDB instrumentation #343

Merged
merged 1 commit into from
Jul 14, 2021
Merged

Add AWS v2 DynamoDB instrumentation #343

merged 1 commit into from
Jul 14, 2021

Conversation

twcrone
Copy link
Contributor

@twcrone twcrone commented Jul 9, 2021

Before contributing, please read our contributing guidelines and code of conduct.

Overview

Add AWS v2 DynamoDB instrumentation to sync and async DynamoDB clients

Related Github Issue

NA

Testing

New tests added. "tag" methods not able to be tested as LocalDynamoDB for tests does not implement tags.
here,

Checks

[X] Are your contributions backwards compatible with relevant frameworks and APIs?
[ ] Does your code contain any breaking changes? Please describe.
[X] Does your code introduce any new dependencies? Please describe.

@twcrone twcrone marked this pull request as draft July 9, 2021 19:32
@twcrone
Copy link
Contributor Author

twcrone commented Jul 9, 2021

Xi Xia and I are looking at the CF work on this right now.

@CLAassistant
Copy link

CLAassistant commented Jul 12, 2021

CLA assistant check
All committers have signed the CLA.

@twcrone twcrone force-pushed the aws-v2-dynamoDB branch 2 times, most recently from da3a349 to 240e9b6 Compare July 12, 2021 21:38
@twcrone
Copy link
Contributor Author

twcrone commented Jul 13, 2021

Ok, I think it was failing because we have "passesOnly" on our version for AWS v2 SDK or higher and it can apparently work with much earlier versions (even some 2.0..-preview versions) so made it expect the instrumentation verifier to pass with 2.1.0+ to go back a bit but not 2.0.

@twcrone
Copy link
Contributor Author

twcrone commented Jul 13, 2021

Taking "draft" off PR.

@twcrone twcrone marked this pull request as ready for review July 13, 2021 13:00
Copy link
Contributor

@XiXiaPdx XiXiaPdx left a comment

Choose a reason for hiding this comment

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

LGTM...but someone else probably should take a look at this.

Also, lets run the AITs againts this branch before merging.


@Trace
public TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) {
URI endpoint = clientConfiguration != null ? clientConfiguration.option(SdkClientOption.ENDPOINT) : null;
Copy link
Contributor

Choose a reason for hiding this comment

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

This var is not being used.
Guess this is leftover from a refactor that created the getEndpoint method.

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 yes...thanks!


@Trace
public CompletableFuture<ScanResponse> scan(ScanRequest scanRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "scan", scanRequest.tableName(), getEndpoint());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I honestly don't know. @XiXiaPdx would need to help clear that up.


@Trace
public CompletableFuture<ScanResponse> scan(ScanRequest scanRequest) {
DynamoDBMetricUtil.metrics(NewRelic.getAgent().getTracedMethod(), "scan", scanRequest.tableName(), getEndpoint());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I honestly don't know. @XiXiaPdx would need to help clear that up.

@twcrone
Copy link
Contributor Author

twcrone commented Jul 14, 2021

Unit tests are failing now on "compileTestScala" after removing unused variable.

@twcrone twcrone merged commit e6ad4a9 into main Jul 14, 2021
@twcrone twcrone deleted the aws-v2-dynamoDB branch July 14, 2021 17:06
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.

4 participants