MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / getAbsoluteUrl

Function getAbsoluteUrl

packages/core/src/utils/request.ts:245–263  ·  view source on GitHub ↗
({
  url,
  protocol,
  host,
}: {
  url?: string;
  protocol: string;
  host?: string;
})

Source from the content-addressed store, hash-verified

243}
244
245function 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.

Callers 1

httpRequestToRequestDataFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected