File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
sentry/src/main/scala/com/avast/sst/sentry Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,20 @@ object SentryModule {
26
26
}
27
27
28
28
/** Makes [[io.sentry.SentryClient ]] initialized with the given config and overrides the `release` property
29
- * with `Implementation-Version` from the `MANIFEST.MF` file inside the same JAR (package) as the `Main` class.
29
+ * with `Implementation-Title`@`Implementation-Version` from the `MANIFEST.MF` file inside the same JAR (package) as the `Main` class.
30
+ *
31
+ * This format is recommended by Sentry ([[https://docs.sentry.io/workflow/releases ]])
32
+ * because releases are global and must be differentiated.
30
33
*/
31
34
def makeWithReleaseFromPackage [F [_]: Sync , Main : ClassTag ](config : SentryConfig ): Resource [F , SentryClient ] = {
32
35
for {
33
36
customizedConfig <- Resource .liftF {
34
37
Sync [F ].delay {
35
38
for {
36
39
pkg <- Option (implicitly[ClassTag [Main ]].runtimeClass.getPackage)
37
- v <- Option (pkg.getImplementationVersion)
38
- } yield config.copy(release = Some (v))
40
+ title <- Option (pkg.getImplementationTitle)
41
+ version <- Option (pkg.getImplementationVersion)
42
+ } yield config.copy(release = Some (s " $title@ $version" ))
39
43
}
40
44
}
41
45
sentryClient <- make[F ](customizedConfig.getOrElse(config))
You can’t perform that action at this time.
0 commit comments