diff --git a/packages/bundler-plugin-core/src/debug-id-upload.ts b/packages/bundler-plugin-core/src/debug-id-upload.ts index 7ff8f226..7ddff623 100644 --- a/packages/bundler-plugin-core/src/debug-id-upload.ts +++ b/packages/bundler-plugin-core/src/debug-id-upload.ts @@ -7,7 +7,6 @@ import { Logger } from "./sentry/logger"; import { promisify } from "util"; import { Hub, NodeClient } from "@sentry/node"; import SentryCli from "@sentry/cli"; -import { dynamicSamplingContextToSentryBaggageHeader } from "@sentry/utils"; import { safeFlushTelemetry } from "./sentry/telemetry"; interface RewriteSourcesHook { @@ -152,14 +151,7 @@ export function createDebugIdUploadFunction({ const cliInstance = new SentryCli(null, { ...sentryCliOptions, - headers: { - "sentry-trace": uploadSpan.toTraceparent(), - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - baggage: dynamicSamplingContextToSentryBaggageHeader( - artifactBundleUploadTransaction.getDynamicSamplingContext() - )!, - ...sentryCliOptions.headers, - }, + headers: sentryCliOptions.headers, }); await cliInstance.releases.uploadSourceMaps( diff --git a/packages/bundler-plugin-core/src/sentry/telemetry.ts b/packages/bundler-plugin-core/src/sentry/telemetry.ts index 7167bb29..1443c156 100644 --- a/packages/bundler-plugin-core/src/sentry/telemetry.ts +++ b/packages/bundler-plugin-core/src/sentry/telemetry.ts @@ -1,6 +1,7 @@ import SentryCli from "@sentry/cli"; import { defaultStackParser, Hub, makeNodeTransport, NodeClient } from "@sentry/node"; import { NormalizedOptions, SENTRY_SAAS_URL } from "../options-mapping"; +import crypto from "crypto"; const SENTRY_SAAS_HOSTNAME = "sentry.io"; @@ -99,13 +100,15 @@ export function setTelemetryDataOnHub(options: NormalizedOptions, hub: Hub, bund hub.setTag("application-key-set", options.applicationKey !== undefined); - hub.setTags({ - organization: org, - project, - bundler, - }); + hub.setTag("bundler", bundler); - hub.setUser({ id: org }); + if (org) { + hub.setTag("org-hash", crypto.createHash("md5").update(org).digest("hex")); + } + + if (project) { + hub.setTag("project-hash", crypto.createHash("md5").update(project).digest("hex")); + } } export async function allowedToSendTelemetry(options: NormalizedOptions): Promise {