Skip to content

Commit

Permalink
Use VERCEL_REGION system env var instead of reading internal header (#…
Browse files Browse the repository at this point in the history
…137)

* Use VERCEL_REGION system env var instead of reading internal header

* changeset
  • Loading branch information
smaeda-ks authored Dec 10, 2024
1 parent faeb349 commit 2f43edb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/olive-dodos-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vercel/otel": patch
---

Use VERCEL_REGION system env var instead of reading internal header
2 changes: 1 addition & 1 deletion packages/otel/src/vercel-request-context/attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function getVercelRequestContextAttributes(

"vercel.request_id": parseRequestId(context.headers["x-vercel-id"]),
"vercel.matched_path": context.headers["x-matched-path"],
"vercel.edge_region": context.headers["x-vercel-edge-region"],
"vercel.edge_region": process.env.VERCEL_REGION,

...rootAttrs,
});
Expand Down

0 comments on commit 2f43edb

Please sign in to comment.