Skip to content

Commit 7d8dcd1

Browse files
committed
improve
1 parent eb3db76 commit 7d8dcd1

File tree

1 file changed

+7
-3
lines changed
  • sentry-samples/sentry-samples-ktor/src/main/java/io/sentry/samples/ktor

1 file changed

+7
-3
lines changed

sentry-samples/sentry-samples-ktor/src/main/java/io/sentry/samples/ktor/Main.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ fun main() {
1616
options.isSendDefaultPii = true
1717
options.tracesSampleRate = 1.0
1818
options.addInAppInclude("io.sentry.samples")
19+
options.isGlobalHubMode = true
1920
}
2021

2122
val client =
@@ -35,9 +36,12 @@ suspend fun makeRequests(client: HttpClient) {
3536
client.get("https://httpbin.org/get")
3637
client.get("https://httpbin.org/status/404")
3738

38-
// Should create errors
39-
client.get("https://httpbin.org/status/500")
40-
client.get("https://httpbin.org/status/500?lol=test")
39+
// Should create breadcrumbs and errors
40+
client.get("https://httpbin.org/status/500?lol=test") // no tags
41+
Sentry.setTag("lol", "test")
42+
client.get("https://httpbin.org/status/502") // lol: test
43+
Sentry.removeTag("lol")
44+
client.get("https://httpbin.org/status/503?lol=test") // no tags
4145

4246
// Should create breadcrumb
4347
client.post("https://httpbin.org/post") {

0 commit comments

Comments
 (0)