({
url,
protocol,
host,
}: {
url?: string;
protocol: string;
host?: string;
})
| 243 | } |
| 244 | |
| 245 | function getAbsoluteUrl({ |
| 246 | url, |
| 247 | protocol, |
| 248 | host, |
| 249 | }: { |
| 250 | url?: string; |
| 251 | protocol: string; |
| 252 | host?: string; |
| 253 | }): string | undefined { |
| 254 | if (url?.startsWith('http')) { |
| 255 | return url; |
| 256 | } |
| 257 | |
| 258 | if (url && host) { |
| 259 | return `${protocol}://${host}${url}`; |
| 260 | } |
| 261 | |
| 262 | return undefined; |
| 263 | } |
| 264 | |
| 265 | /** |
| 266 | * Converts incoming HTTP request or response headers to OpenTelemetry span attributes following semantic conventions. |
no outgoing calls
no test coverage detected