Skip to main content

Tracked Constructs

To measure the number of deployments of the DSF constructs and get insights about usage, we use CloudFormation descriptions. The description must contain a tracking code (AWS internal) and a tag for each construct deployed in the stack. It must respect the following format:

Description (uksb_12345abcde) (version:1.2.3) (tag:construct1,construct2)

To simplify the creation of this description, we provide a class TrackedConstruct that you must extend:

import { TrackedConstruct, TrackedConstructProps } from '../utils';

export class MyConstruct extends TrackedConstruct {

constructor(scope: Construct, id: string, props?: MyConstructProps) {

const trackedConstructProps: TrackedConstructProps = {
trackingTag: MyConstruct.name,
};

super(scope, id, trackedConstructProps);

// construct code...
}
}
note

Tracked Construct should be only use on high level constructs. As an example, we apply it to DataLakeStorage but not AnalyticsBucket.