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

Function dsnToString

packages/core/src/utils/dsn.ts:25–31  ·  view source on GitHub ↗
(dsn: DsnComponents, withPassword: boolean = false)

Source from the content-addressed store, hash-verified

23 * @param withPassword When set to true, the password will be included.
24 */
25export function dsnToString(dsn: DsnComponents, withPassword: boolean = false): string {
26 const { host, path, pass, port, projectId, protocol, publicKey } = dsn;
27 return (
28 `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +
29 `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`
30 );
31}
32
33/**
34 * Parses a Dsn from a given string.

Callers 15

client.test.tsFile · 0.90
dsn.test.tsFile · 0.90
createSessionEnvelopeFunction · 0.90
createSpanEnvelopeFunction · 0.90
_flushOutcomesFunction · 0.90
getReportDialogEndpointFunction · 0.90
createCheckInEnvelopeFunction · 0.90
createLogEnvelopeFunction · 0.90
createMetricEnvelopeFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected