Skip to content

The only tool you need to know what is happening and how to fix it.

fixes

dduxc176ce4e8b8e
diff --git a/backend/app/migrations/ch/0018_add_server_name_to_metric_records.up.sql b/backend/app/migrations/ch/0018_add_server_name_to_metric_records.up.sql
deleted file mode 100644
index f590982e..00000000
--- a/backend/app/migrations/ch/0018_add_server_name_to_metric_records.up.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE metric_records ADD COLUMN server_name String DEFAULT ''
diff --git a/backend/app/migrations/ch/0024_add_id_to_exception_stack_traces.up.sql b/backend/app/migrations/ch/0024_add_id_to_exception_stack_traces.up.sql
deleted file mode 100644
index 725e0ffe..00000000
--- a/backend/app/migrations/ch/0024_add_id_to_exception_stack_traces.up.sql
+++ /dev/null
@@ -1 +0,0 @@
-ALTER TABLE exception_stack_traces ADD COLUMN id String DEFAULT ''
diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte
index 39c38622..7650c0c7 100644
--- a/frontend/src/routes/+page.svelte
+++ b/frontend/src/routes/+page.svelte
@@ -112,7 +112,7 @@
<div class="mr-2 flex h-8 w-8 items-center justify-center rounded-md bg-chart-1/10">
<Gauge class="h-5 w-5 text-chart-1" />
</div>
- <h2 class="text-2xl font-bold tracking-tight">Transaction</h2>
+ <h2 class="text-2xl font-bold tracking-tight">Endpoints</h2>
<Tooltip.Root>
<Tooltip.Trigger class="pt-1">
<CircleQuestionMark class="h-4 w-4 text-muted-foreground/60" />
diff --git a/testing/devtesting/devtesting.go b/testing/devtesting/devtesting.go
index 438a5da1..f8c60a3f 100644
--- a/testing/devtesting/devtesting.go
+++ b/testing/devtesting/devtesting.go
@@ -1,6 +1,7 @@
package main
import (
+ "context"
"errors"
"math/rand/v2"
"os"
@@ -27,9 +28,33 @@ func testGin() {
router.Use(tracewaygin.New(
endpoint,
- traceway.WithDebug(true),
+ tracewaygin.WithDebug(true),
+ tracewaygin.WithRepanic(true),
))
+ router.GET("/test-task", func(ctx *gin.Context) {
+ go func() {
+ traceway.MeasureTask("traceway data processor", func(twctx context.Context) {
+ seg := traceway.StartSegment(twctx, "loading data")
+ time.Sleep(time.Second * time.Duration(rand.Float64()*2))
+ seg.End()
+
+ for i := range 10 {
+ traceway.CaptureMessageWithContext(ctx, "data loaded successfully "+strconv.Itoa(i))
+ }
+
+ traceway.CaptureExceptionWithContext(twctx, errors.New("what an error"))
+ })
+ }()
+ })
+ router.GET("/test-message", func(ctx *gin.Context) {
+ for i := range 10 {
+ traceway.CaptureMessageWithContext(ctx, "test message "+strconv.Itoa(i))
+ }
+
+ traceway.CaptureExceptionWithContext(ctx, errors.New("test message exception"))
+ })
+
router.GET("/test-50k", func(ctx *gin.Context) {
for i := range 50_000 {
traceway.CaptureMessage("I:" + strconv.Itoa(i))