aws-otel-test-framework icon indicating copy to clipboard operation
aws-otel-test-framework copied to clipboard

Testing if the propagator is set correctly

Open NathanielRN opened this issue 3 years ago • 0 comments

Description

In PR on AWS OTel Python https://github.com/aws-observability/aws-otel-python/pull/14 I realized that I had not set the propagator correctly for one of my apps, yet I was still able to pass the validator

-c default-otel-trace-validation.yml --endpoint http://app:8080 --metric-namespace default -t ${{ github.run_id }}-${{ github.run_number }}

command without a problem because my traces were still appearing in X-Ray.

Is it possible to add an automatic test to check if the propagator is set by looking at the headers? The sample apps may need to be updated to do a more complicated setup too.

I remember I verified this manually by setting up CloudWatch Logs to monitor SQS messages sent from a Lambda which lead me to see that

"AWSTraceHeader": "Root=1-5fdd3a92-574ad3d7c4848e12227de280;Parent=018121e92134972f;Sampled=1",

was in fact included in the traces being sent to X-Ray.

NathanielRN avatar Jun 22 '21 22:06 NathanielRN