Skip to content

Conversation

beniwohli
Copy link
Contributor

closes #1473

@beniwohli
Copy link
Contributor Author

@basepi do you have a real word setup already where we could test this in AWS?

@ghost
Copy link

ghost commented Oct 6, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-10-19T12:06:44.391+0000

  • Duration: 30 min 8 sec

Test stats 🧪

Test Results
Failed 0
Passed 5059
Skipped 3461
Total 8520

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /test linters : Run the Python linters only.

  • /test full : Run the full matrix of tests.

  • /test benchmark : Run the APM Agent Python benchmarks tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@ghost
Copy link

ghost commented Oct 6, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (68/68) 💚
Files 100.0% (229/229) 💚
Classes 100.0% (229/229) 💚
Lines 91.029% (18153/19942)
Conditionals 74.571% (2824/3787)
@basepi
Copy link
Contributor

basepi commented Oct 10, 2022

@basepi do you have a real word setup already where we could test this in AWS?

I have a working setup on the receiving end, but not on the sending end. I can probably do something later this week, couple of higher priority things at the moment.

@trentm
Copy link
Member

trentm commented Oct 11, 2022

If it helps, here is an SQS payload that we use for Node.js agent tests: https://github.com/elastic/apm-agent-nodejs/blob/main/test/lambda/fixtures/aws_sqs_test_data.json#L26-L37

It started as a real payload... to which I manually added the two conflicting Traceparent message attributes for testing.

@trentm
Copy link
Member

trentm commented Oct 11, 2022

And if it helps, here are some AWS CLI commands I used to send SQS messages:

aws sqs create-queue --queue-name trentm-play-queue1 { "QueueUrl": "https://sqs.us-west-2.amazonaws.com/627286350134/trentm-play-queue" } aws sqs send-message \ --queue-url "https://sqs.us-west-2.amazonaws.com/627286350134/trentm-play-queue" \ --message-body 'this is my body' \ --message-attributes '{ "astr": {"DataType": "String", "StringValue": "a str value"} }' aws sqs send-message \ --queue-url "https://sqs.us-west-2.amazonaws.com/627286350134/trentm-play-queue" \ --message-body 'this is my body' \ --message-attributes file://send-message.json Command: aws sqs send-message --queue-url https://sqs.us-east-1.amazonaws.com/80398EXAMPLE/MyQu eue --message-body "Information about the largest city in Any Region." --delay-seconds 10 --mess age-attributes file://send-message.json Input file (send-message.json): { "City": { "DataType": "String", "StringValue": "Any City" }, "Greeting": { "DataType": "Binary", "BinaryValue": "Hello, World!" }, "Population": { "DataType": "Number", "StringValue": "1250800" } } Output: { "MD5OfMessageBody": "51b0a325...39163aa0", "MD5OfMessageAttributes": "00484c68...59e48f06", "MessageId": "da68f62c-0c07-4bee-bf5f-7e856EXAMPLE" } 
Copy link
Contributor

@basepi basepi left a comment

Choose a reason for hiding this comment

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

Works beautifully! I see the incoming span link on my boto3 transaction to send the sqs message, and the outgoing span link on the lambda function transaction:

image

image

@beniwohli beniwohli merged commit fc7064f into elastic:main Oct 19, 2022
@beniwohli beniwohli deleted the lambda-sqs-links branch October 19, 2022 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants