Skip to content

Commit bedba66

Browse files
authored
fix: loyalty point span tracking (#513)
1 parent 45d9fb6 commit bedba66

File tree

19 files changed

+26930
-2636
lines changed

19 files changed

+26930
-2636
lines changed

src/activity-service/Makefile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: dev lint mypy-lint complex coverage pre-commit sort deploy destroy deps unit infra-tests integration e2e coverage-tests docs lint-docs build build-terraform terraform-deploy terraform-destroy format format-fix compare-openapi openapi pr watch update-deps
1+
.PHONY: dev lint mypy-lint complex coverage sort deploy destroy deps unit infra-tests integration e2e coverage-tests docs lint-docs build build-terraform terraform-deploy terraform-destroy format format-fix compare-openapi openapi pr watch update-deps
22
PYTHON := ".venv/bin/python3"
33
.ONESHELL: # run all commands in a single shell, ensuring it runs within a local virtual env
44

@@ -8,8 +8,7 @@ LATEST_OPENAPI := openapi_latest.json
88

99

1010
dev:
11-
pip install --upgrade pip pre-commit poetry
12-
pre-commit install
11+
pip install --upgrade pip poetry
1312
poetry config --local virtualenvs.in-project true
1413
poetry install --no-root
1514
poetry self add poetry-plugin-export
@@ -31,9 +30,6 @@ complex:
3130
@echo "Running xenon"
3231
poetry run xenon --max-absolute B --max-modules A --max-average A -e 'tests/*,.venv/*,cdk.out/*,node_modules/*' .
3332

34-
pre-commit:
35-
poetry run pre-commit run -a --show-diff-on-failure
36-
3733
mypy-lint:
3834
poetry run mypy --pretty activity_service cdk tests
3935

@@ -57,7 +53,7 @@ build-terraform: build
5753
integration-test:
5854
poetry run pytest tests/integration --cov-config=.coveragerc --cov=activity_service --cov-report xml
5955

60-
pr: deps format pre-commit complex lint lint-docs unit deploy coverage-tests e2e openapi
56+
pr: deps format complex lint lint-docs unit deploy coverage-tests e2e openapi
6157

6258
coverage-tests:
6359
poetry run pytest tests/unit tests/integration --cov-config=.coveragerc --cov=activity_service --cov-report xml
@@ -79,7 +75,6 @@ watch:
7975

8076
update-deps:
8177
poetry update
82-
pre-commit autoupdate
8378
npm i --package-lock-only
8479

8580
sam: build

src/loyalty-point-service/lib/loyalty-api/loyaltyAcl.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class LoyaltyACL extends Construct {
5656
TABLE_NAME: props.loyaltyTable.tableName,
5757
DD_TRACE_DYNAMODB_TABLE_PRIMARY_KEYS: `{"${props.loyaltyTable.tableName}": ["PK"]}`,
5858
DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT: "none",
59-
DD_TRACE_PROPAGATION_STYLE_EXTRACT: "false",
59+
// DD_TRACE_PROPAGATION_STYLE_EXTRACT: "false",
6060
},
6161
buildDef:
6262
"./src/loyalty-api/adapters/buildHandleUserCreatedFunction.js",
@@ -100,7 +100,7 @@ export class LoyaltyACL extends Construct {
100100
TABLE_NAME: props.loyaltyTable.tableName,
101101
DD_TRACE_DYNAMODB_TABLE_PRIMARY_KEYS: `{"${props.loyaltyTable.tableName}": ["PK"]}`,
102102
DD_TRACE_PROPAGATION_BEHAVIOR_EXTRACT: "none",
103-
DD_TRACE_PROPAGATION_STYLE_EXTRACT: "false",
103+
//DD_TRACE_PROPAGATION_STYLE_EXTRACT: "false",
104104
},
105105
buildDef:
106106
"./src/loyalty-api/adapters/buildHandleOrderCompletedFunction.js",
@@ -117,7 +117,7 @@ export class LoyaltyACL extends Construct {
117117
);
118118

119119
const rule = props.serviceProps.addSubscriptionRule(this, `${props.serviceProps.getSharedProps().serviceName}-OrderCompleted`, {
120-
detailType: ["orders.orderCompleted.v1"],
120+
detailType: ["orders.orderCompleted.v1", "orders.orderCompleted.v2"],
121121
source: [`${props.serviceProps.getSharedProps().environment}.orders`],
122122
});
123123
rule.addTarget(new SqsQueue(this.orderCompletedEventQueue));

src/loyalty-point-service/lib/loyalty-api/loyaltyApiStack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class LoyaltyApiStack extends cdk.Stack {
3131

3232
const datadogConfiguration = new DatadogLambda(this, "Datadog", {
3333
nodeLayerVersion: 127,
34-
extensionLayerVersion: 85,
34+
extensionLayerVersion: 87,
3535
site: process.env.DD_SITE ?? "datadoghq.com",
3636
apiKeySecret: ddApiKey,
3737
service,

0 commit comments

Comments
 (0)