Skip to content

Commit

Permalink
Added telemetry configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrolomanto committed Jun 4, 2024
1 parent f1aabbf commit 3cec956
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion packages/web/instrumentation.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
import { registerOTel } from "@vercel/otel";

export function register() {
registerOTel({ serviceName: "vercel-datadog" });
registerOTel({
serviceName: "vercel-datadog",
instrumentationConfig: {
fetch: {
propagateContextUrls: [/^https:\/\/sqs\d+/],
dontPropagateContextUrls: [/no-propagation\=1/],
attributesFromRequestHeaders: {
"request.cmd": "X-Cmd",
},
attributesFromResponseHeaders: {
"response.server": "X-Server",
},
},
},
attributesFromHeaders: {
client: "X-Client",
},
});
}

0 comments on commit 3cec956

Please sign in to comment.