MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / createFetchAttributes

Function createFetchAttributes

packages/trigger-sdk/src/v3/retry.ts:588–612  ·  view source on GitHub ↗
(
  input: RequestInfo | URL,
  init?: RetryFetchRequestInit | undefined
)

Source from the content-addressed store, hash-verified

586};
587
588const createFetchAttributes = (
589 input: RequestInfo | URL,
590 init?: RetryFetchRequestInit | undefined
591): Attributes => {
592 const url = normalizeUrlFromInput(input);
593 const httpMethod = normalizeHttpMethod(input, init);
594
595 return {
596 [SEMATTRS_HTTP_METHOD]: httpMethod,
597 [SEMATTRS_HTTP_URL]: url.href,
598 [SEMATTRS_HTTP_HOST]: url.hostname,
599 ["server.host"]: url.hostname,
600 ["server.port"]: url.port,
601 [SEMATTRS_HTTP_SCHEME]: url.protocol.replace(":", ""),
602 ...accessoryAttributes({
603 items: [
604 {
605 text: url.hostname,
606 variant: "normal",
607 },
608 ],
609 style: "codepath",
610 }),
611 };
612};
613
614const createFetchResponseAttributes = (response: Response): Attributes => {
615 return {

Callers 2

retryFetchFunction · 0.85
doFetchRequestFunction · 0.85

Calls 4

accessoryAttributesFunction · 0.90
normalizeUrlFromInputFunction · 0.85
normalizeHttpMethodFunction · 0.85
replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…