Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

feat(profiling): add debug logs #82

Merged
merged 4 commits into from
Dec 14, 2022
Merged

feat(profiling): add debug logs #82

merged 4 commits into from
Dec 14, 2022

Conversation

JonasBa
Copy link
Member

@JonasBa JonasBa commented Dec 12, 2022

Adds debug logs to profiler so that these are easier to identify when we ask users to enable the debug flag

return Promise.resolve();
});

const transaction = Sentry.getCurrentHub().startTransaction({ name: 'profile_hub', traceId: 'boop' });
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think traceId should ever override the actual traceId here, we have this recommendation in our docs on koa

  let traceparentData;
  if (ctx.request.get("sentry-trace")) {
    traceparentData = extractTraceparentData(ctx.request.get("sentry-trace"));
  }

  const transaction = Sentry.startTransaction({
    name: `${reqMethod} ${reqUrl}`,
    op: "http.server",
    ...traceparentData,
  });

Following above, we are seeing lots of dropped profiles on koa, probably because traceId is a fairly common field and because of it being overriden to a non uuidv4 valid value, it is causing the customer us to drop all transactions and profiles on a customer.

src/hubextensions.hub.test.ts Outdated Show resolved Hide resolved
@JonasBa JonasBa merged commit cb6f8ac into main Dec 14, 2022
@JonasBa JonasBa deleted the jb/debug/validation branch December 14, 2022 15:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants