go-agent icon indicating copy to clipboard operation
go-agent copied to clipboard

nrawssdk-v2: fix usage examples of nrawssdk.AppendMiddlewares

Open Meroje opened this issue 3 years ago • 5 comments

Links

Details

When testing the nrawssdk-v2 integration along with nrlambda I found out that the provided method of injecting the middleware to APIOptions does not work (no trace is seen for any aws call), what worked was to use the optFns param.

In this PR I'm only changing the documentation and example to reflect what has been working, but maybe you'd want to expand on it to add an exported function that can be used as an optFn ?

Also I could not find how to make the test fail as I'm not familiar enough with the internals.

Meroje avatar Nov 04 '22 16:11 Meroje

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 04 '22 16:11 CLAassistant

@Meroje Hi, I'm taking a look at this and was wondering what this really changes other than when nrawssdk.AppendMiddlewares(&awsConfig.APIOptions, nil) is invoked. I can see that it's passing the unit test, so I'm not worried about the functionality. I am just not sure why we are changing the usage pattern on users if the outcome is the same.

iamemilio avatar Jan 10 '23 20:01 iamemilio

I found that the previous method had no effect and I would never get any telemetry from aws sdk.

Meroje avatar Jan 10 '23 20:01 Meroje

Oh ok, that's a good reason haha. Ok, I'll verify this and see if we can land it in an upcoming release.

iamemilio avatar Jan 10 '23 20:01 iamemilio

@Meroje are you able to sign the CLA here so that we can proceed?

Ak-x avatar Jul 25 '23 17:07 Ak-x