36 lines
851 B
JavaScript
36 lines
851 B
JavaScript
// Metro module 886 (f887).
|
|
import { dsnToString } from "./dsnFromString";
|
|
import { createEnvelope } from "./forEachEnvelopeItem";
|
|
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
value: "Module"
|
|
});
|
|
export function createMetricContainerEnvelopeItem(a0) {
|
|
return [{
|
|
type: "trace_metric",
|
|
item_count: a0.length,
|
|
content_type: "application/vnd.sentry.items.trace-metric+json"
|
|
}, {
|
|
items: a0
|
|
}];
|
|
}
|
|
export function createMetricEnvelope(a0, a1, a2, a3) {
|
|
const sdk = a1?.sdk;
|
|
const r5 = {};
|
|
if (sdk) {
|
|
r5.sdk = {
|
|
name: a1.sdk.name,
|
|
version: a1.sdk.version
|
|
};
|
|
}
|
|
if (a2 ? a3 : a2) {
|
|
r5.dsn = dsnToString(a3);
|
|
}
|
|
return createEnvelope(r5, [[{
|
|
type: "trace_metric",
|
|
item_count: a0.length,
|
|
content_type: "application/vnd.sentry.items.trace-metric+json"
|
|
}, {
|
|
items: a0
|
|
}]]);
|
|
}
|