All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.build.cjs.utils.meta.js Maven / Gradle / Ivy

There is a newer version: 8.39.0
Show newest version
Object.defineProperty(exports, '__esModule', { value: true });

const traceData = require('./traceData.js');

/**
 * Returns a string of meta tags that represent the current trace data.
 *
 * You can use this to propagate a trace from your server-side rendered Html to the browser.
 * This function returns up to two meta tags, `sentry-trace` and `baggage`, depending on the
 * current trace data state.
 *
 * @example
 * Usage example:
 *
 * ```js
 * function renderHtml() {
 *   return `
 *     
 *       ${getTraceMetaTags()}
 *     
 *   `;
 * }
 * ```
 *
 */
function getTraceMetaTags() {
  return Object.entries(traceData.getTraceData())
    .map(([key, value]) => ``)
    .join('\n');
}

exports.getTraceMetaTags = getTraceMetaTags;
//# sourceMappingURL=meta.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy