Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function init() {
tracer.init({
service: DD_TRACER_SERVICE_NAME,
hostname: DD_TRACER_HOSTNAME,
plugins: false,
logger: { debug, error },
debug: !PRODUCTION_ENV,
})
tracer.use("express", {
// We want the root spans of MP to be labelled as just `metaphysics`
service: DD_TRACER_SERVICE_NAME,
headers: ["User-Agent", "X-User-ID"],
} as any)
tracer.use("http", {
service: `${DD_TRACER_SERVICE_NAME}.http-client`,
})
tracer.use("graphql", {
service: `${DD_TRACER_SERVICE_NAME}.graphql`,
/**
* NOTE: This means we capture _all_ variables. When/if needed, we can
* use this callback to redact sensitive variables.
*/
variables: variables => variables,
} as any)
}
tracer.init({
service: DD_TRACER_SERVICE_NAME,
hostname: DD_TRACER_HOSTNAME,
plugins: false,
logger: { debug, error },
debug: !PRODUCTION_ENV,
})
tracer.use("express", {
// We want the root spans of MP to be labelled as just `metaphysics`
service: DD_TRACER_SERVICE_NAME,
headers: ["User-Agent", "X-User-ID"],
} as any)
tracer.use("http", {
service: `${DD_TRACER_SERVICE_NAME}.http-client`,
})
tracer.use("graphql", {
service: `${DD_TRACER_SERVICE_NAME}.graphql`,
/**
* NOTE: This means we capture _all_ variables. When/if needed, we can
* use this callback to redact sensitive variables.
*/
variables: variables => variables,
} as any)
}
export function init() {
tracer.init({
service: DD_TRACER_SERVICE_NAME,
hostname: DD_TRACER_HOSTNAME,
plugins: false,
logger: { debug, error },
debug: !PRODUCTION_ENV,
})
tracer.use("express", {
// We want the root spans of MP to be labelled as just `metaphysics`
service: DD_TRACER_SERVICE_NAME,
headers: ["User-Agent", "X-User-ID"],
} as any)
tracer.use("http", {
service: `${DD_TRACER_SERVICE_NAME}.http-client`,
})
tracer.use("graphql", {
service: `${DD_TRACER_SERVICE_NAME}.graphql`,
/**
* NOTE: This means we capture _all_ variables. When/if needed, we can
* use this callback to redact sensitive variables.
*/
variables: variables => variables,
} as any)
}