You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's helpful to know how people are using our SDK. For example, in the past we've wondered things like:
How many nextjs SDK users are deployed to Vercel?
Do most people use us via npm or CDN? Of the ones who use us via CDN, how many use the tunneling option?
How widely-used is ? How many of those people are actually using the current version of the SDK?
and so on and so forth.
In order for this to be useful, however, we also need a) for relay to not drop the data as something it doesn't recognize, and b) for it to be queryable somewhere. This issue is meant to track both that larger meta project and specific instances where we implement various analytics.
Solution Brainstorm
Prerequisite non-SDK work
Work with the ingest and data teams to figure out
Where in the event to store the data
What changes are necessary in relay
How the data will be accessed
Make necessary non-SDK changes
relay
??? (wherever querying will happen, if changes are necessary there)
Hi @lobsterkatie . We are developing an SDK and we use sentry to log errors. When a client intergrates our product, the error in client application (not realted our sdk) are also got logged in our sentry . How to implement sentry to capture only our sdk errors ?
I know one approach is to wrap every function inside try catch block . My question is are there any other ways to accomplish this task?
This issue is about us reporting on how our SDK is being used, rather than using our SDK to monitor another SDK.
Solving the problem you're asking about requires having multiple hubs play nicely together, which turns out to be harder than you'd think! Definitely something we're thinking about but not something we've yet fully figured out and implemented. The workaround you mentioned (combined with creating your own hub) is one way to get as close to the ideal as possible. Running the SDK like normal and filtering errors in beforeSend is another.
Relevant issues can be found here. If you find one which is more specific to your situation, please feel free to post there and add your use case.
Hey @lobsterkatie . beforeSend implemenation works fine for us . But In our sentry is initialised two times .
1 ) On our client app
2) On our own sdk
While initializing second sentry instance(i.e in our own sdk) we are getting an error like
helpers.ts:120 Uncaught TypeError: t.update is not a function
at t.captureSession (baseclient.ts:189:15)
at Ft.J (hub.js:402:1)
at Ft.captureSession (hub.js:328:1)
at Ir (sdk.ts:204:7)
at sdk.ts:237:3
at t.init (sdk.ts:99:5)
at WebSDK.sentryInit (sdk.js:169:12)
at HTMLScriptElement.<anonymous> (sdk.js:76:16)
at HTMLScriptElement.sentryWrapped (helpers.ts:98:1)
I tried using namespace during initialisation of second instance , but that doesn't seem to work.
Since the problem you're talking about is different than the one this issue is meant to address, can you please either add your question to one of the existing issues I referenced above, or open a new issue? Thanks!
Activity
harishfalco commentedon Dec 6, 2022
Hi @lobsterkatie . We are developing an SDK and we use sentry to log errors. When a client intergrates our product, the error in client application (not realted our sdk) are also got logged in our sentry . How to implement sentry to capture only our sdk errors ?
I know one approach is to wrap every function inside try catch block . My question is are there any other ways to accomplish this task?
lobsterkatie commentedon Dec 7, 2022
Hi, @harishfalco.
This issue is about us reporting on how our SDK is being used, rather than using our SDK to monitor another SDK.
Solving the problem you're asking about requires having multiple hubs play nicely together, which turns out to be harder than you'd think! Definitely something we're thinking about but not something we've yet fully figured out and implemented. The workaround you mentioned (combined with creating your own hub) is one way to get as close to the ideal as possible. Running the SDK like normal and filtering errors in
beforeSendis another.Relevant issues can be found here. If you find one which is more specific to your situation, please feel free to post there and add your use case.
harishfalco commentedon Dec 12, 2022
Hey @lobsterkatie .
beforeSendimplemenation works fine for us . But In our sentry is initialised two times .1 ) On our client app
2) On our own sdk
While initializing second sentry instance(i.e in our own sdk) we are getting an error like
I tried using
namespaceduring initialisation of second instance , but that doesn't seem to work.lobsterkatie commentedon Dec 12, 2022
Hi, @harishfalco.
Since the problem you're talking about is different than the one this issue is meant to address, can you please either add your question to one of the existing issues I referenced above, or open a new issue? Thanks!
harishfalco commentedon Dec 12, 2022
Sure @lobsterkatie .
AbhiPrasad commentedon Jan 18, 2023
Closing as we are going to track work here instead - getsentry/team-webplatform-meta#11