sentry-java: The event in the cache dir is not sent to the sentry server when the sentry-java sdk reconnects to the sentry service
Hi , My sentry server version is 21.6.1 and my sentry-java sdk version is 5.0.1. My test code like this:
SentryOptions options = new SentryOptions();
options.setDsn(NoticeConfig.STREAMING_SENTRY_DSN);
HashMap<String, String> map = getEnterpriseCodeAndVersion();
options.setEnvironment(map.get(ARK_ENTERPRISE_CODE));
options.setRelease(map.get(ARK_VERSION));
//设置缓存相关配置
options.setCacheDirPath("/opt/soft/log/sentry_cache_arknotice");
options.setMaxCacheItems(3);
options.setFlushTimeoutMillis(10000);
options.setEnableScopeSync(true);
options.setMaxQueueSize(1);
options.setEnableShutdownHook(true);
options.isDebug();
Sentry.init(options);
Sentry.isEnabled();
When I stop the sentry server , I found some envelope file added to dir /opt/soft/log/sentry_cache_arknotice.
I expected that when I restart the sentry server, the events in the dir /opt/soft/log/sentry_cache_arknotice will be sent to the sentry server, but in fact it is not.
What`s wrong with it?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (10 by maintainers)
No, this issue isn’t about sending events periodically, but sending events on restartas it’s stated on the issue description.