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

External Services(AWS sdk go v2 ) api calls are not logged / visible when using github.com/newrelic/go-agent/v3/integrations/nrawssdk-v #796

Open
ARKKYN opened this issue Oct 12, 2023 · 3 comments
Labels

Comments

@ARKKYN
Copy link

ARKKYN commented Oct 12, 2023

Description

External Services(AWS sdk go v2 ) api calls are not logged / visible when using github.com/newrelic/go-agent/v3/integrations/nrawssdk-v2 . I tried to log external api calls to s3 and sqs but the requests are not logged or shown in. newrelic ui

Steps to Reproduce

This is the code I Tried

        txn := instrumentation.GetNewRelic().StartTransaction("S3_API")
	defer txn.End()

	cfg, err := config.LoadDefaultConfig(context.TODO())
	if err != nil {
		fmt.Println("Error loading AWS config:", err)
	}
	nrAsg.AppendMiddlewares(&cfg.APIOptions, txn)
	sqsClient = sqs.NewFromConfig(cfg)
	return sqsClient, err
@ARKKYN ARKKYN added the bug label Oct 12, 2023
@mirackara
Copy link
Contributor

That's strange. Do you see them being logged if you try running the example file here

@iamemilio
Copy link
Contributor

Hi @ARKKYN we had a PR that reported something similar, and I was wondering if you had tried this: https://github.com/newrelic/go-agent/pull/599/files

@iamemilio
Copy link
Contributor

specifically this part:

awsConfig, err := config.LoadDefaultConfig(ctx, func(awsConfig *config.LoadOptions) error {
 		// Instrument all new AWS clients with New Relic
 		nrawssdk.AppendMiddlewares(&awsConfig.APIOptions, nil)
 		return nil
 	})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants