Skip to content

Commit 1e5dc9a

Browse files
authored
Merge pull request #3407 from 1c-syntax/feature/use-server-version-as-release-name
Использование serverInfo.version как release name в Sentry
2 parents b0a3fe0 + b584c6d commit 1e5dc9a

File tree

5 files changed

+8
-1
lines changed

5 files changed

+8
-1
lines changed

src/main/java/com/github/_1c_syntax/bsl/languageserver/aop/sentry/SentryScopeConfigurer.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import io.sentry.IScope;
2525
import io.sentry.Sentry;
2626
import io.sentry.protocol.User;
27+
import io.sentry.spring.boot.jakarta.SentryProperties;
2728
import jakarta.annotation.PostConstruct;
2829
import lombok.RequiredArgsConstructor;
2930
import org.eclipse.lsp4j.ServerInfo;
@@ -45,6 +46,7 @@
4546
public class SentryScopeConfigurer {
4647

4748
private final ServerInfo serverInfo;
49+
private final SentryProperties sentryProperties;
4850

4951
@PostConstruct
5052
public void init() {
@@ -55,6 +57,8 @@ public void init() {
5557

5658
scope.setTag("server.version", serverInfo.getVersion());
5759
});
60+
61+
sentryProperties.setRelease(serverInfo.getVersion());
5862
}
5963

6064
}

src/main/resources/application.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ sentry.dsn=https://03ebc809fae749d297327b8140d3cad0@o745542.ingest.sentry.io/579
2121
sentry.environment=production
2222
sentry.attach-server-name=false
2323
sentry.logging.minimum-breadcrumb-level=debug
24+
sentry.use-git-commit-id-as-release=false
2425
picocli.disable.closures=true
25-

src/test/resources/application-measures.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ app.configuration.path=
2323
app.websocket.lsp-path=/lsp
2424
sentry.environment=measures
2525
sentry.logging.minimum-breadcrumb-level=debug
26+
sentry.use-git-commit-id-as-release=false

src/test/resources/application-websocket.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ app.configuration.path=
2121
app.websocket.lsp-path=/lsp
2222
sentry.environment=test
2323
sentry.logging.minimum-breadcrumb-level=debug
24+
sentry.use-git-commit-id-as-release=false

src/test/resources/application.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ app.configuration.path=
2222
app.websocket.lsp-path=/lsp
2323
sentry.environment=test
2424
sentry.logging.minimum-breadcrumb-level=debug
25+
sentry.use-git-commit-id-as-release=false

0 commit comments

Comments
 (0)