Skip to content

Improve DX on Sentry.trace #8075

@dcramer

Description

@dcramer

Collection of concerns carrying over from Slack:

await trace(
  {
    op: "gcs.file.write-stream",
    name: "gcs.file.write-stream",
    description: newFilename,
  },
  async () => {
    const writeStream = file.createWriteStream();
    await pump(data.file, writeStream);
  }
);

It appears op is required (at least with debug=true the logs look funky), but name is actually required per the type defs. AFAICT they're the same thing, so why are they different?

Additionally we do not document the trace function, and its key to success with instrumentation. I would expect this to at least be a subset of the OTel equiv docs, and I would expect them to exist on the core instrumentation page.

Both of these issues might carry over to every SDK, I'm not sure.

Metadata

Metadata

Assignees

Labels

Package: coreIssues related to the Sentry Core SDK

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions