question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sentry.startTransaction is not a function

See original GitHub issue

Versions + Platform

  • [ 2.5.1] SDK version - @sentry/electron@v?.?.?
  • [12.0.2 ] Electron version - electron@v?.?.?
  • [ Windows] Platform - Windows/macOS/Linux

Description

The initialized Sentry object does not contain a startTransaction method, despite the documentation stating so:

Sentry.startTransaction(
  {
    // `transactionContext` - will be recorded on transaction
    name: 'Search from navbar',
    op: 'search',
    tags: {
      testGroup: 'A3',
      treatmentName: 'eager load',
    },
  },
  // `customSamplingContext` - won't be recorded
  {
    // PII
    userId: '12312012',
    // too big to send
    resultsFromLastSearch: { ... }
  },
);

I am attempting the call (not the one above, merely passing a name) in the main process.

I then attempted to use the node sdk, as I see it is wrapped by the electron sdk, but that caused issues and I believe I’d have to manage each sdk’s hub.

My end goal is to add performance instrumentation to an electron application.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9

github_iconTop GitHub Comments

1reaction
ben-polinskycommented, Jul 28, 2021

@timfish double checked on a fresh repo and all seems to be well regarding types, sorry for the inaccurate report!

0reactions
timfishcommented, Jul 28, 2021

The React SDK is just a thin wrapper around the Browser SDK. The Electron SDK is just a wrapper around the Browser/Node SDKs.

https://github.com/getsentry/sentry-electron/issues/295#issuecomment-849158452

Read more comments on GitHub >

github_iconTop Results From Across the Web

startTransaction method no longer returning transaction #4731
I am not sure what's happening so far. It seems I have another error in my log: Sentry Logger [Warn]: Extension method startTransaction...
Read more >
Sampling for Node.js - Sentry Documentation
If a sampling decision is passed to startTransaction , that decision will be used, overriding everything else. · If tracesSampler is defined, its...
Read more >
Performance Monitoring for Node.js - Sentry Documentation
By default, Sentry error events will not get trace context unless you configure the scope ... app.use(function processItems(req, res, next) { const item ......
Read more >
Class Hub - Sentry JavaScript SDKs
startTransaction. Defined in hub/src/hub.ts:379. Starts a new Transaction and returns it. This is the entry point to manual tracing instrumentation.
Read more >
sentry-testkit - npm
Sentry Testkit enables Sentry to work natively in your application while running tests. The report is not really sent but rather logged ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found