Skip to content

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

removed testing projects for now

ddux6ab4fb5650f8
diff --git a/testing/go/chi/go.mod b/testing/go/chi/go.mod
deleted file mode 100644
index 9383cb43..00000000
--- a/testing/go/chi/go.mod
+++ /dev/null
@@ -1,21 +0,0 @@
-module testing/go/chi
-
-go 1.25.1
-
-require (
- github.com/go-chi/chi/v5 v5.2.1
- go.tracewayapp.com v0.4.1
- go.tracewayapp.com/tracewaychi v0.0.0-00010101000000-000000000000
-)
-
-require (
- github.com/google/uuid v1.6.0 // indirect
- go.tracewayapp.com/tracewayhttp v0.4.1 // indirect
- golang.org/x/sys v0.35.0 // indirect
-)
-
-replace go.tracewayapp.com => ../../../../go-client
-
-replace go.tracewayapp.com/tracewaychi => ../../../../go-client/tracewaychi
-
-replace go.tracewayapp.com/tracewayhttp => ../../../../go-client/tracewayhttp
diff --git a/testing/go/chi/go.sum b/testing/go/chi/go.sum
deleted file mode 100644
index 918295ff..00000000
--- a/testing/go/chi/go.sum
+++ /dev/null
@@ -1,6 +0,0 @@
-github.com/go-chi/chi/v5 v5.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8=
-github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
-github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
-github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
-golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
diff --git a/testing/go/chi/main.go b/testing/go/chi/main.go
deleted file mode 100644
index 5e74a256..00000000
--- a/testing/go/chi/main.go
+++ /dev/null
@@ -1,175 +0,0 @@
-package main
-
-import (
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net/http"
- "os"
- "time"
-
- traceway "go.tracewayapp.com"
- tracewaychi "go.tracewayapp.com/tracewaychi"
-
- "github.com/go-chi/chi/v5"
-)
-
-func innerFunction() error {
- return traceway.NewStackTraceErrorf("error from inner function")
-}
-
-func middleFunction() error {
- return innerFunction()
-}
-
-func outerFunction() error {
- return middleFunction()
-}
-
-func writeJSON(w http.ResponseWriter, status int, data interface{}) {
- w.Header().Set("Content-Type", "application/json")
- w.WriteHeader(status)
- json.NewEncoder(w).Encode(data)
-}
-
-func main() {
- endpoint := os.Getenv("TRACEWAY_ENDPOINT")
- if endpoint == "" {
- endpoint = "default_token_change_me@http://localhost:8082/api/report"
- }
-
- port := os.Getenv("PORT")
- if port == "" {
- port = "8080"
- }
-
- r := chi.NewRouter()
-
- r.Use(tracewaychi.New(
- endpoint,
- tracewaychi.WithDebug(true),
- tracewaychi.WithOnErrorRecording(tracewaychi.RecordingUrl|tracewaychi.RecordingQuery|tracewaychi.RecordingHeader|tracewaychi.RecordingBody),
- ))
-
- r.Get("/test-ok", func(w http.ResponseWriter, r *http.Request) {
- writeJSON(w, 200, map[string]string{"status": "ok"})
- })
-
- r.Get("/test-not-found", func(w http.ResponseWriter, r *http.Request) {
- writeJSON(w, 404, map[string]string{"status": "not-found"})
- })
-
- r.Get("/test-exception", func(w http.ResponseWriter, r *http.Request) {
- panic("test panic from /test-exception")
- })
-
- r.Get("/test-error-simple", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureExceptionWithContext(r.Context(), errors.New("simple error without stack"))
- writeJSON(w, 500, map[string]string{"error": "simple error"})
- })
-
- r.Get("/test-error-stacktrace", func(w http.ResponseWriter, r *http.Request) {
- err := traceway.NewStackTraceErrorf("error with stack trace")
- traceway.CaptureExceptionWithContext(r.Context(), err)
- writeJSON(w, 500, map[string]string{"error": "stacktrace error"})
- })
-
- r.Get("/test-error-wrapped", func(w http.ResponseWriter, r *http.Request) {
- base := errors.New("base error")
- wrapped := fmt.Errorf("layer 1: %w", base)
- wrapped2 := fmt.Errorf("layer 2: %w", wrapped)
- traceway.CaptureExceptionWithContext(r.Context(), wrapped2)
- writeJSON(w, 500, map[string]string{"error": "wrapped error"})
- })
-
- r.Get("/test-error-nested", func(w http.ResponseWriter, r *http.Request) {
- err := outerFunction()
- traceway.CaptureExceptionWithContext(r.Context(), err)
- writeJSON(w, 500, map[string]string{"error": "nested error"})
- })
-
- r.Get("/test-message", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureMessageWithContext(r.Context(), "test message from /test-message")
- writeJSON(w, 200, map[string]string{"status": "message sent"})
- })
-
- r.Get("/test-message-attributes", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureMessageAttributes("test message with attributes", map[string]string{
- "source": "test-message-attributes",
- "priority": "high",
- })
- writeJSON(w, 200, map[string]string{"status": "message with attributes sent"})
- })
-
- r.Get("/test-spans", func(w http.ResponseWriter, r *http.Request) {
- dbSpan := traceway.StartSpan(r.Context(), "db.query")
- time.Sleep(50 * time.Millisecond)
- dbSpan.End()
-
- cacheSpan := traceway.StartSpan(r.Context(), "cache.set")
- time.Sleep(20 * time.Millisecond)
- cacheSpan.End()
-
- httpSpan := traceway.StartSpan(r.Context(), "http.external_api")
- time.Sleep(100 * time.Millisecond)
- httpSpan.End()
-
- writeJSON(w, 200, map[string]string{"status": "spans captured"})
- })
-
- r.Get("/test-task", func(w http.ResponseWriter, r *http.Request) {
- go func() {
- traceway.MeasureTask("background-data-processor", func(twctx context.Context) {
- span := traceway.StartSpan(twctx, "processing")
- time.Sleep(200 * time.Millisecond)
- span.End()
- })
- }()
- writeJSON(w, 200, map[string]string{"status": "task started"})
- })
-
- r.Get("/test-metric", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureMetric("test.custom_metric", 42.0)
- writeJSON(w, 200, map[string]string{"status": "metric captured"})
- })
-
- r.Get("/test-attributes", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureExceptionWithAttributes(
- errors.New("exception with custom attributes"),
- map[string]string{
- "user_id": "usr_123",
- "request_id": "req_456",
- "env": "testing",
- },
- nil,
- )
- writeJSON(w, 200, map[string]string{"status": "exception with attributes captured"})
- })
-
- r.Post("/test-recording", func(w http.ResponseWriter, r *http.Request) {
- bodyBytes, err := io.ReadAll(r.Body)
- if err != nil {
- writeJSON(w, 400, map[string]string{"error": err.Error()})
- return
- }
- defer r.Body.Close()
-
- var body map[string]interface{}
- if err := json.Unmarshal(bodyBytes, &body); err != nil {
- writeJSON(w, 400, map[string]string{"error": err.Error()})
- return
- }
-
- action, _ := body["action"].(string)
- if action == "panic" {
- panic("panic triggered by /test-recording")
- }
-
- writeJSON(w, 200, map[string]interface{}{"status": "ok", "received": body})
- })
-
- fmt.Printf("Chi server starting on :%s\n", port)
- http.ListenAndServe(":"+port, r)
-}
diff --git a/testing/go/fasthttp/go.mod b/testing/go/fasthttp/go.mod
deleted file mode 100644
index a6c27934..00000000
--- a/testing/go/fasthttp/go.mod
+++ /dev/null
@@ -1,23 +0,0 @@
-module testing/go/fasthttp
-
-go 1.25.1
-
-require (
- github.com/fasthttp/router v1.5.4
- github.com/valyala/fasthttp v1.62.0
- go.tracewayapp.com v0.4.1
- go.tracewayapp.com/tracewayfasthttp v0.0.0-00010101000000-000000000000
-)
-
-require (
- github.com/andybalholm/brotli v1.1.1 // indirect
- github.com/google/uuid v1.6.0 // indirect
- github.com/klauspost/compress v1.18.0 // indirect
- github.com/savsgio/gotils v0.0.0-20240704082632-aef3928b8a38 // indirect
- github.com/valyala/bytebufferpool v1.0.0 // indirect
- golang.org/x/sys v0.35.0 // indirect
-)
-
-replace go.tracewayapp.com => ../../../../go-client
-
-replace go.tracewayapp.com/tracewayfasthttp => ../../../../go-client/tracewayfasthttp
diff --git a/testing/go/fasthttp/go.sum b/testing/go/fasthttp/go.sum
deleted file mode 100644
index bfa7c8ec..00000000
--- a/testing/go/fasthttp/go.sum
+++ /dev/null
@@ -1,18 +0,0 @@
-github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
-github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
-github.com/fasthttp/router v1.5.4 h1:oxdThbBwQgsDIYZ3wR1IavsNl6ZS9WdjKukeMikOnC8=
-github.com/fasthttp/router v1.5.4/go.mod h1:3/hysWq6cky7dTfzaaEPZGdptwjwx0qzTgFCKEWRjgc=
-github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
-github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
-github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
-github.com/savsgio/gotils v0.0.0-20240704082632-aef3928b8a38 h1:D0vL7YNisV2yqE55+q0lFuGse6U8lxlg7fYTctlT5Gc=
-github.com/savsgio/gotils v0.0.0-20240704082632-aef3928b8a38/go.mod h1:sM7Mt7uEoCeFSCBM+qBrqvEo+/9vdmj19wzp3yzUhmg=
-github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
-github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasthttp v1.62.0 h1:8dKRBX/y2rCzyc6903Zu1+3qN0H/d2MsxPPmVNamiH0=
-github.com/valyala/fasthttp v1.62.0/go.mod h1:FCINgr4GKdKqV8Q0xv8b+UxPV+H/O5nNFo3D+r54Htg=
-github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
-github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
-golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
-golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
diff --git a/testing/go/fasthttp/main.go b/testing/go/fasthttp/main.go
deleted file mode 100644
index 5382a48a..00000000
--- a/testing/go/fasthttp/main.go
+++ /dev/null
@@ -1,169 +0,0 @@
-package main
-
-import (
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "os"
- "time"
-
- traceway "go.tracewayapp.com"
- tracewayfasthttp "go.tracewayapp.com/tracewayfasthttp"
-
- "github.com/fasthttp/router"
- "github.com/valyala/fasthttp"
-)
-
-func innerFunction() error {
- return traceway.NewStackTraceErrorf("error from inner function")
-}
-
-func middleFunction() error {
- return innerFunction()
-}
-
-func outerFunction() error {
- return middleFunction()
-}
-
-func writeJSON(ctx *fasthttp.RequestCtx, status int, data interface{}) {
- ctx.SetContentType("application/json")
- ctx.SetStatusCode(status)
- json.NewEncoder(ctx) .Encode(data)
-}
-
-func main() {
- endpoint := os.Getenv("TRACEWAY_ENDPOINT")
- if endpoint == "" {
- endpoint = "default_token_change_me@http://localhost:8082/api/report"
- }
-
- port := os.Getenv("PORT")
- if port == "" {
- port = "8080"
- }
-
- r := router.New()
-
- r.GET("/test-ok", func(ctx *fasthttp.RequestCtx) {
- writeJSON(ctx, 200, map[string]string{"status": "ok"})
- })
-
- r.GET("/test-not-found", func(ctx *fasthttp.RequestCtx) {
- writeJSON(ctx, 404, map[string]string{"status": "not-found"})
- })
-
- r.GET("/test-exception", func(ctx *fasthttp.RequestCtx) {
- panic("test panic from /test-exception")
- })
-
- r.GET("/test-error-simple", func(ctx *fasthttp.RequestCtx) {
- traceway.CaptureException(errors.New("simple error without stack"))
- writeJSON(ctx, 500, map[string]string{"error": "simple error"})
- })
-
- r.GET("/test-error-stacktrace", func(ctx *fasthttp.RequestCtx) {
- err := traceway.NewStackTraceErrorf("error with stack trace")
- traceway.CaptureException(err)
- writeJSON(ctx, 500, map[string]string{"error": "stacktrace error"})
- })
-
- r.GET("/test-error-wrapped", func(ctx *fasthttp.RequestCtx) {
- base := errors.New("base error")
- wrapped := fmt.Errorf("layer 1: %w", base)
- wrapped2 := fmt.Errorf("layer 2: %w", wrapped)
- traceway.CaptureException(wrapped2)
- writeJSON(ctx, 500, map[string]string{"error": "wrapped error"})
- })
-
- r.GET("/test-error-nested", func(ctx *fasthttp.RequestCtx) {
- err := outerFunction()
- traceway.CaptureException(err)
- writeJSON(ctx, 500, map[string]string{"error": "nested error"})
- })
-
- r.GET("/test-message", func(ctx *fasthttp.RequestCtx) {
- traceway.CaptureMessage("test message from /test-message")
- writeJSON(ctx, 200, map[string]string{"status": "message sent"})
- })
-
- r.GET("/test-message-attributes", func(ctx *fasthttp.RequestCtx) {
- traceway.CaptureMessageAttributes("test message with attributes", map[string]string{
- "source": "test-message-attributes",
- "priority": "high",
- })
- writeJSON(ctx, 200, map[string]string{"status": "message with attributes sent"})
- })
-
- r.GET("/test-spans", func(ctx *fasthttp.RequestCtx) {
- bgCtx := context.Background()
-
- dbSpan := traceway.StartSpan(bgCtx, "db.query")
- time.Sleep(50 * time.Millisecond)
- dbSpan.End()
-
- cacheSpan := traceway.StartSpan(bgCtx, "cache.set")
- time.Sleep(20 * time.Millisecond)
- cacheSpan.End()
-
- httpSpan := traceway.StartSpan(bgCtx, "http.external_api")
- time.Sleep(100 * time.Millisecond)
- httpSpan.End()
-
- writeJSON(ctx, 200, map[string]string{"status": "spans captured"})
- })
-
- r.GET("/test-task", func(ctx *fasthttp.RequestCtx) {
- go func() {
- traceway.MeasureTask("background-data-processor", func(twctx context.Context) {
- span := traceway.StartSpan(twctx, "processing")
- time.Sleep(200 * time.Millisecond)
- span.End()
- })
- }()
- writeJSON(ctx, 200, map[string]string{"status": "task started"})
- })
-
- r.GET("/test-metric", func(ctx *fasthttp.RequestCtx) {
- traceway.CaptureMetric("test.custom_metric", 42.0)
- writeJSON(ctx, 200, map[string]string{"status": "metric captured"})
- })
-
- r.GET("/test-attributes", func(ctx *fasthttp.RequestCtx) {
- traceway.CaptureExceptionWithAttributes(
- errors.New("exception with custom attributes"),
- map[string]string{
- "user_id": "usr_123",
- "request_id": "req_456",
- "env": "testing",
- },
- nil,
- )
- writeJSON(ctx, 200, map[string]string{"status": "exception with attributes captured"})
- })
-
- r.POST("/test-recording", func(ctx *fasthttp.RequestCtx) {
- var body map[string]interface{}
- if err := json.Unmarshal(ctx.PostBody(), &body); err != nil {
- writeJSON(ctx, 400, map[string]string{"error": err.Error()})
- return
- }
-
- action, _ := body["action"].(string)
- if action == "panic" {
- panic("panic triggered by /test-recording")
- }
-
- writeJSON(ctx, 200, map[string]interface{}{"status": "ok", "received": body})
- })
-
- middleware := tracewayfasthttp.New(
- endpoint,
- tracewayfasthttp.WithDebug(true),
- tracewayfasthttp.WithOnErrorRecording(tracewayfasthttp.RecordingUrl|tracewayfasthttp.RecordingQuery|tracewayfasthttp.RecordingHeader|tracewayfasthttp.RecordingBody),
- )
-
- fmt.Printf("Fasthttp server starting on :%s\n", port)
- fasthttp.ListenAndServe(":"+port, middleware(r.Handler))
-}
diff --git a/testing/go/fiber/go.mod b/testing/go/fiber/go.mod
deleted file mode 100644
index 6f65ab3e..00000000
--- a/testing/go/fiber/go.mod
+++ /dev/null
@@ -1,27 +0,0 @@
-module testing/go/fiber
-
-go 1.25.1
-
-require (
- github.com/gofiber/fiber/v2 v2.52.6
- go.tracewayapp.com v0.4.1
- go.tracewayapp.com/tracewayfiber v0.0.0-00010101000000-000000000000
-)
-
-require (
- github.com/andybalholm/brotli v1.1.0 // indirect
- github.com/google/uuid v1.6.0 // indirect
- github.com/klauspost/compress v1.17.9 // indirect
- github.com/mattn/go-colorable v0.1.13 // indirect
- github.com/mattn/go-isatty v0.0.20 // indirect
- github.com/mattn/go-runewidth v0.0.16 // indirect
- github.com/rivo/uniseg v0.2.0 // indirect
- github.com/valyala/bytebufferpool v1.0.0 // indirect
- github.com/valyala/fasthttp v1.51.0 // indirect
- github.com/valyala/tcplisten v1.0.0 // indirect
- golang.org/x/sys v0.35.0 // indirect
-)
-
-replace go.tracewayapp.com => ../../../../go-client
-
-replace go.tracewayapp.com/tracewayfiber => ../../../../go-client/tracewayfiber
diff --git a/testing/go/fiber/go.sum b/testing/go/fiber/go.sum
deleted file mode 100644
index 5f093e1a..00000000
--- a/testing/go/fiber/go.sum
+++ /dev/null
@@ -1,27 +0,0 @@
-github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
-github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
-github.com/gofiber/fiber/v2 v2.52.6 h1:Rfp+ILPiYSvvVuIPvxrBns+HJp8qGLDnLJawAu27XVI=
-github.com/gofiber/fiber/v2 v2.52.6/go.mod h1:YEcBbO/FB+5M1IZNBP9FO3J9281zgPAreiI1oqg8nDw=
-github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
-github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
-github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
-github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
-github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
-github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
-github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
-github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
-github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
-github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
-github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
-github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
-github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
-github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA=
-github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g=
-github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
-github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
-golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
-golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
diff --git a/testing/go/fiber/main.go b/testing/go/fiber/main.go
deleted file mode 100644
index 410ec37f..00000000
--- a/testing/go/fiber/main.go
+++ /dev/null
@@ -1,166 +0,0 @@
-package main
-
-import (
- "context"
- "errors"
- "fmt"
- "os"
- "time"
-
- traceway "go.tracewayapp.com"
- tracewayfiber "go.tracewayapp.com/tracewayfiber"
-
- "github.com/gofiber/fiber/v2"
-)
-
-func innerFunction() error {
- return traceway.NewStackTraceErrorf("error from inner function")
-}
-
-func middleFunction() error {
- return innerFunction()
-}
-
-func outerFunction() error {
- return middleFunction()
-}
-
-func main() {
- endpoint := os.Getenv("TRACEWAY_ENDPOINT")
- if endpoint == "" {
- endpoint = "default_token_change_me@http://localhost:8082/api/report"
- }
-
- port := os.Getenv("PORT")
- if port == "" {
- port = "8080"
- }
-
- app := fiber.New()
-
- app.Use(tracewayfiber.New(
- endpoint,
- tracewayfiber.WithDebug(true),
- tracewayfiber.WithOnErrorRecording(tracewayfiber.RecordingUrl|tracewayfiber.RecordingQuery|tracewayfiber.RecordingHeader|tracewayfiber.RecordingBody),
- ))
-
- app.Get("/test-ok", func(c *fiber.Ctx) error {
- return c.JSON(fiber.Map{"status": "ok"})
- })
-
- app.Get("/test-not-found", func(c *fiber.Ctx) error {
- c.Status(404)
- return c.JSON(fiber.Map{"status": "not-found"})
- })
-
- app.Get("/test-exception", func(c *fiber.Ctx) error {
- panic("test panic from /test-exception")
- })
-
- app.Get("/test-error-simple", func(c *fiber.Ctx) error {
- traceway.CaptureException(errors.New("simple error without stack"))
- c.Status(500)
- return c.JSON(fiber.Map{"error": "simple error"})
- })
-
- app.Get("/test-error-stacktrace", func(c *fiber.Ctx) error {
- err := traceway.NewStackTraceErrorf("error with stack trace")
- traceway.CaptureException(err)
- c.Status(500)
- return c.JSON(fiber.Map{"error": "stacktrace error"})
- })
-
- app.Get("/test-error-wrapped", func(c *fiber.Ctx) error {
- base := errors.New("base error")
- wrapped := fmt.Errorf("layer 1: %w", base)
- wrapped2 := fmt.Errorf("layer 2: %w", wrapped)
- traceway.CaptureException(wrapped2)
- c.Status(500)
- return c.JSON(fiber.Map{"error": "wrapped error"})
- })
-
- app.Get("/test-error-nested", func(c *fiber.Ctx) error {
- err := outerFunction()
- traceway.CaptureException(err)
- c.Status(500)
- return c.JSON(fiber.Map{"error": "nested error"})
- })
-
- app.Get("/test-message", func(c *fiber.Ctx) error {
- traceway.CaptureMessage("test message from /test-message")
- return c.JSON(fiber.Map{"status": "message sent"})
- })
-
- app.Get("/test-message-attributes", func(c *fiber.Ctx) error {
- traceway.CaptureMessageAttributes("test message with attributes", map[string]string{
- "source": "test-message-attributes",
- "priority": "high",
- })
- return c.JSON(fiber.Map{"status": "message with attributes sent"})
- })
-
- app.Get("/test-spans", func(c *fiber.Ctx) error {
- ctx := context.Background()
-
- dbSpan := traceway.StartSpan(ctx, "db.query")
- time.Sleep(50 * time.Millisecond)
- dbSpan.End()
-
- cacheSpan := traceway.StartSpan(ctx, "cache.set")
- time.Sleep(20 * time.Millisecond)
- cacheSpan.End()
-
- httpSpan := traceway.StartSpan(ctx, "http.external_api")
- time.Sleep(100 * time.Millisecond)
- httpSpan.End()
-
- return c.JSON(fiber.Map{"status": "spans captured"})
- })
-
- app.Get("/test-task", func(c *fiber.Ctx) error {
- go func() {
- traceway.MeasureTask("background-data-processor", func(twctx context.Context) {
- span := traceway.StartSpan(twctx, "processing")
- time.Sleep(200 * time.Millisecond)
- span.End()
- })
- }()
- return c.JSON(fiber.Map{"status": "task started"})
- })
-
- app.Get("/test-metric", func(c *fiber.Ctx) error {
- traceway.CaptureMetric("test.custom_metric", 42.0)
- return c.JSON(fiber.Map{"status": "metric captured"})
- })
-
- app.Get("/test-attributes", func(c *fiber.Ctx) error {
- traceway.CaptureExceptionWithAttributes(
- errors.New("exception with custom attributes"),
- map[string]string{
- "user_id": "usr_123",
- "request_id": "req_456",
- "env": "testing",
- },
- nil,
- )
- return c.JSON(fiber.Map{"status": "exception with attributes captured"})
- })
-
- app.Post("/test-recording", func(c *fiber.Ctx) error {
- var body map[string]interface{}
- if err := c.BodyParser(&body); err != nil {
- c.Status(400)
- return c.JSON(fiber.Map{"error": err.Error()})
- }
-
- action, _ := body["action"].(string)
- if action == "panic" {
- panic("panic triggered by /test-recording")
- }
-
- return c.JSON(fiber.Map{"status": "ok", "received": body})
- })
-
- fmt.Printf("Fiber server starting on :%s\n", port)
- app.Listen(":" + port)
-}
diff --git a/testing/go/gin/go.mod b/testing/go/gin/go.mod
deleted file mode 100644
index 6e9148ba..00000000
--- a/testing/go/gin/go.mod
+++ /dev/null
@@ -1,48 +0,0 @@
-module testing/go/gin
-
-go 1.25.1
-
-require (
- github.com/gin-gonic/gin v1.11.0
- go.tracewayapp.com v0.4.1
- go.tracewayapp.com/tracewaygin v0.0.0-00010101000000-000000000000
-)
-
-require (
- github.com/bytedance/sonic v1.14.0 // indirect
- github.com/bytedance/sonic/loader v0.3.0 // indirect
- github.com/cloudwego/base64x v0.1.6 // indirect
- github.com/gabriel-vasile/mimetype v1.4.8 // indirect
- github.com/gin-contrib/sse v1.1.0 // indirect
- github.com/go-playground/locales v0.14.1 // indirect
- github.com/go-playground/universal-translator v0.18.1 // indirect
- github.com/go-playground/validator/v10 v10.27.0 // indirect
- github.com/goccy/go-json v0.10.2 // indirect
- github.com/goccy/go-yaml v1.18.0 // indirect
- github.com/google/uuid v1.6.0 // indirect
- github.com/json-iterator/go v1.1.12 // indirect
- github.com/klauspost/cpuid/v2 v2.3.0 // indirect
- github.com/leodido/go-urn v1.4.0 // indirect
- github.com/mattn/go-isatty v0.0.20 // indirect
- github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 // indirect
- github.com/modern-go/reflect2 v1.0.2 // indirect
- github.com/pelletier/go-toml/v2 v2.2.4 // indirect
- github.com/quic-go/qpack v0.5.1 // indirect
- github.com/quic-go/quic-go v0.54.0 // indirect
- github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
- github.com/ugorji/go/codec v1.3.0 // indirect
- go.uber.org/mock v0.5.0 // indirect
- golang.org/x/arch v0.20.0 // indirect
- golang.org/x/crypto v0.40.0 // indirect
- golang.org/x/mod v0.25.0 // indirect
- golang.org/x/net v0.42.0 // indirect
- golang.org/x/sync v0.16.0 // indirect
- golang.org/x/sys v0.35.0 // indirect
- golang.org/x/text v0.27.0 // indirect
- golang.org/x/tools v0.34.0 // indirect
- google.golang.org/protobuf v1.36.9 // indirect
-)
-
-replace go.tracewayapp.com => ../../../../go-client
-
-replace go.tracewayapp.com/tracewaygin => ../../../../go-client/tracewaygin
diff --git a/testing/go/gin/go.sum b/testing/go/gin/go.sum
deleted file mode 100644
index bf14dfab..00000000
--- a/testing/go/gin/go.sum
+++ /dev/null
@@ -1,90 +0,0 @@
-github.com/bytedance/sonic v1.14.0 h1:/OfKt8HFw0kh2rj8N0F6C/qPGRESq0BbaNZgcNXXzQQ=
-github.com/bytedance/sonic v1.14.0/go.mod h1:WoEbx8WTcFJfzCe0hbmyTGrfjt8PzNEBdxlNUO24NhA=
-github.com/bytedance/sonic/loader v0.3.0 h1:dskwH8edlzNMctoruo8FPTJDF3vLtDT0sXZwvZJyqeA=
-github.com/bytedance/sonic/loader v0.3.0/go.mod h1:N8A3vUdtUebEY2/VQC0MyhYeKUFosQU6FxH2JmUe6VI=
-github.com/cloudwego/base64x v0.1.6 h1:t11wG9AECkCDk5fMSoxmufanudBtJ+/HemLstXDLI2M=
-github.com/cloudwego/base64x v0.1.6/go.mod h1:OFcloc187FXDaYHvrNIjxSe8ncn0OOM8gEHfghB2IPU=
-github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
-github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/gabriel-vasile/mimetype v1.4.8 h1:FfZ3gj38NjllZIeJAmMhr+qKL8Wu+nOoI3GqacKw1NM=
-github.com/gabriel-vasile/mimetype v1.4.8/go.mod h1:ByKUIKGjh1ODkGM1asKUbQZOLGrPjydw3hYPU2YU9t8=
-github.com/gin-contrib/sse v1.1.0 h1:n0w2GMuUpWDVp7qSpvze6fAu9iRxJY4Hmj6AmBOU05w=
-github.com/gin-contrib/sse v1.1.0/go.mod h1:hxRZ5gVpWMT7Z0B0gSNYqqsSCNIJMjzvm6fqCz9vjwM=
-github.com/gin-gonic/gin v1.11.0 h1:OW/6PLjyusp2PPXtyxKHU0RbX6I/l28FTdDlae5ueWk=
-github.com/gin-gonic/gin v1.11.0/go.mod h1:+iq/FyxlGzII0KHiBGjuNn4UNENUlKbGlNmc+W50Dls=
-github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
-github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
-github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
-github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
-github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY=
-github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
-github.com/go-playground/validator/v10 v10.27.0 h1:w8+XrWVMhGkxOaaowyKH35gFydVHOvC0/uWoy2Fzwn4=
-github.com/go-playground/validator/v10 v10.27.0/go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo=
-github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
-github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
-github.com/goccy/go-yaml v1.18.0 h1:8W7wMFS12Pcas7KU+VVkaiCng+kG8QiFeFwzFb+rwuw=
-github.com/goccy/go-yaml v1.18.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA=
-github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
-github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
-github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
-github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
-github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
-github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
-github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
-github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
-github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
-github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
-github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
-github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
-github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
-github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
-github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
-github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
-github.com/quic-go/quic-go v0.54.0 h1:6s1YB9QotYI6Ospeiguknbp2Znb/jZYjZLRXn9kMQBg=
-github.com/quic-go/quic-go v0.54.0/go.mod h1:e68ZEaCdyviluZmy44P6Iey98v/Wfz6HCjQEm+l8zTY=
-github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
-github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
-github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
-github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
-github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
-github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
-github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
-github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
-github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
-github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA=
-github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4=
-go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=
-go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
-golang.org/x/arch v0.20.0 h1:dx1zTU0MAE98U+TQ8BLl7XsJbgze2WnNKF/8tGp/Q6c=
-golang.org/x/arch v0.20.0/go.mod h1:bdwinDaKcfZUGpH09BB7ZmOfhalA8lQdzl62l8gGWsk=
-golang.org/x/crypto v0.40.0 h1:r4x+VvoG5Fm+eJcxMaY8CQM7Lb0l1lsmjGBQ6s8BfKM=
-golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY=
-golang.org/x/mod v0.25.0 h1:n7a+ZbQKQA/Ysbyb0/6IbB1H/X41mKgbhfv7AfG/44w=
-golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww=
-golang.org/x/net v0.42.0 h1:jzkYrhi3YQWD6MLBJcsklgQsoAcw89EcZbJw8Z614hs=
-golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8=
-golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
-golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
-golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
-golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
-golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
-golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
-golang.org/x/tools v0.34.0 h1:qIpSLOxeCYGg9TrcJokLBG4KFA6d795g0xkBkiESGlo=
-golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg=
-google.golang.org/protobuf v1.36.9 h1:w2gp2mA27hUeUzj9Ex9FBjsBm40zfaDtEWow293U7Iw=
-google.golang.org/protobuf v1.36.9/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
-gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/testing/go/gin/main.go b/testing/go/gin/main.go
deleted file mode 100644
index cce28531..00000000
--- a/testing/go/gin/main.go
+++ /dev/null
@@ -1,161 +0,0 @@
-package main
-
-import (
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "net/http"
- "os"
- "time"
-
- traceway "go.tracewayapp.com"
- tracewaygin "go.tracewayapp.com/tracewaygin"
-
- "github.com/gin-gonic/gin"
-)
-
-func innerFunction() error {
- return traceway.NewStackTraceErrorf("error from inner function")
-}
-
-func middleFunction() error {
- return innerFunction()
-}
-
-func outerFunction() error {
- return middleFunction()
-}
-
-func main() {
- endpoint := os.Getenv("TRACEWAY_ENDPOINT")
- if endpoint == "" {
- endpoint = "default_token_change_me@http://localhost:8082/api/report"
- }
-
- port := os.Getenv("PORT")
- if port == "" {
- port = "8080"
- }
-
- router := gin.Default()
-
- router.Use(tracewaygin.New(
- endpoint,
- tracewaygin.WithDebug(true),
- tracewaygin.WithOnErrorRecording(tracewaygin.RecordingUrl|tracewaygin.RecordingQuery|tracewaygin.RecordingHeader|tracewaygin.RecordingBody),
- ))
-
- router.GET("/test-ok", func(c *gin.Context) {
- c.JSON(200, gin.H{"status": "ok"})
- })
-
- router.GET("/test-not-found", func(c *gin.Context) {
- c.JSON(404, gin.H{"status": "not-found"})
- })
-
- router.GET("/test-exception", func(c *gin.Context) {
- panic("test panic from /test-exception")
- })
-
- router.GET("/test-error-simple", func(c *gin.Context) {
- c.Error(errors.New("simple error without stack"))
- c.JSON(http.StatusInternalServerError, gin.H{"error": "simple error"})
- })
-
- router.GET("/test-error-stacktrace", func(c *gin.Context) {
- err := traceway.NewStackTraceErrorf("error with stack trace")
- c.Error(err)
- c.JSON(http.StatusInternalServerError, gin.H{"error": "stacktrace error"})
- })
-
- router.GET("/test-error-wrapped", func(c *gin.Context) {
- base := errors.New("base error")
- wrapped := fmt.Errorf("layer 1: %w", base)
- wrapped2 := fmt.Errorf("layer 2: %w", wrapped)
- c.Error(wrapped2)
- c.JSON(http.StatusInternalServerError, gin.H{"error": "wrapped error"})
- })
-
- router.GET("/test-error-nested", func(c *gin.Context) {
- err := outerFunction()
- c.Error(err)
- c.JSON(http.StatusInternalServerError, gin.H{"error": "nested error"})
- })
-
- router.GET("/test-message", func(c *gin.Context) {
- traceway.CaptureMessageWithContext(c, "test message from /test-message")
- c.JSON(200, gin.H{"status": "message sent"})
- })
-
- router.GET("/test-message-attributes", func(c *gin.Context) {
- traceway.CaptureMessageAttributes("test message with attributes", map[string]string{
- "source": "test-message-attributes",
- "priority": "high",
- })
- c.JSON(200, gin.H{"status": "message with attributes sent"})
- })
-
- router.GET("/test-spans", func(c *gin.Context) {
- dbSpan := traceway.StartSpan(c, "db.query")
- time.Sleep(50 * time.Millisecond)
- dbSpan.End()
-
- cacheSpan := traceway.StartSpan(c, "cache.set")
- time.Sleep(20 * time.Millisecond)
- cacheSpan.End()
-
- httpSpan := traceway.StartSpan(c, "http.external_api")
- time.Sleep(100 * time.Millisecond)
- httpSpan.End()
-
- c.JSON(200, gin.H{"status": "spans captured"})
- })
-
- router.GET("/test-task", func(c *gin.Context) {
- go func() {
- traceway.MeasureTask("background-data-processor", func(twctx context.Context) {
- span := traceway.StartSpan(twctx, "processing")
- time.Sleep(200 * time.Millisecond)
- span.End()
- })
- }()
- c.JSON(200, gin.H{"status": "task started"})
- })
-
- router.GET("/test-metric", func(c *gin.Context) {
- traceway.CaptureMetric("test.custom_metric", 42.0)
- c.JSON(200, gin.H{"status": "metric captured"})
- })
-
- router.GET("/test-attributes", func(c *gin.Context) {
- traceway.CaptureExceptionWithAttributes(
- errors.New("exception with custom attributes"),
- map[string]string{
- "user_id": "usr_123",
- "request_id": "req_456",
- "env": "testing",
- },
- nil,
- )
- c.JSON(200, gin.H{"status": "exception with attributes captured"})
- })
-
- router.POST("/test-recording", func(c *gin.Context) {
- var body map[string]interface{}
- if err := c.ShouldBindJSON(&body); err != nil {
- c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
- return
- }
-
- action, _ := body["action"].(string)
- if action == "panic" {
- panic("panic triggered by /test-recording")
- }
-
- raw, _ := json.Marshal(body)
- c.JSON(200, gin.H{"status": "ok", "received": json.RawMessage(raw)})
- })
-
- router.Run(":" + port)
-}
diff --git a/testing/go/stdlib/go.mod b/testing/go/stdlib/go.mod
deleted file mode 100644
index a4db0e89..00000000
--- a/testing/go/stdlib/go.mod
+++ /dev/null
@@ -1,17 +0,0 @@
-module testing/go/stdlib
-
-go 1.25.1
-
-require (
- go.tracewayapp.com v0.4.1
- go.tracewayapp.com/tracewayhttp v0.0.0-00010101000000-000000000000
-)
-
-require (
- github.com/google/uuid v1.6.0 // indirect
- golang.org/x/sys v0.35.0 // indirect
-)
-
-replace go.tracewayapp.com => ../../../../go-client
-
-replace go.tracewayapp.com/tracewayhttp => ../../../../go-client/tracewayhttp
diff --git a/testing/go/stdlib/go.sum b/testing/go/stdlib/go.sum
deleted file mode 100644
index 1922b07b..00000000
--- a/testing/go/stdlib/go.sum
+++ /dev/null
@@ -1,4 +0,0 @@
-github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
-github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
-golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
diff --git a/testing/go/stdlib/main.go b/testing/go/stdlib/main.go
deleted file mode 100644
index be7d7c27..00000000
--- a/testing/go/stdlib/main.go
+++ /dev/null
@@ -1,173 +0,0 @@
-package main
-
-import (
- "context"
- "encoding/json"
- "errors"
- "fmt"
- "io"
- "net/http"
- "os"
- "time"
-
- traceway "go.tracewayapp.com"
- tracewayhttp "go.tracewayapp.com/tracewayhttp"
-)
-
-func innerFunction() error {
- return traceway.NewStackTraceErrorf("error from inner function")
-}
-
-func middleFunction() error {
- return innerFunction()
-}
-
-func outerFunction() error {
- return middleFunction()
-}
-
-func writeJSON(w http.ResponseWriter, status int, data interface{}) {
- w.Header().Set("Content-Type", "application/json")
- w.WriteHeader(status)
- json.NewEncoder(w).Encode(data)
-}
-
-func main() {
- endpoint := os.Getenv("TRACEWAY_ENDPOINT")
- if endpoint == "" {
- endpoint = "default_token_change_me@http://localhost:8082/api/report"
- }
-
- port := os.Getenv("PORT")
- if port == "" {
- port = "8080"
- }
-
- mux := http.NewServeMux()
-
- mux.HandleFunc("GET /test-ok", func(w http.ResponseWriter, r *http.Request) {
- writeJSON(w, 200, map[string]string{"status": "ok"})
- })
-
- mux.HandleFunc("GET /test-not-found", func(w http.ResponseWriter, r *http.Request) {
- writeJSON(w, 404, map[string]string{"status": "not-found"})
- })
-
- mux.HandleFunc("GET /test-exception", func(w http.ResponseWriter, r *http.Request) {
- panic("test panic from /test-exception")
- })
-
- mux.HandleFunc("GET /test-error-simple", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureExceptionWithContext(r.Context(), errors.New("simple error without stack"))
- writeJSON(w, 500, map[string]string{"error": "simple error"})
- })
-
- mux.HandleFunc("GET /test-error-stacktrace", func(w http.ResponseWriter, r *http.Request) {
- err := traceway.NewStackTraceErrorf("error with stack trace")
- traceway.CaptureExceptionWithContext(r.Context(), err)
- writeJSON(w, 500, map[string]string{"error": "stacktrace error"})
- })
-
- mux.HandleFunc("GET /test-error-wrapped", func(w http.ResponseWriter, r *http.Request) {
- base := errors.New("base error")
- wrapped := fmt.Errorf("layer 1: %w", base)
- wrapped2 := fmt.Errorf("layer 2: %w", wrapped)
- traceway.CaptureExceptionWithContext(r.Context(), wrapped2)
- writeJSON(w, 500, map[string]string{"error": "wrapped error"})
- })
-
- mux.HandleFunc("GET /test-error-nested", func(w http.ResponseWriter, r *http.Request) {
- err := outerFunction()
- traceway.CaptureExceptionWithContext(r.Context(), err)
- writeJSON(w, 500, map[string]string{"error": "nested error"})
- })
-
- mux.HandleFunc("GET /test-message", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureMessageWithContext(r.Context(), "test message from /test-message")
- writeJSON(w, 200, map[string]string{"status": "message sent"})
- })
-
- mux.HandleFunc("GET /test-message-attributes", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureMessageAttributes("test message with attributes", map[string]string{
- "source": "test-message-attributes",
- "priority": "high",
- })
- writeJSON(w, 200, map[string]string{"status": "message with attributes sent"})
- })
-
- mux.HandleFunc("GET /test-spans", func(w http.ResponseWriter, r *http.Request) {
- dbSpan := traceway.StartSpan(r.Context(), "db.query")
- time.Sleep(50 * time.Millisecond)
- dbSpan.End()
-
- cacheSpan := traceway.StartSpan(r.Context(), "cache.set")
- time.Sleep(20 * time.Millisecond)
- cacheSpan.End()
-
- httpSpan := traceway.StartSpan(r.Context(), "http.external_api")
- time.Sleep(100 * time.Millisecond)
- httpSpan.End()
-
- writeJSON(w, 200, map[string]string{"status": "spans captured"})
- })
-
- mux.HandleFunc("GET /test-task", func(w http.ResponseWriter, r *http.Request) {
- go func() {
- traceway.MeasureTask("background-data-processor", func(twctx context.Context) {
- span := traceway.StartSpan(twctx, "processing")
- time.Sleep(200 * time.Millisecond)
- span.End()
- })
- }()
- writeJSON(w, 200, map[string]string{"status": "task started"})
- })
-
- mux.HandleFunc("GET /test-metric", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureMetric("test.custom_metric", 42.0)
- writeJSON(w, 200, map[string]string{"status": "metric captured"})
- })
-
- mux.HandleFunc("GET /test-attributes", func(w http.ResponseWriter, r *http.Request) {
- traceway.CaptureExceptionWithAttributes(
- errors.New("exception with custom attributes"),
- map[string]string{
- "user_id": "usr_123",
- "request_id": "req_456",
- "env": "testing",
- },
- nil,
- )
- writeJSON(w, 200, map[string]string{"status": "exception with attributes captured"})
- })
-
- mux.HandleFunc("POST /test-recording", func(w http.ResponseWriter, r *http.Request) {
- bodyBytes, err := io.ReadAll(r.Body)
- if err != nil {
- writeJSON(w, 400, map[string]string{"error": err.Error()})
- return
- }
- defer r.Body.Close()
-
- var body map[string]interface{}
- if err := json.Unmarshal(bodyBytes, &body); err != nil {
- writeJSON(w, 400, map[string]string{"error": err.Error()})
- return
- }
-
- action, _ := body["action"].(string)
- if action == "panic" {
- panic("panic triggered by /test-recording")
- }
-
- writeJSON(w, 200, map[string]interface{}{"status": "ok", "received": body})
- })
-
- middleware := tracewayhttp.New(
- endpoint,
- tracewayhttp.WithDebug(true),
- tracewayhttp.WithOnErrorRecording(tracewayhttp.RecordingUrl|tracewayhttp.RecordingQuery|tracewayhttp.RecordingHeader|tracewayhttp.RecordingBody),
- )
-
- fmt.Printf("Stdlib server starting on :%s\n", port)
- http.ListenAndServe(":"+port, middleware(mux))
-}
diff --git a/testing/js/express/package.json b/testing/js/express/package.json
deleted file mode 100644
index 2b54bee9..00000000
--- a/testing/js/express/package.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "name": "traceway-test-express",
- "version": "1.0.0",
- "private": true,
- "scripts": {
- "dev": "tsx src/index.ts"
- },
- "dependencies": {
- "@traceway/backend": "file:../../../../js-client/packages/backend",
- "@traceway/core": "file:../../../../js-client/packages/core",
- "express": "^5.1.0"
- },
- "devDependencies": {
- "@types/express": "^5.0.0",
- "tsx": "^4.19.0",
- "typescript": "^5.7.0"
- }
-}
diff --git a/testing/js/express/src/index.ts b/testing/js/express/src/index.ts
deleted file mode 100644
index 3d5596c7..00000000
--- a/testing/js/express/src/index.ts
+++ /dev/null
@@ -1,198 +0,0 @@
-import express, { Request, Response, NextFunction } from "express";
-import * as traceway from "@traceway/backend";
-
-const endpoint =
- process.env.TRACEWAY_ENDPOINT ||
- "default_token_change_me@http://localhost:8082/api/report";
-const port = process.env.PORT || "8080";
-
-traceway.init(endpoint, { debug: true });
-
-const app = express();
-app.use(express.json());
-
-function generateTraceId(): string {
- return crypto.randomUUID().replace(/-/g, "");
-}
-
-app.use((req: Request, res: Response, next: NextFunction) => {
- const traceId = generateTraceId();
- const startedAt = new Date();
- const startMs = performance.now();
- const spans: ReturnType<typeof traceway.startSpan>[] = [];
-
- (req as any).traceId = traceId;
- (req as any).startSpan = (name: string) => {
- const span = traceway.startSpan(name);
- spans.push(span);
- return span;
- };
-
- res.on("finish", () => {
- const durationMs = performance.now() - startMs;
- const endpoint = `${req.method} ${req.route?.path || req.path}`;
- const completedSpans = spans
- .filter((s) => (s as any).duration !== undefined)
- .map((s) => traceway.endSpan(s));
- const pendingSpans = spans.filter(
- (s) => (s as any).duration === undefined
- );
- for (const s of pendingSpans) {
- completedSpans.push(traceway.endSpan(s));
- }
-
- traceway.captureTrace(
- traceId,
- endpoint,
- durationMs,
- startedAt,
- res.statusCode,
- 0,
- req.ip || "",
- undefined,
- completedSpans
- );
- });
-
- next();
-});
-
-function innerFunction(): Error {
- const err = new Error("error from inner function");
- Error.captureStackTrace(err, innerFunction);
- return err;
-}
-
-function middleFunction(): Error {
- return innerFunction();
-}
-
-function outerFunction(): Error {
- return middleFunction();
-}
-
-app.get("/test-ok", (_req: Request, res: Response) => {
- res.json({ status: "ok" });
-});
-
-app.get("/test-not-found", (_req: Request, res: Response) => {
- res.status(404).json({ status: "not-found" });
-});
-
-app.get("/test-exception", () => {
- throw new Error("test panic from /test-exception");
-});
-
-app.get("/test-error-simple", (req: Request, res: Response) => {
- const err = new Error("simple error without stack");
- traceway.captureExceptionWithAttributes(err, undefined, (req as any).traceId);
- res.status(500).json({ error: "simple error" });
-});
-
-app.get("/test-error-stacktrace", (req: Request, res: Response) => {
- const err = new Error("error with stack trace");
- traceway.captureExceptionWithAttributes(err, undefined, (req as any).traceId);
- res.status(500).json({ error: "stacktrace error" });
-});
-
-app.get("/test-error-wrapped", (req: Request, res: Response) => {
- const base = new Error("base error");
- const wrapped = new Error("layer 1: " + base.message, { cause: base });
- const wrapped2 = new Error("layer 2: " + wrapped.message, {
- cause: wrapped,
- });
- traceway.captureExceptionWithAttributes(
- wrapped2,
- undefined,
- (req as any).traceId
- );
- res.status(500).json({ error: "wrapped error" });
-});
-
-app.get("/test-error-nested", (req: Request, res: Response) => {
- const err = outerFunction();
- traceway.captureExceptionWithAttributes(err, undefined, (req as any).traceId);
- res.status(500).json({ error: "nested error" });
-});
-
-app.get("/test-message", (_req: Request, res: Response) => {
- traceway.captureMessage("test message from /test-message");
- res.json({ status: "message sent" });
-});
-
-app.get("/test-message-attributes", (_req: Request, res: Response) => {
- // JS SDK captureMessage does not support attributes; capturing as message only
- traceway.captureMessage("test message with attributes");
- res.json({ status: "message with attributes sent" });
-});
-
-app.get("/test-spans", (req: Request, res: Response) => {
- const startSpan = (req as any).startSpan as (
- name: string
- ) => ReturnType<typeof traceway.startSpan>;
-
- const dbSpan = startSpan("db.query");
- setTimeout(() => {
- traceway.endSpan(dbSpan);
-
- const cacheSpan = startSpan("cache.set");
- setTimeout(() => {
- traceway.endSpan(cacheSpan);
-
- const httpSpan = startSpan("http.external_api");
- setTimeout(() => {
- traceway.endSpan(httpSpan);
- res.json({ status: "spans captured" });
- }, 100);
- }, 20);
- }, 50);
-});
-
-app.get("/test-task", (_req: Request, res: Response) => {
- traceway.measureTask("background-data-processor", async () => {
- const span = traceway.startSpan("processing");
- await new Promise((resolve) => setTimeout(resolve, 200));
- traceway.endSpan(span);
- });
- res.json({ status: "task started" });
-});
-
-app.get("/test-metric", (_req: Request, res: Response) => {
- traceway.captureMetric("test.custom_metric", 42.0);
- res.json({ status: "metric captured" });
-});
-
-app.get("/test-attributes", (_req: Request, res: Response) => {
- traceway.captureExceptionWithAttributes(
- new Error("exception with custom attributes"),
- {
- user_id: "usr_123",
- request_id: "req_456",
- env: "testing",
- }
- );
- res.json({ status: "exception with attributes captured" });
-});
-
-app.post("/test-recording", (req: Request, res: Response) => {
- const body = req.body;
-
- if (body?.action === "panic") {
- throw new Error("panic triggered by /test-recording");
- }
-
- res.json({ status: "ok", received: body });
-});
-
-app.use((err: Error, req: Request, res: Response, _next: NextFunction) => {
- traceway.captureExceptionWithAttributes(
- err,
- undefined,
- (req as any).traceId
- );
- res.status(500).json({ error: err.message });
-});
-
-app.listen(Number(port), () => {
- console.log(`Express server starting on :${port}`);
-});
diff --git a/testing/js/express/tsconfig.json b/testing/js/express/tsconfig.json
deleted file mode 100644
index 7ae8994f..00000000
--- a/testing/js/express/tsconfig.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2022",
- "module": "ESNext",
- "moduleResolution": "bundler",
- "esModuleInterop": true,
- "strict": true,
- "outDir": "dist",
- "rootDir": "src"
- },
- "include": ["src"]
-}
diff --git a/testing/js/nestjs/package.json b/testing/js/nestjs/package.json
deleted file mode 100644
index de5568fd..00000000
--- a/testing/js/nestjs/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "traceway-test-nestjs",
- "version": "1.0.0",
- "private": true,
- "scripts": {
- "dev": "tsx src/main.ts"
- },
- "dependencies": {
- "@nestjs/common": "^11.0.0",
- "@nestjs/core": "^11.0.0",
- "@nestjs/platform-express": "^11.0.0",
- "@traceway/backend": "file:../../../../js-client/packages/backend",
- "@traceway/core": "file:../../../../js-client/packages/core",
- "reflect-metadata": "^0.2.0",
- "rxjs": "^7.8.0"
- },
- "devDependencies": {
- "tsx": "^4.19.0",
- "typescript": "^5.7.0"
- }
-}
diff --git a/testing/js/nestjs/src/app.controller.ts b/testing/js/nestjs/src/app.controller.ts
deleted file mode 100644
index 331e9cdf..00000000
--- a/testing/js/nestjs/src/app.controller.ts
+++ /dev/null
@@ -1,152 +0,0 @@
-import { Controller, Get, Post, Req, Res, HttpStatus } from "@nestjs/common";
-import { Request, Response } from "express";
-import * as traceway from "@traceway/backend";
-
-function innerFunction(): Error {
- const err = new Error("error from inner function");
- Error.captureStackTrace(err, innerFunction);
- return err;
-}
-
-function middleFunction(): Error {
- return innerFunction();
-}
-
-function outerFunction(): Error {
- return middleFunction();
-}
-
-@Controller()
-export class AppController {
- @Get("test-ok")
- testOk() {
- return { status: "ok" };
- }
-
- @Get("test-not-found")
- testNotFound(@Res() res: Response) {
- res.status(404).json({ status: "not-found" });
- }
-
- @Get("test-exception")
- testException() {
- throw new Error("test panic from /test-exception");
- }
-
- @Get("test-error-simple")
- testErrorSimple(@Req() req: Request, @Res() res: Response) {
- const err = new Error("simple error without stack");
- traceway.captureExceptionWithAttributes(
- err,
- undefined,
- (req as any).traceId
- );
- res.status(500).json({ error: "simple error" });
- }
-
- @Get("test-error-stacktrace")
- testErrorStacktrace(@Req() req: Request, @Res() res: Response) {
- const err = new Error("error with stack trace");
- traceway.captureExceptionWithAttributes(
- err,
- undefined,
- (req as any).traceId
- );
- res.status(500).json({ error: "stacktrace error" });
- }
-
- @Get("test-error-wrapped")
- testErrorWrapped(@Req() req: Request, @Res() res: Response) {
- const base = new Error("base error");
- const wrapped = new Error("layer 1: " + base.message, { cause: base });
- const wrapped2 = new Error("layer 2: " + wrapped.message, {
- cause: wrapped,
- });
- traceway.captureExceptionWithAttributes(
- wrapped2,
- undefined,
- (req as any).traceId
- );
- res.status(500).json({ error: "wrapped error" });
- }
-
- @Get("test-error-nested")
- testErrorNested(@Req() req: Request, @Res() res: Response) {
- const err = outerFunction();
- traceway.captureExceptionWithAttributes(
- err,
- undefined,
- (req as any).traceId
- );
- res.status(500).json({ error: "nested error" });
- }
-
- @Get("test-message")
- testMessage() {
- traceway.captureMessage("test message from /test-message");
- return { status: "message sent" };
- }
-
- @Get("test-message-attributes")
- testMessageAttributes() {
- traceway.captureMessage("test message with attributes");
- return { status: "message with attributes sent" };
- }
-
- @Get("test-spans")
- async testSpans() {
- const dbSpan = traceway.startSpan("db.query");
- await new Promise((r) => setTimeout(r, 50));
- traceway.endSpan(dbSpan);
-
- const cacheSpan = traceway.startSpan("cache.set");
- await new Promise((r) => setTimeout(r, 20));
- traceway.endSpan(cacheSpan);
-
- const httpSpan = traceway.startSpan("http.external_api");
- await new Promise((r) => setTimeout(r, 100));
- traceway.endSpan(httpSpan);
-
- return { status: "spans captured" };
- }
-
- @Get("test-task")
- testTask() {
- traceway.measureTask("background-data-processor", async () => {
- const span = traceway.startSpan("processing");
- await new Promise((r) => setTimeout(r, 200));
- traceway.endSpan(span);
- });
- return { status: "task started" };
- }
-
- @Get("test-metric")
- testMetric() {
- traceway.captureMetric("test.custom_metric", 42.0);
- return { status: "metric captured" };
- }
-
- @Get("test-attributes")
- testAttributes() {
- traceway.captureExceptionWithAttributes(
- new Error("exception with custom attributes"),
- {
- user_id: "usr_123",
- request_id: "req_456",
- env: "testing",
- }
- );
- return { status: "exception with attributes captured" };
- }
-
- @Post("test-recording")
- testRecording(@Req() req: Request, @Res() res: Response) {
- const body = req.body;
-
- if (body?.action === "panic") {
- throw new Error("panic triggered by /test-recording");
- }
-
- res.json({ status: "ok", received: body });
- }
-}
diff --git a/testing/js/nestjs/src/app.module.ts b/testing/js/nestjs/src/app.module.ts
deleted file mode 100644
index ccebbbfd..00000000
--- a/testing/js/nestjs/src/app.module.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { Module, MiddlewareConsumer, NestModule } from "@nestjs/common";
-import { AppController } from "./app.controller.js";
-import { TracewayMiddleware } from "./traceway.middleware.js";
-
-@Module({
- controllers: [AppController],
-})
-export class AppModule implements NestModule {
- configure(consumer: MiddlewareConsumer) {
- consumer.apply(TracewayMiddleware).forRoutes("*");
- }
-}
diff --git a/testing/js/nestjs/src/main.ts b/testing/js/nestjs/src/main.ts
deleted file mode 100644
index 01c75350..00000000
--- a/testing/js/nestjs/src/main.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import "reflect-metadata";
-import { NestFactory } from "@nestjs/core";
-import { AppModule } from "./app.module.js";
-import * as traceway from "@traceway/backend";
-
-const endpoint =
- process.env.TRACEWAY_ENDPOINT ||
- "default_token_change_me@http://localhost:8082/api/report";
-const port = process.env.PORT || "8080";
-
-traceway.init(endpoint, { debug: true });
-
-async function bootstrap() {
- const app = await NestFactory.create(AppModule);
- await app.listen(Number(port));
- console.log(`NestJS server starting on :${port}`);
-}
-
-bootstrap();
diff --git a/testing/js/nestjs/src/traceway.middleware.ts b/testing/js/nestjs/src/traceway.middleware.ts
deleted file mode 100644
index 5092fdbf..00000000
--- a/testing/js/nestjs/src/traceway.middleware.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Injectable, NestMiddleware } from "@nestjs/common";
-import { Request, Response, NextFunction } from "express";
-import * as traceway from "@traceway/backend";
-
-@Injectable()
-export class TracewayMiddleware implements NestMiddleware {
- use(req: Request, res: Response, next: NextFunction) {
- const traceId = crypto.randomUUID().replace(/-/g, "");
- const startedAt = new Date();
- const startMs = performance.now();
-
- (req as any).traceId = traceId;
-
- res.on("finish", () => {
- const durationMs = performance.now() - startMs;
- const endpoint = `${req.method} ${req.route?.path || req.path}`;
-
- traceway.captureTrace(
- traceId,
- endpoint,
- durationMs,
- startedAt,
- res.statusCode,
- 0,
- req.ip || ""
- );
- });
-
- next();
- }
-}
diff --git a/testing/js/nestjs/tsconfig.json b/testing/js/nestjs/tsconfig.json
deleted file mode 100644
index 4cdd49ca..00000000
--- a/testing/js/nestjs/tsconfig.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2022",
- "module": "ESNext",
- "moduleResolution": "bundler",
- "esModuleInterop": true,
- "strict": true,
- "emitDecoratorMetadata": true,
- "experimentalDecorators": true,
- "outDir": "dist",
- "rootDir": "src"
- },
- "include": ["src"]
-}
diff --git a/testing/js/nextjs/instrumentation.ts b/testing/js/nextjs/instrumentation.ts
deleted file mode 100644
index c4337d89..00000000
--- a/testing/js/nextjs/instrumentation.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export async function register() {
- if (process.env.NEXT_RUNTIME === "nodejs") {
- const traceway = await import("@traceway/backend");
- const endpoint =
- process.env.TRACEWAY_ENDPOINT ||
- "default_token_change_me@http://localhost:8082/api/report";
- traceway.init(endpoint, { debug: true });
- }
-}
diff --git a/testing/js/nextjs/next.config.ts b/testing/js/nextjs/next.config.ts
deleted file mode 100644
index 5cd1956e..00000000
--- a/testing/js/nextjs/next.config.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import type { NextConfig } from "next";
-
-const nextConfig: NextConfig = {
- serverExternalPackages: ["@traceway/backend", "@traceway/core"],
-};
-
-export default nextConfig;
diff --git a/testing/js/nextjs/package.json b/testing/js/nextjs/package.json
deleted file mode 100644
index 2cb704a3..00000000
--- a/testing/js/nextjs/package.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "name": "traceway-test-nextjs",
- "version": "1.0.0",
- "private": true,
- "scripts": {
- "dev": "next dev --port ${PORT:-8080}",
- "build": "next build",
- "start": "next start --port ${PORT:-8080}"
- },
- "dependencies": {
- "@traceway/backend": "file:../../../../js-client/packages/backend",
- "@traceway/core": "file:../../../../js-client/packages/core",
- "next": "^15.0.0",
- "react": "^19.0.0",
- "react-dom": "^19.0.0"
- },
- "devDependencies": {
- "@types/react": "^19.0.0",
- "typescript": "^5.7.0"
- }
-}
diff --git a/testing/js/nextjs/src/app/api/test-attributes/route.ts b/testing/js/nextjs/src/app/api/test-attributes/route.ts
deleted file mode 100644
index 5b94a6b6..00000000
--- a/testing/js/nextjs/src/app/api/test-attributes/route.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async () => {
- traceway.captureExceptionWithAttributes(
- new Error("exception with custom attributes"),
- {
- user_id: "usr_123",
- request_id: "req_456",
- env: "testing",
- }
- );
- return NextResponse.json({ status: "exception with attributes captured" });
-});
diff --git a/testing/js/nextjs/src/app/api/test-error-nested/route.ts b/testing/js/nextjs/src/app/api/test-error-nested/route.ts
deleted file mode 100644
index dd1c0197..00000000
--- a/testing/js/nextjs/src/app/api/test-error-nested/route.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-function innerFunction(): Error {
- const err = new Error("error from inner function");
- Error.captureStackTrace(err, innerFunction);
- return err;
-}
-
-function middleFunction(): Error {
- return innerFunction();
-}
-
-function outerFunction(): Error {
- return middleFunction();
-}
-
-export const GET = withTraceway(async (_req, { traceId }) => {
- const err = outerFunction();
- traceway.captureExceptionWithAttributes(err, undefined, traceId);
- return NextResponse.json({ error: "nested error" }, { status: 500 });
-});
diff --git a/testing/js/nextjs/src/app/api/test-error-simple/route.ts b/testing/js/nextjs/src/app/api/test-error-simple/route.ts
deleted file mode 100644
index b38e5183..00000000
--- a/testing/js/nextjs/src/app/api/test-error-simple/route.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async (_req, { traceId }) => {
- const err = new Error("simple error without stack");
- traceway.captureExceptionWithAttributes(err, undefined, traceId);
- return NextResponse.json({ error: "simple error" }, { status: 500 });
-});
diff --git a/testing/js/nextjs/src/app/api/test-error-stacktrace/route.ts b/testing/js/nextjs/src/app/api/test-error-stacktrace/route.ts
deleted file mode 100644
index 42fb207d..00000000
--- a/testing/js/nextjs/src/app/api/test-error-stacktrace/route.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async (_req, { traceId }) => {
- const err = new Error("error with stack trace");
- traceway.captureExceptionWithAttributes(err, undefined, traceId);
- return NextResponse.json({ error: "stacktrace error" }, { status: 500 });
-});
diff --git a/testing/js/nextjs/src/app/api/test-error-wrapped/route.ts b/testing/js/nextjs/src/app/api/test-error-wrapped/route.ts
deleted file mode 100644
index bf81142e..00000000
--- a/testing/js/nextjs/src/app/api/test-error-wrapped/route.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async (_req, { traceId }) => {
- const base = new Error("base error");
- const wrapped = new Error("layer 1: " + base.message, { cause: base });
- const wrapped2 = new Error("layer 2: " + wrapped.message, { cause: wrapped });
- traceway.captureExceptionWithAttributes(wrapped2, undefined, traceId);
- return NextResponse.json({ error: "wrapped error" }, { status: 500 });
-});
diff --git a/testing/js/nextjs/src/app/api/test-exception/route.ts b/testing/js/nextjs/src/app/api/test-exception/route.ts
deleted file mode 100644
index 2298e0b7..00000000
--- a/testing/js/nextjs/src/app/api/test-exception/route.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async () => {
- throw new Error("test panic from /test-exception");
-});
diff --git a/testing/js/nextjs/src/app/api/test-message-attributes/route.ts b/testing/js/nextjs/src/app/api/test-message-attributes/route.ts
deleted file mode 100644
index 6c7d3371..00000000
--- a/testing/js/nextjs/src/app/api/test-message-attributes/route.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async () => {
- traceway.captureMessage("test message with attributes");
- return NextResponse.json({ status: "message with attributes sent" });
-});
diff --git a/testing/js/nextjs/src/app/api/test-message/route.ts b/testing/js/nextjs/src/app/api/test-message/route.ts
deleted file mode 100644
index ff506455..00000000
--- a/testing/js/nextjs/src/app/api/test-message/route.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async () => {
- traceway.captureMessage("test message from /test-message");
- return NextResponse.json({ status: "message sent" });
-});
diff --git a/testing/js/nextjs/src/app/api/test-metric/route.ts b/testing/js/nextjs/src/app/api/test-metric/route.ts
deleted file mode 100644
index 5e1ab4e8..00000000
--- a/testing/js/nextjs/src/app/api/test-metric/route.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async () => {
- traceway.captureMetric("test.custom_metric", 42.0);
- return NextResponse.json({ status: "metric captured" });
-});
diff --git a/testing/js/nextjs/src/app/api/test-not-found/route.ts b/testing/js/nextjs/src/app/api/test-not-found/route.ts
deleted file mode 100644
index 5023ce45..00000000
--- a/testing/js/nextjs/src/app/api/test-not-found/route.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { NextResponse } from "next/server";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async () => {
- return NextResponse.json({ status: "not-found" }, { status: 404 });
-});
diff --git a/testing/js/nextjs/src/app/api/test-ok/route.ts b/testing/js/nextjs/src/app/api/test-ok/route.ts
deleted file mode 100644
index 81689168..00000000
--- a/testing/js/nextjs/src/app/api/test-ok/route.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { NextResponse } from "next/server";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async () => {
- return NextResponse.json({ status: "ok" });
-});
diff --git a/testing/js/nextjs/src/app/api/test-recording/route.ts b/testing/js/nextjs/src/app/api/test-recording/route.ts
deleted file mode 100644
index f2b0c273..00000000
--- a/testing/js/nextjs/src/app/api/test-recording/route.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { NextRequest, NextResponse } from "next/server";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const POST = withTraceway(async (req: NextRequest) => {
- const body = await req.json();
-
- if (body?.action === "panic") {
- throw new Error("panic triggered by /test-recording");
- }
-
- return NextResponse.json({ status: "ok", received: body });
-});
diff --git a/testing/js/nextjs/src/app/api/test-spans/route.ts b/testing/js/nextjs/src/app/api/test-spans/route.ts
deleted file mode 100644
index 7dfe6cc7..00000000
--- a/testing/js/nextjs/src/app/api/test-spans/route.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async (_req, { startSpan }) => {
- const dbSpan = startSpan("db.query");
- await new Promise((r) => setTimeout(r, 50));
- traceway.endSpan(dbSpan);
-
- const cacheSpan = startSpan("cache.set");
- await new Promise((r) => setTimeout(r, 20));
- traceway.endSpan(cacheSpan);
-
- const httpSpan = startSpan("http.external_api");
- await new Promise((r) => setTimeout(r, 100));
- traceway.endSpan(httpSpan);
-
- return NextResponse.json({ status: "spans captured" });
-});
diff --git a/testing/js/nextjs/src/app/api/test-task/route.ts b/testing/js/nextjs/src/app/api/test-task/route.ts
deleted file mode 100644
index 8faa8336..00000000
--- a/testing/js/nextjs/src/app/api/test-task/route.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-import { withTraceway } from "@/lib/traceway-handler";
-
-export const GET = withTraceway(async () => {
- traceway.measureTask("background-data-processor", async () => {
- const span = traceway.startSpan("processing");
- await new Promise((r) => setTimeout(r, 200));
- traceway.endSpan(span);
- });
- return NextResponse.json({ status: "task started" });
-});
diff --git a/testing/js/nextjs/src/lib/traceway-handler.ts b/testing/js/nextjs/src/lib/traceway-handler.ts
deleted file mode 100644
index e6e3f59f..00000000
--- a/testing/js/nextjs/src/lib/traceway-handler.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { NextRequest, NextResponse } from "next/server";
-import * as traceway from "@traceway/backend";
-
-type HandlerFn = (
- req: NextRequest,
- ctx: { traceId: string; startSpan: (name: string) => ReturnType<typeof traceway.startSpan> }
-) => Promise<NextResponse> | NextResponse;
-
-export function withTraceway(handler: HandlerFn) {
- return async (req: NextRequest) => {
- const traceId = crypto.randomUUID().replace(/-/g, "");
- const startedAt = new Date();
- const startMs = performance.now();
- const spans: ReturnType<typeof traceway.startSpan>[] = [];
-
- const startSpan = (name: string) => {
- const span = traceway.startSpan(name);
- spans.push(span);
- return span;
- };
-
- try {
- const res = await handler(req, { traceId, startSpan });
- const durationMs = performance.now() - startMs;
- const endpoint = `${req.method} ${req.nextUrl.pathname}`;
- const completedSpans = spans.map((s) => traceway.endSpan(s));
-
- traceway.captureTrace(
- traceId,
- endpoint,
- durationMs,
- startedAt,
- res.status,
- 0,
- req.headers.get("x-forwarded-for") || "",
- undefined,
- completedSpans
- );
-
- return res;
- } catch (err) {
- const durationMs = performance.now() - startMs;
- const endpoint = `${req.method} ${req.nextUrl.pathname}`;
- const completedSpans = spans.map((s) => traceway.endSpan(s));
-
- if (err instanceof Error) {
- traceway.captureExceptionWithAttributes(err, undefined, traceId);
- }
-
- traceway.captureTrace(
- traceId,
- endpoint,
- durationMs,
- startedAt,
- 500,
- 0,
- req.headers.get("x-forwarded-for") || "",
- undefined,
- completedSpans
- );
-
- return NextResponse.json({ error: (err as Error).message }, { status: 500 });
- }
- };
-}
diff --git a/testing/js/nextjs/tsconfig.json b/testing/js/nextjs/tsconfig.json
deleted file mode 100644
index 407a18a6..00000000
--- a/testing/js/nextjs/tsconfig.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2022",
- "lib": ["dom", "dom.iterable", "esnext"],
- "allowJs": true,
- "skipLibCheck": true,
- "strict": true,
- "noEmit": true,
- "esModuleInterop": true,
- "module": "ESNext",
- "moduleResolution": "bundler",
- "resolveJsonModule": true,
- "isolatedModules": true,
- "jsx": "preserve",
- "incremental": true,
- "plugins": [{ "name": "next" }],
- "paths": {
- "@/*": ["./src/*"]
- }
- },
- "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
- "exclude": ["node_modules"]
-}
diff --git a/testing/js/remix/app/lib/traceway.ts b/testing/js/remix/app/lib/traceway.ts
deleted file mode 100644
index 9915f66f..00000000
--- a/testing/js/remix/app/lib/traceway.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import * as traceway from "@traceway/backend";
-
-const endpoint =
- process.env.TRACEWAY_ENDPOINT ||
- "default_token_change_me@http://localhost:8082/api/report";
-
-let initialized = false;
-
-export function ensureInit() {
- if (!initialized) {
- traceway.init(endpoint, { debug: true });
- initialized = true;
- }
-}
-
-type HandlerFn = (
- request: Request,
- ctx: { traceId: string; startSpan: (name: string) => ReturnType<typeof traceway.startSpan> }
-) => Promise<Response>;
-
-export function withTraceway(handler: HandlerFn) {
- return async ({ request }: { request: Request }) => {
- ensureInit();
-
- const traceId = crypto.randomUUID().replace(/-/g, "");
- const startedAt = new Date();
- const startMs = performance.now();
- const spans: ReturnType<typeof traceway.startSpan>[] = [];
-
- const startSpan = (name: string) => {
- const span = traceway.startSpan(name);
- spans.push(span);
- return span;
- };
-
- try {
- const res = await handler(request, { traceId, startSpan });
- const durationMs = performance.now() - startMs;
- const url = new URL(request.url);
- const endpoint = `${request.method} ${url.pathname}`;
- const completedSpans = spans.map((s) => traceway.endSpan(s));
-
- traceway.captureTrace(
- traceId,
- endpoint,
- durationMs,
- startedAt,
- res.status,
- 0,
- request.headers.get("x-forwarded-for") || "",
- undefined,
- completedSpans
- );
-
- return res;
- } catch (err) {
- const durationMs = performance.now() - startMs;
- const url = new URL(request.url);
- const endpoint = `${request.method} ${url.pathname}`;
- const completedSpans = spans.map((s) => traceway.endSpan(s));
-
- if (err instanceof Error) {
- traceway.captureExceptionWithAttributes(err, undefined, traceId);
- }
-
- traceway.captureTrace(
- traceId,
- endpoint,
- durationMs,
- startedAt,
- 500,
- 0,
- request.headers.get("x-forwarded-for") || "",
- undefined,
- completedSpans
- );
-
- return new Response(JSON.stringify({ error: (err as Error).message }), {
- status: 500,
- headers: { "Content-Type": "application/json" },
- });
- }
- };
-}
-
-export { traceway };
diff --git a/testing/js/remix/app/routes/api.test-attributes.ts b/testing/js/remix/app/routes/api.test-attributes.ts
deleted file mode 100644
index 56dc637c..00000000
--- a/testing/js/remix/app/routes/api.test-attributes.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async () => {
- traceway.captureExceptionWithAttributes(
- new Error("exception with custom attributes"),
- {
- user_id: "usr_123",
- request_id: "req_456",
- env: "testing",
- }
- );
- return new Response(JSON.stringify({ status: "exception with attributes captured" }), {
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-error-nested.ts b/testing/js/remix/app/routes/api.test-error-nested.ts
deleted file mode 100644
index 0e229f09..00000000
--- a/testing/js/remix/app/routes/api.test-error-nested.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-function innerFunction(): Error {
- const err = new Error("error from inner function");
- Error.captureStackTrace(err, innerFunction);
- return err;
-}
-
-function middleFunction(): Error {
- return innerFunction();
-}
-
-function outerFunction(): Error {
- return middleFunction();
-}
-
-export const loader = withTraceway(async (_request, { traceId }) => {
- const err = outerFunction();
- traceway.captureExceptionWithAttributes(err, undefined, traceId);
- return new Response(JSON.stringify({ error: "nested error" }), {
- status: 500,
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-error-simple.ts b/testing/js/remix/app/routes/api.test-error-simple.ts
deleted file mode 100644
index b979d07b..00000000
--- a/testing/js/remix/app/routes/api.test-error-simple.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async (_request, { traceId }) => {
- const err = new Error("simple error without stack");
- traceway.captureExceptionWithAttributes(err, undefined, traceId);
- return new Response(JSON.stringify({ error: "simple error" }), {
- status: 500,
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-error-stacktrace.ts b/testing/js/remix/app/routes/api.test-error-stacktrace.ts
deleted file mode 100644
index 8f8e18b1..00000000
--- a/testing/js/remix/app/routes/api.test-error-stacktrace.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async (_request, { traceId }) => {
- const err = new Error("error with stack trace");
- traceway.captureExceptionWithAttributes(err, undefined, traceId);
- return new Response(JSON.stringify({ error: "stacktrace error" }), {
- status: 500,
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-error-wrapped.ts b/testing/js/remix/app/routes/api.test-error-wrapped.ts
deleted file mode 100644
index b1ddf697..00000000
--- a/testing/js/remix/app/routes/api.test-error-wrapped.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async (_request, { traceId }) => {
- const base = new Error("base error");
- const wrapped = new Error("layer 1: " + base.message, { cause: base });
- const wrapped2 = new Error("layer 2: " + wrapped.message, { cause: wrapped });
- traceway.captureExceptionWithAttributes(wrapped2, undefined, traceId);
- return new Response(JSON.stringify({ error: "wrapped error" }), {
- status: 500,
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-exception.ts b/testing/js/remix/app/routes/api.test-exception.ts
deleted file mode 100644
index d90a0cab..00000000
--- a/testing/js/remix/app/routes/api.test-exception.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { withTraceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async () => {
- throw new Error("test panic from /test-exception");
-});
diff --git a/testing/js/remix/app/routes/api.test-message-attributes.ts b/testing/js/remix/app/routes/api.test-message-attributes.ts
deleted file mode 100644
index 86462b9d..00000000
--- a/testing/js/remix/app/routes/api.test-message-attributes.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async () => {
- // JS SDK captureMessage does not support attributes
- traceway.captureMessage("test message with attributes");
- return new Response(JSON.stringify({ status: "message with attributes sent" }), {
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-message.ts b/testing/js/remix/app/routes/api.test-message.ts
deleted file mode 100644
index 3ce43030..00000000
--- a/testing/js/remix/app/routes/api.test-message.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async () => {
- traceway.captureMessage("test message from /test-message");
- return new Response(JSON.stringify({ status: "message sent" }), {
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-metric.ts b/testing/js/remix/app/routes/api.test-metric.ts
deleted file mode 100644
index d3636a84..00000000
--- a/testing/js/remix/app/routes/api.test-metric.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async () => {
- traceway.captureMetric("test.custom_metric", 42.0);
- return new Response(JSON.stringify({ status: "metric captured" }), {
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-not-found.ts b/testing/js/remix/app/routes/api.test-not-found.ts
deleted file mode 100644
index b38eafe5..00000000
--- a/testing/js/remix/app/routes/api.test-not-found.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { withTraceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async () => {
- return new Response(JSON.stringify({ status: "not-found" }), {
- status: 404,
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-ok.ts b/testing/js/remix/app/routes/api.test-ok.ts
deleted file mode 100644
index 61e71c9d..00000000
--- a/testing/js/remix/app/routes/api.test-ok.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { withTraceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async () => {
- return new Response(JSON.stringify({ status: "ok" }), {
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-recording.ts b/testing/js/remix/app/routes/api.test-recording.ts
deleted file mode 100644
index cd53b988..00000000
--- a/testing/js/remix/app/routes/api.test-recording.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { withTraceway } from "~/lib/traceway";
-
-export const action = withTraceway(async (request) => {
- const body = await request.json();
-
- if (body?.action === "panic") {
- throw new Error("panic triggered by /test-recording");
- }
-
- return new Response(JSON.stringify({ status: "ok", received: body }), {
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-spans.ts b/testing/js/remix/app/routes/api.test-spans.ts
deleted file mode 100644
index 3e558319..00000000
--- a/testing/js/remix/app/routes/api.test-spans.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async (_request, { startSpan }) => {
- const dbSpan = startSpan("db.query");
- await new Promise((r) => setTimeout(r, 50));
- traceway.endSpan(dbSpan);
-
- const cacheSpan = startSpan("cache.set");
- await new Promise((r) => setTimeout(r, 20));
- traceway.endSpan(cacheSpan);
-
- const httpSpan = startSpan("http.external_api");
- await new Promise((r) => setTimeout(r, 100));
- traceway.endSpan(httpSpan);
-
- return new Response(JSON.stringify({ status: "spans captured" }), {
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/app/routes/api.test-task.ts b/testing/js/remix/app/routes/api.test-task.ts
deleted file mode 100644
index 3db1f066..00000000
--- a/testing/js/remix/app/routes/api.test-task.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { withTraceway, traceway } from "~/lib/traceway";
-
-export const loader = withTraceway(async () => {
- traceway.measureTask("background-data-processor", async () => {
- const span = traceway.startSpan("processing");
- await new Promise((r) => setTimeout(r, 200));
- traceway.endSpan(span);
- });
- return new Response(JSON.stringify({ status: "task started" }), {
- headers: { "Content-Type": "application/json" },
- });
-});
diff --git a/testing/js/remix/package.json b/testing/js/remix/package.json
deleted file mode 100644
index 6553ff5b..00000000
--- a/testing/js/remix/package.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "name": "traceway-test-remix",
- "version": "1.0.0",
- "private": true,
- "type": "module",
- "scripts": {
- "dev": "remix vite:dev --port ${PORT:-8080}",
- "build": "remix vite:build",
- "start": "remix-serve build/server/index.js"
- },
- "dependencies": {
- "@remix-run/node": "^2.15.0",
- "@remix-run/react": "^2.15.0",
- "@remix-run/serve": "^2.15.0",
- "@traceway/backend": "file:../../../../js-client/packages/backend",
- "@traceway/core": "file:../../../../js-client/packages/core",
- "isbot": "^5.1.0",
- "react": "^18.3.0",
- "react-dom": "^18.3.0"
- },
- "devDependencies": {
- "@remix-run/dev": "^2.15.0",
- "typescript": "^5.7.0",
- "vite": "^6.0.0"
- }
-}
diff --git a/testing/js/remix/tsconfig.json b/testing/js/remix/tsconfig.json
deleted file mode 100644
index 76ce5d86..00000000
--- a/testing/js/remix/tsconfig.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "compilerOptions": {
- "target": "ES2022",
- "module": "ESNext",
- "moduleResolution": "bundler",
- "esModuleInterop": true,
- "strict": true,
- "lib": ["DOM", "DOM.Iterable", "ES2022"],
- "jsx": "react-jsx",
- "isolatedModules": true,
- "skipLibCheck": true,
- "forceConsistentCasingInFileNames": true,
- "paths": {
- "~/*": ["./app/*"]
- }
- },
- "include": ["app", "env.d.ts"]
-}
diff --git a/testing/js/remix/vite.config.ts b/testing/js/remix/vite.config.ts
deleted file mode 100644
index 23dc790c..00000000
--- a/testing/js/remix/vite.config.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { vitePlugin as remix } from "@remix-run/dev";
-import { defineConfig } from "vite";
-
-export default defineConfig({
- plugins: [
- remix({
- ssr: true,
- }),
- ],
- server: {
- port: Number(process.env.PORT) || 8080,
- },
-});