( input: RequestInfo | URL, init?: RetryFetchRequestInit | undefined )
| 586 | }; |
| 587 | |
| 588 | const 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 | |
| 614 | const createFetchResponseAttributes = (response: Response): Attributes => { |
| 615 | return { |
no test coverage detected
searching dependent graphs…