I see tones of <unlabeled event> on Sentry dashboard beside other events
See original GitHub issueEnvironment
How do you use Sentry?
I was using the default initialisation pattern, but sometimes I was getting tones of <unlabeled event>
events on the dashboard, slowly I started to filter errors before sending, but no result and I continued to keep adding ways to filter it and I reached stupid logic level 😃)).
THIS LOGIC IS DISGUSTING I KNOW BUT I HAVE NO OTHER WAYS TO TRY AND FILTER IT.
but still, it doesn’t work, I saw some closed issues about that but it seems like it isn’t fixed fully.
import * as Sentry from '@sentry/react-native';
Sentry.init({
environment: '***',
dsn: '***',
tracesSampleRate: 0.1,
attachStacktrace: true,
attachThreads: true,
enableAutoPerformanceTracking: true,
enableAutoSessionTracking: true,
enableOutOfMemoryTracking: true,
enableNative: true,
integrations: [
new Sentry.ReactNativeTracing({
tracingOrigins: [
'https://somedomain.com/v1/',
],
}),
],
beforeSend(event, hint) {
console.log(event.exception?.values, hint, 'event, hintevent, hint');
const data = JSON.stringify(event);
if (
data.includes('unlabeled') ||
data.includes("''") ||
data.includes(`""`) ||
data.includes(`invalid_attribute`) ||
event.level === Sentry.Severity.Warning ||
event.level === Sentry.Severity.Debug ||
event.level === Sentry.Severity.Log ||
event.message === '<unlabeled event>' ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
event.title === '<unlabeled event>' ||
(hint?.originalException as Error)?.message === '<unlabeled event>'
) {
return null;
}
return event;
},
tracesSampler: (samplingContext) => {
const data = JSON.stringify(samplingContext);
if (
samplingContext.transactionContext.name.includes('unlabeled') ||
data.includes('unlabeled')
) {
return 0;
} else {
return 0.05;
}
},
});
// Sentry.nativeCrash();
Which SDK and version?
"react-native": "0.66.3",
"@sentry/react-native": "^3.4.0"
Steps to Reproduce
just initialize and run app
Expected Result
it shouldn’t throw this error
Actual Result
What actually happened. Maybe a screenshot/recording? Maybe some logs?
I see this error on all environment and I have no clue where it is coming from, I see tones of it really( I have almost 1 million of <unlabeled event>
events). worse part is that when I’m opening it there are only breadcrumbs and no error object or message or anything, not even the JSON object that I’m opening.
I will add JSON object here too(but will remove some app identifiers with this: ***):
{"event_id":"05ac5cdb3a074374a983b5c545ced088","project":"***","release":"***","dist":"119","platform":"javascript","message":"","datetime":"2022-04-14T13:53:44.347000Z","tags":[["app.device","***"],["device","iPhone14,3"],["device.family","iOS"],["environment","production"],["event.environment","javascript"],["event.origin","javascript"],["level","error"],["os","iOS 15.4.1"],["os.name","iOS"],["os.rooted","no"],["dist","119"],["release","***"],["user","***"]],"0":null,"1":null,"2":null,"3":null,"4":null,"5":null,"6":null,"_meta":{"0":{"":{"err":["invalid_attribute"]}},"1":{"":{"err":["invalid_attribute"]}},"2":{"":{"err":["invalid_attribute"]}},"3":{"":{"err":["invalid_attribute"]}},"4":{"":{"err":["invalid_attribute"]}},"5":{"":{"err":["invalid_attribute"]}},"6":{"":{"err":["invalid_attribute"]}}},"_metrics":{"bytes.ingested.event":1570,"bytes.stored.event":3055},"contexts":{"app":{"app_start_time":"2022-04-14T13:53:44Z","device_app_hash":"***","build_type":"app store","app_identifier":"***","app_name":"***","app_version":"1.0.119","app_build":"119","app_id":"***","type":"app"},"device":{"family":"iOS","model":"iPhone14,3","model_id":"D64AP","memory_size":5899616256,"free_memory":493092864,"usable_memory":5209767936,"storage_size":127877271552,"boot_time":"2022-04-14T06:56:07Z","timezone":"EDT","locale":"en_US","type":"device"},"os":{"name":"iOS","version":"15.4.1","build":"19E258","kernel_version":"Darwin Kernel Version 21.4.0: Mon Feb 21 21:27:57 PST 2022; root:xnu-8020.102.3~1/RELEASE_ARM64_T8110","rooted":false,"type":"os"}},"culprit":"","environment":"production","errors":[{"type":"invalid_attribute","name":"0"},{"type":"invalid_attribute","name":"1"},{"type":"invalid_attribute","name":"2"},{"type":"invalid_attribute","name":"3"},{"type":"invalid_attribute","name":"4"},{"type":"invalid_attribute","name":"5"},{"type":"invalid_attribute","name":"6"}],"fingerprint":["{{ default }}"],"grouping_config":{"enhancements":"***","id":"newstyle:2019-10-29"},"hashes":["***"],"ingest_path":[{"version":"22.3.0","public_key":"***"}],"key_id":"1593257","level":"error","logger":"","metadata":{"title":"<unlabeled event>"},"nodestore_insert":1649944427.395477,"received":1649944424.641738,"sdk":{"name":"sentry.javascript.react-native","version":"3.2.13","integrations":["ReactNativeErrorHandlers","Release","InboundFilters","FunctionToString","Breadcrumbs","LinkedErrors","Dedupe","UserAgent","EventOrigin","SdkInfo","RewriteFrames","DeviceContext","ReactNativeTracing"],"packages":[{"name":"sentry.cocoa","version":"7.9.0"},{"name":"npm:@sentry/react-native","version":"3.2.13"}]},"timestamp":1649944424.347,"title":"<unlabeled event>","type":"default","user":{"ip_address":"***","geo":{"country_code":"***","city":"***","region":"***"}},"version":"7","location":null}
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@marandaneto will comment on all of the use cases and will test them. now I will close it maybe testing will take some time and if anything I will reopen it
Thank you!
this is one of the issue link: https://sentry.io/organizations/gerald-technologies-inc/issues/2555192257/?project=5727798&query=&statsPeriod=14d