Conversation
🦋 Changeset detectedLatest commit: 2b6ac52 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
wrangler
commit: |
|
Failed to automatically backport this PR's changes to Wrangler v3. Please manually create a PR targeting the Depending on your changes, running Notes:
|
| headers.set("User-Agent", `wrangler/${wranglerVersion}`); | ||
| } | ||
|
|
||
| export function addTraceHeader(headers: Headers): void { |
There was a problem hiding this comment.
Maybe update the name to indicate that it might not add anything?
i.e. addTraceHeaderWhenNeeded or maybeAddTraceHeader
| if (getTraceHeader()) { | ||
| headers.set("Cf-Trace-Id", getTraceHeader() as string); | ||
| } |
There was a problem hiding this comment.
nit: avoid the cast and calling the fn twice:
| if (getTraceHeader()) { | |
| headers.set("Cf-Trace-Id", getTraceHeader() as string); | |
| } | |
| const traceHeader = getTraceHeader(); | |
| if (traceHeader) { | |
| headers.set("Cf-Trace-Id", traceHeader); | |
| } |
| /** Docker host configuration (handled separately from environment variable factory). */ | ||
| | "DOCKER_HOST"; | ||
| | "DOCKER_HOST" | ||
| | "WRANGLER_TRACE_ID"; |
There was a problem hiding this comment.
Could you make it clearer that this is not in the // ## Docker Configuration section and add a comment.
Is this wrangler specific or should rather be CLOUDFLARE_...
There was a problem hiding this comment.
Would // ## Development & Local Testing be a better section to add that to?
vicb
left a comment
There was a problem hiding this comment.
LGTM with minor comments/suggestions
Remove dummy auth from KV (https://jira.cfdata.org/browse/DEVX-2170) and add support for injecting trace headers