aws / aws/aws-cdk

(synthetics): add tracing

Open
#14,086 5 comments 4 reactions 0 assignees View on GitHub
@aws-cdk/aws-synthetics feature-request feature/coverage-gap p3
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

Enable active tracing (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-synthetics-canary-runconfig.html#cfn-synthetics-canary-runconfig-activetracing) for a canary.

### Use Case

End-to-end tracing from Canary to API Gateway to Lambda.

### Proposed Solution

Add a new property to `synthetics.CanaryProps`:

```
new synthetics.Canary(this, 'MyCanary', {
...,
activeTracing: true,
})
```

By default, it will be `false`. When set to true, it will also append XRay permissions to the IAM role (e.g. the managed policy `arn:aws:iam::aws:policy/AWSXrayWriteOnlyAccess`).

### Other

Similar PR: https://github.com/aws/aws-cdk/pull/11865.

* [X] :wave: I may be able to implement this feature request
* [ ] :warning: This feature might incur a breaking change

---

This is a :rocket: Feature Request

Contributor guide

Open the contributing guide

Research direction

Start at the TypeScript implementation of the synthetics.Canary construct and its CanaryProps, then inspect how the canary run configuration and IAM role are defined. Compare the activeTracing CloudFormation setting with the linked AWS documentation and ensure the X-Ray write permission is added only when enabled; done means the property defaults to false and supports end-to-end tracing.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.