Skip to content

Commit

Permalink
feat: otel tracing (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattzcarey authored Aug 14, 2023
1 parent 008e3c1 commit 80ee5b2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions services/core/resources/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env node
import { App, Aspects } from "aws-cdk-lib";
import { App, Aspects, Tags } from "aws-cdk-lib";
import { RemovalPolicyAspect } from "../aspects/RemovalPolicyAspect";

import { buildResourceName, getRegion, getStage } from "../helpers";
import { CoreStack } from "./stacks/core-stack";
import { buildResourceName, getStage, getRegion } from "../helpers";

const app = new App();
const stage = getStage();
Expand All @@ -16,3 +16,6 @@ const coreStack = new CoreStack(app, "crgpt-core", {
});

Aspects.of(coreStack).add(new RemovalPolicyAspect());

//enable OTel traces
Tags.of(app).add("baselime:tracing", `true`);
7 changes: 5 additions & 2 deletions services/web-app/sst.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Tags } from "aws-cdk-lib";
import { SSTConfig } from "sst";
import { Config, NextjsSite, Table } from "sst/constructs";

import { Config, NextjsSite, Table } from "sst/constructs";

export default {
config(_input) {
Expand Down Expand Up @@ -34,5 +34,8 @@ export default {
SiteUrl: site.url,
});
});

//enable OTel traces
Tags.of(app).add("baselime:tracing", `true`);
},
} satisfies SSTConfig;

0 comments on commit 80ee5b2

Please sign in to comment.