Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
45 lines
893 B
Text
45 lines
893 B
Text
import { dsnToString } from './utils/dsn.js';
|
|
import { createEnvelope } from './utils/envelope.js';
|
|
|
|
/**
|
|
* Create envelope from check in item.
|
|
*/
|
|
function createCheckInEnvelope(
|
|
checkIn,
|
|
dynamicSamplingContext,
|
|
metadata,
|
|
tunnel,
|
|
dsn,
|
|
) {
|
|
const headers = {
|
|
sent_at: new Date().toISOString(),
|
|
};
|
|
|
|
if (metadata?.sdk) {
|
|
headers.sdk = {
|
|
name: metadata.sdk.name,
|
|
version: metadata.sdk.version,
|
|
};
|
|
}
|
|
|
|
if (!!tunnel && !!dsn) {
|
|
headers.dsn = dsnToString(dsn);
|
|
}
|
|
|
|
if (dynamicSamplingContext) {
|
|
headers.trace = dynamicSamplingContext ;
|
|
}
|
|
|
|
const item = createCheckInEnvelopeItem(checkIn);
|
|
return createEnvelope(headers, [item]);
|
|
}
|
|
|
|
function createCheckInEnvelopeItem(checkIn) {
|
|
const checkInHeaders = {
|
|
type: 'check_in',
|
|
};
|
|
return [checkInHeaders, checkIn];
|
|
}
|
|
|
|
export { createCheckInEnvelope };
|
|
//# sourceMappingURL=checkin.js.map
|