The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
transactions are now traces
ddux1c46394b8d8e
diff --git a/backend/app/controllers/clientcontrollers/client.controller.go b/backend/app/controllers/clientcontrollers/client.controller.goindex 578363ce..69d688d0 100644--- a/backend/app/controllers/clientcontrollers/client.controller.go+++ b/backend/app/controllers/clientcontrollers/client.controller.go@@ -53,7 +53,7 @@ func (e clientController) Report(c *gin.Context) {metricRecordsToInsert := []models.MetricRecord{}segmentsToInsert := []models.Segment{}for _, cf := range request.CollectionFrames {- for _, ct := range cf.Transactions {+ for _, ct := range cf.Traces {if ct.IsTask {t := ct.ToTask(request.AppVersion, request.ServerName)t.ProjectId = projectIddiff --git a/backend/app/controllers/endpoint_detail.controller.go b/backend/app/controllers/endpoint_detail.controller.goindex e7fb6d45..239c03a6 100644--- a/backend/app/controllers/endpoint_detail.controller.go+++ b/backend/app/controllers/endpoint_detail.controller.go@@ -59,7 +59,7 @@ func (t endpointDetailController) GetEndpointDetail(c *gin.Context) {// Get segments (flat list ordered by start_time)seg = traceway.StartSegment(c, "loading segments")- segments, err := repositories.SegmentRepository.FindByTransactionId(c, projectId, endpointId)+ segments, err := repositories.SegmentRepository.FindByTraceId(c, projectId, endpointId)seg.End()if err != nil {c.AbortWithError(500, traceway.NewStackTraceErrorf("error loading segments: %w", err))@@ -71,7 +71,7 @@ func (t endpointDetailController) GetEndpointDetail(c *gin.Context) {var messages []EndpointMessageInfoseg = traceway.StartSegment(c, "loading exceptions")- allExceptions, err := repositories.ExceptionStackTraceRepository.FindAllByTransactionId(c, projectId, endpointId)+ allExceptions, err := repositories.ExceptionStackTraceRepository.FindAllByTraceId(c, projectId, endpointId)seg.End()if err != nil {c.AbortWithError(500, traceway.NewStackTraceErrorf("error loading all exceptions: %w", err))diff --git a/backend/app/controllers/task_detail.controller.go b/backend/app/controllers/task_detail.controller.goindex b186c5b4..9360af00 100644--- a/backend/app/controllers/task_detail.controller.go+++ b/backend/app/controllers/task_detail.controller.go@@ -59,7 +59,7 @@ func (t taskDetailController) GetTaskDetail(c *gin.Context) {// Get segments (flat list ordered by start_time)seg = traceway.StartSegment(c, "loading segments")- segments, err := repositories.SegmentRepository.FindByTransactionId(c, projectId, taskId)+ segments, err := repositories.SegmentRepository.FindByTraceId(c, projectId, taskId)seg.End()if err != nil {c.AbortWithError(500, traceway.NewStackTraceErrorf("error loading segments: %w", err))@@ -71,7 +71,7 @@ func (t taskDetailController) GetTaskDetail(c *gin.Context) {var messages []TaskMessageInfoseg = traceway.StartSegment(c, "loading exceptions")- allExceptions, err := repositories.ExceptionStackTraceRepository.FindAllByTransactionId(c, projectId, taskId)+ allExceptions, err := repositories.ExceptionStackTraceRepository.FindAllByTraceId(c, projectId, taskId)seg.End()if err != nil {c.AbortWithError(500, traceway.NewStackTraceErrorf("error loading allExceptions: %w", err))diff --git a/backend/app/migrations/ch/0009_rename_transaction_to_trace_segments.up.sql b/backend/app/migrations/ch/0009_rename_transaction_to_trace_segments.up.sqlnew file mode 100644index 00000000..73a8b803--- /dev/null+++ b/backend/app/migrations/ch/0009_rename_transaction_to_trace_segments.up.sql@@ -0,0 +1,3 @@+ALTER TABLE segments RENAME COLUMN transaction_id TO trace_id;+ALTER TABLE segments DROP INDEX idx_transaction_id;+ALTER TABLE segments ADD INDEX idx_trace_id trace_id TYPE bloom_filter(0.001) GRANULARITY 1;diff --git a/backend/app/migrations/ch/0010_rename_transaction_to_trace_exceptions.up.sql b/backend/app/migrations/ch/0010_rename_transaction_to_trace_exceptions.up.sqlnew file mode 100644index 00000000..c29b66c6--- /dev/null+++ b/backend/app/migrations/ch/0010_rename_transaction_to_trace_exceptions.up.sql@@ -0,0 +1,4 @@+ALTER TABLE exception_stack_traces RENAME COLUMN transaction_id TO trace_id;+ALTER TABLE exception_stack_traces RENAME COLUMN transaction_type TO trace_type;+ALTER TABLE exception_stack_traces DROP INDEX idx_transaction_id;+ALTER TABLE exception_stack_traces ADD INDEX idx_trace_id trace_id TYPE bloom_filter(0.01) GRANULARITY 4;diff --git a/backend/app/migrations/ch/0011_rename_transactions_to_traces.up.sql b/backend/app/migrations/ch/0011_rename_transactions_to_traces.up.sqlnew file mode 100644index 00000000..95d6838d--- /dev/null+++ b/backend/app/migrations/ch/0011_rename_transactions_to_traces.up.sql@@ -0,0 +1 @@+RENAME TABLE transactions TO traces;diff --git a/backend/app/models/clientmodels/clientmodels.model.go b/backend/app/models/clientmodels/clientmodels.model.goindex fb402dae..3a64df49 100644--- a/backend/app/models/clientmodels/clientmodels.model.go+++ b/backend/app/models/clientmodels/clientmodels.model.go@@ -8,37 +8,37 @@ import ()type ClientExceptionStackTrace struct {- TransactionId *string `json:"transactionId"`- IsTask bool `json:"isTask"`- StackTrace string `json:"stackTrace"`- RecordedAt time.Time `json:"recordedAt"`- Scope map[string]string `json:"scope"`- IsMessage bool `json:"isMessage"`+ TraceId *string `json:"traceId"`+ IsTask bool `json:"isTask"`+ StackTrace string `json:"stackTrace"`+ RecordedAt time.Time `json:"recordedAt"`+ Scope map[string]string `json:"scope"`+ IsMessage bool `json:"isMessage"`}func (c *ClientExceptionStackTrace) ToExceptionStackTrace(exceptionHash, appVersion, serverName string) models.ExceptionStackTrace {- transactionType := "endpoint"+ traceType := "endpoint"if c.IsTask {- transactionType = "task"+ traceType = "task"}- var transactionId *uuid.UUID- if c.TransactionId != nil {- if parsed, err := uuid.Parse(*c.TransactionId); err == nil {- transactionId = &parsed+ var traceId *uuid.UUID+ if c.TraceId != nil {+ if parsed, err := uuid.Parse(*c.TraceId); err == nil {+ traceId = &parsed}}return models.ExceptionStackTrace{- ExceptionHash: exceptionHash,- TransactionId: transactionId,- TransactionType: transactionType,- StackTrace: c.StackTrace,- RecordedAt: c.RecordedAt,- Scope: c.Scope,- IsMessage: c.IsMessage,- AppVersion: appVersion,- ServerName: serverName,+ ExceptionHash: exceptionHash,+ TraceId: traceId,+ TraceType: traceType,+ StackTrace: c.StackTrace,+ RecordedAt: c.RecordedAt,+ Scope: c.Scope,+ IsMessage: c.IsMessage,+ AppVersion: appVersion,+ ServerName: serverName,}}@@ -57,7 +57,7 @@ func (c *ClientMetricRecord) ToMetricRecord(serverName string) models.MetricReco}}-type ClientTransaction struct {+type ClientTrace struct {Id string `json:"id"`Endpoint string `json:"endpoint"`Duration time.Duration `json:"duration"`@@ -70,15 +70,15 @@ type ClientTransaction struct {IsTask bool `json:"isTask"`}-// ParsedId returns the transaction ID as uuid.UUID-func (c *ClientTransaction) ParsedId() uuid.UUID {+// ParsedId returns the trace ID as uuid.UUID+func (c *ClientTrace) ParsedId() uuid.UUID {if parsed, err := uuid.Parse(c.Id); err == nil {return parsed}return uuid.New()}-func (c *ClientTransaction) ToEndpoint(appVersion, serverName string) models.Endpoint {+func (c *ClientTrace) ToEndpoint(appVersion, serverName string) models.Endpoint {return models.Endpoint{Id: c.ParsedId(),Endpoint: c.Endpoint,@@ -93,7 +93,7 @@ func (c *ClientTransaction) ToEndpoint(appVersion, serverName string) models.End}}-func (c *ClientTransaction) ToTask(appVersion, serverName string) models.Task {+func (c *ClientTrace) ToTask(appVersion, serverName string) models.Task {return models.Task{Id: c.ParsedId(),TaskName: c.Endpoint, // Endpoint field is used as task name@@ -121,10 +121,10 @@ func (c *ClientSegment) ParsedId() uuid.UUID {return uuid.New()}-func (c *ClientSegment) ToSegment(transactionId uuid.UUID) models.Segment {+func (c *ClientSegment) ToSegment(traceId uuid.UUID) models.Segment {return models.Segment{- Id: c.ParsedId(),- TransactionId: transactionId,+ Id: c.ParsedId(),+ TraceId: traceId,Name: c.Name,StartTime: c.StartTime,Duration: c.Duration,@@ -135,5 +135,5 @@ func (c *ClientSegment) ToSegment(transactionId uuid.UUID) models.Segment {type CollectionFrame struct {StackTraces []*ClientExceptionStackTrace `json:"stackTraces"`Metrics []*ClientMetricRecord `json:"metrics"`- Transactions []*ClientTransaction `json:"transactions"`+ Traces []*ClientTrace `json:"traces"`}diff --git a/backend/app/models/exception_stack_trace.model.go b/backend/app/models/exception_stack_trace.model.goindex ca895ccf..f2ce141b 100644--- a/backend/app/models/exception_stack_trace.model.go+++ b/backend/app/models/exception_stack_trace.model.go@@ -9,8 +9,8 @@ import (type ExceptionStackTrace struct {Id uuid.UUID `json:"id" ch:"id"`ProjectId uuid.UUID `json:"projectId" ch:"project_id"`- TransactionId *uuid.UUID `json:"transactionId" ch:"transaction_id"`- TransactionType string `json:"transactionType" ch:"transaction_type"` // "endpoint" or "task"+ TraceId *uuid.UUID `json:"traceId" ch:"trace_id"`+ TraceType string `json:"traceType" ch:"trace_type"` // "endpoint" or "task"ExceptionHash string `json:"exceptionHash" ch:"exception_hash"`StackTrace string `json:"stackTrace" ch:"stack_trace"`RecordedAt time.Time `json:"recordedAt" ch:"recorded_at"`diff --git a/backend/app/models/segment.model.go b/backend/app/models/segment.model.goindex 2213987c..d6990958 100644--- a/backend/app/models/segment.model.go+++ b/backend/app/models/segment.model.go@@ -8,7 +8,7 @@ import (type Segment struct {Id uuid.UUID `json:"id" ch:"id"`- TransactionId uuid.UUID `json:"transactionId" ch:"transaction_id"`+ TraceId uuid.UUID `json:"traceId" ch:"trace_id"`ProjectId uuid.UUID `json:"projectId" ch:"project_id"`Name string `json:"name" ch:"name"`StartTime time.Time `json:"startTime" ch:"start_time"`diff --git a/backend/app/repositories/exception_stack_trace.repository.go b/backend/app/repositories/exception_stack_trace.repository.goindex fada8eed..1831d03a 100644--- a/backend/app/repositories/exception_stack_trace.repository.go+++ b/backend/app/repositories/exception_stack_trace.repository.go@@ -17,7 +17,7 @@ import (type exceptionStackTraceRepository struct{}func (e *exceptionStackTraceRepository) InsertAsync(ctx context.Context, lines []models.ExceptionStackTrace) error {- batch, err := (*chdb.Conn).PrepareBatch(clickhouse.Context(context.Background(), clickhouse.WithAsync(false)), "INSERT INTO exception_stack_traces (id, project_id, transaction_id, transaction_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_message)")+ batch, err := (*chdb.Conn).PrepareBatch(clickhouse.Context(context.Background(), clickhouse.WithAsync(false)), "INSERT INTO exception_stack_traces (id, project_id, trace_id, trace_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_message)")if err != nil {return err}@@ -32,11 +32,11 @@ func (e *exceptionStackTraceRepository) InsertAsync(ctx context.Context, lines [if est.IsMessage {isMessage = 1}- transactionType := est.TransactionType- if transactionType == "" {- transactionType = "endpoint"+ traceType := est.TraceType+ if traceType == "" {+ traceType = "endpoint"}- if err := batch.Append(est.Id, est.ProjectId, est.TransactionId, transactionType, est.ExceptionHash, est.StackTrace, est.RecordedAt, scopeJSON, est.AppVersion, est.ServerName, isMessage); err != nil {+ if err := batch.Append(est.Id, est.ProjectId, est.TraceId, traceType, est.ExceptionHash, est.StackTrace, est.RecordedAt, scopeJSON, est.AppVersion, est.ServerName, isMessage); err != nil {return err}}@@ -161,7 +161,7 @@ func (e *exceptionStackTraceRepository) FindByHash(ctx context.Context, projectI// Get individual occurrences with pagination (including scope)rows, err := (*chdb.Conn).Query(ctx,- "SELECT id, project_id, transaction_id, transaction_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_message FROM exception_stack_traces WHERE project_id = ? AND exception_hash = ? ORDER BY recorded_at DESC LIMIT ? OFFSET ?",+ "SELECT id, project_id, trace_id, trace_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_message FROM exception_stack_traces WHERE project_id = ? AND exception_hash = ? ORDER BY recorded_at DESC LIMIT ? OFFSET ?",projectId, exceptionHash, pageSize, offset)if err != nil {return nil, nil, 0, err@@ -173,7 +173,7 @@ func (e *exceptionStackTraceRepository) FindByHash(ctx context.Context, projectIvar o models.ExceptionStackTracevar scopeJSON stringvar isMessage uint8- if err := rows.Scan(&o.Id, &o.ProjectId, &o.TransactionId, &o.TransactionType, &o.ExceptionHash, &o.StackTrace, &o.RecordedAt, &scopeJSON, &o.AppVersion, &o.ServerName, &isMessage); err != nil {+ if err := rows.Scan(&o.Id, &o.ProjectId, &o.TraceId, &o.TraceType, &o.ExceptionHash, &o.StackTrace, &o.RecordedAt, &scopeJSON, &o.AppVersion, &o.ServerName, &isMessage); err != nil {return nil, nil, 0, err}o.IsMessage = isMessage == 1@@ -321,22 +321,22 @@ func (e *exceptionStackTraceRepository) IsArchived(ctx context.Context, projectIreturn count > 0, nil}-func (e *exceptionStackTraceRepository) FindExceptionByTransactionId(ctx context.Context, projectId uuid.UUID, transactionId uuid.UUID) (*models.ExceptionStackTrace, error) {+func (e *exceptionStackTraceRepository) FindExceptionByTraceId(ctx context.Context, projectId uuid.UUID, traceId uuid.UUID) (*models.ExceptionStackTrace, error) {var est models.ExceptionStackTracevar scopeJSON stringvar isMessage uint8err := (*chdb.Conn).QueryRow(ctx,- `SELECT id, project_id, transaction_id, transaction_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_message+ `SELECT id, project_id, trace_id, trace_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_messageFROM exception_stack_traces- WHERE project_id = ? AND transaction_id = ? AND is_message = false+ WHERE project_id = ? AND trace_id = ? AND is_message = falseLIMIT 1`,- projectId, transactionId).Scan(- &est.Id, &est.ProjectId, &est.TransactionId, &est.TransactionType, &est.ExceptionHash, &est.StackTrace,+ projectId, traceId).Scan(+ &est.Id, &est.ProjectId, &est.TraceId, &est.TraceType, &est.ExceptionHash, &est.StackTrace,&est.RecordedAt, &scopeJSON, &est.AppVersion, &est.ServerName, &isMessage)if err != nil {- // No exception found for this transaction+ // No exception found for this tracereturn nil, nil}@@ -350,14 +350,14 @@ func (e *exceptionStackTraceRepository) FindExceptionByTransactionId(ctx contextreturn &est, nil}-// FindAllByTransactionId returns all exceptions and messages associated with a specific transaction-func (e *exceptionStackTraceRepository) FindAllByTransactionId(ctx context.Context, projectId uuid.UUID, transactionId uuid.UUID) ([]models.ExceptionStackTrace, error) {+// FindAllByTraceId returns all exceptions and messages associated with a specific trace+func (e *exceptionStackTraceRepository) FindAllByTraceId(ctx context.Context, projectId uuid.UUID, traceId uuid.UUID) ([]models.ExceptionStackTrace, error) {rows, err := (*chdb.Conn).Query(ctx,- `SELECT id, project_id, transaction_id, transaction_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_message+ `SELECT id, project_id, trace_id, trace_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_messageFROM exception_stack_traces- WHERE project_id = ? AND transaction_id = ?+ WHERE project_id = ? AND trace_id = ?ORDER BY recorded_at ASC`,- projectId, transactionId)+ projectId, traceId)if err != nil {return nil, err@@ -370,7 +370,7 @@ func (e *exceptionStackTraceRepository) FindAllByTransactionId(ctx context.Contevar scopeJSON stringvar isMessage uint8- if err := rows.Scan(&est.Id, &est.ProjectId, &est.TransactionId, &est.TransactionType, &est.ExceptionHash, &est.StackTrace,+ if err := rows.Scan(&est.Id, &est.ProjectId, &est.TraceId, &est.TraceType, &est.ExceptionHash, &est.StackTrace,&est.RecordedAt, &scopeJSON, &est.AppVersion, &est.ServerName, &isMessage); err != nil {return nil, err}@@ -394,12 +394,12 @@ func (e *exceptionStackTraceRepository) FindById(ctx context.Context, projectIdvar isMessage uint8err := (*chdb.Conn).QueryRow(ctx,- `SELECT id, project_id, transaction_id, transaction_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_message+ `SELECT id, project_id, trace_id, trace_type, exception_hash, stack_trace, recorded_at, scope, app_version, server_name, is_messageFROM exception_stack_tracesWHERE project_id = ? AND id = ?LIMIT 1`,projectId, id).Scan(- &est.Id, &est.ProjectId, &est.TransactionId, &est.TransactionType, &est.ExceptionHash, &est.StackTrace,+ &est.Id, &est.ProjectId, &est.TraceId, &est.TraceType, &est.ExceptionHash, &est.StackTrace,&est.RecordedAt, &scopeJSON, &est.AppVersion, &est.ServerName, &isMessage)if err != nil {diff --git a/backend/app/repositories/segment.repository.go b/backend/app/repositories/segment.repository.goindex 14e9c437..ddd48b3c 100644--- a/backend/app/repositories/segment.repository.go+++ b/backend/app/repositories/segment.repository.go@@ -17,7 +17,7 @@ func (r *segmentRepository) InsertAsync(ctx context.Context, segments []models.S}batch, err := (*chdb.Conn).PrepareBatch(clickhouse.Context(context.Background(), clickhouse.WithAsync(false)),- "INSERT INTO segments (id, transaction_id, project_id, name, start_time, duration, recorded_at)")+ "INSERT INTO segments (id, trace_id, project_id, name, start_time, duration, recorded_at)")if err != nil {return err}@@ -25,7 +25,7 @@ func (r *segmentRepository) InsertAsync(ctx context.Context, segments []models.Sfor _, s := range segments {if err := batch.Append(s.Id,- s.TransactionId,+ s.TraceId,s.ProjectId,s.Name,s.StartTime,@@ -39,14 +39,14 @@ func (r *segmentRepository) InsertAsync(ctx context.Context, segments []models.Sreturn batch.Send()}-func (r *segmentRepository) FindByTransactionId(ctx context.Context, projectId, transactionId uuid.UUID) ([]models.Segment, error) {+func (r *segmentRepository) FindByTraceId(ctx context.Context, projectId, traceId uuid.UUID) ([]models.Segment, error) {query := `SELECT- id, transaction_id, project_id, name, start_time, duration, recorded_at+ id, trace_id, project_id, name, start_time, duration, recorded_atFROM segments- WHERE project_id = ? AND transaction_id = ?+ WHERE project_id = ? AND trace_id = ?ORDER BY start_time ASC`- rows, err := (*chdb.Conn).Query(ctx, query, projectId, transactionId)+ rows, err := (*chdb.Conn).Query(ctx, query, projectId, traceId)if err != nil {return nil, err}@@ -56,7 +56,7 @@ func (r *segmentRepository) FindByTransactionId(ctx context.Context, projectId,for rows.Next() {var s models.Segmentif err := rows.Scan(- &s.Id, &s.TransactionId, &s.ProjectId,+ &s.Id, &s.TraceId, &s.ProjectId,&s.Name, &s.StartTime, &s.Duration, &s.RecordedAt,); err != nil {return nil, errdiff --git a/frontend/src/lib/components/issues/event-card.svelte b/frontend/src/lib/components/issues/event-card.svelteindex 52628d18..db57c7b0 100644--- a/frontend/src/lib/components/issues/event-card.svelte+++ b/frontend/src/lib/components/issues/event-card.svelte@@ -3,7 +3,7 @@import { Button } from "$lib/components/ui/button";import * as Card from "$lib/components/ui/card";import { ArrowRight } from "lucide-svelte";- import type { ExceptionOccurrence, LinkedTransaction } from '$lib/types/exceptions';+ import type { ExceptionOccurrence, LinkedTrace } from '$lib/types/exceptions';import { formatDuration, getStatusColor, formatDateTime } from '$lib/utils/formatters';import { getTimezone } from '$lib/state/timezone.svelte';import { ContextGrid } from '$lib/components/ui/context-grid';@@ -11,7 +11,7 @@interface Props {occurrence: ExceptionOccurrence;- linkedTransaction: LinkedTransaction | null;+ linkedTrace: LinkedTrace | null;title?: string;description?: string;timezone?: string;@@ -19,7 +19,7 @@let {occurrence,- linkedTransaction,+ linkedTrace,title = "Event",description = "Details for this specific occurrence",timezone@@ -49,8 +49,8 @@<p class="font-mono text-sm">{occurrence.appVersion || '-'}</p></div><div class="space-y-1">- <p class="text-sm text-muted-foreground">Transaction</p>- <p class="font-mono text-sm">{occurrence.transactionId || '-'}</p>+ <p class="text-sm text-muted-foreground">Trace</p>+ <p class="font-mono text-sm">{occurrence.traceId || '-'}</p></div></div>@@ -63,47 +63,47 @@</div>{/if}- <!-- Related Transaction -->- {#if linkedTransaction}+ <!-- Related Trace -->+ {#if linkedTrace}<hr class="border-border" /><div><p class="text-sm font-medium mb-3">- {linkedTransaction.transactionType === 'task' ? 'Related Task' : 'Related Endpoint'}+ {linkedTrace.traceType === 'task' ? 'Related Task' : 'Related Endpoint'}</p><div class="grid grid-cols-2 gap-4 md:grid-cols-4 mb-4"><LabelValue- label={linkedTransaction.transactionType === 'task' ? 'Task' : 'Endpoint'}- value={linkedTransaction.endpoint}+ label={linkedTrace.traceType === 'task' ? 'Task' : 'Endpoint'}+ value={linkedTrace.endpoint}mono/>- {#if linkedTransaction.transactionType !== 'task'}+ {#if linkedTrace.traceType !== 'task'}<LabelValuelabel="Status"- value={linkedTransaction.statusCode}+ value={linkedTrace.statusCode}monolarge- valueClass={getStatusColor(linkedTransaction.statusCode)}+ valueClass={getStatusColor(linkedTrace.statusCode)}/>{/if}<LabelValuelabel="Duration"- value={formatDuration(linkedTransaction.duration)}+ value={formatDuration(linkedTrace.duration)}monolarge/><LabelValuelabel="Recorded At"- value={formatDateTime(linkedTransaction.recordedAt, { timezone })}+ value={formatDateTime(linkedTrace.recordedAt, { timezone })}mono/></div>- {#if linkedTransaction.transactionType === 'task'}- <Button variant="outline" size="sm" onclick={() => goto(`/tasks/${encodeURIComponent(linkedTransaction.endpoint)}/${linkedTransaction.id}?preset=24h`)}>+ {#if linkedTrace.traceType === 'task'}+ <Button variant="outline" size="sm" onclick={() => goto(`/tasks/${encodeURIComponent(linkedTrace.endpoint)}/${linkedTrace.id}?preset=24h`)}>View Task Details<ArrowRight class="ml-2 h-4 w-4" /></Button>{:else}- <Button variant="outline" size="sm" onclick={() => goto(`/endpoints/${encodeURIComponent(linkedTransaction.endpoint)}/${linkedTransaction.id}?preset=24h`)}>+ <Button variant="outline" size="sm" onclick={() => goto(`/endpoints/${encodeURIComponent(linkedTrace.endpoint)}/${linkedTrace.id}?preset=24h`)}>View Endpoint Details<ArrowRight class="ml-2 h-4 w-4" /></Button>diff --git a/frontend/src/lib/components/issues/events-table.svelte b/frontend/src/lib/components/issues/events-table.svelteindex 8e2c7fef..f8147ca7 100644--- a/frontend/src/lib/components/issues/events-table.svelte+++ b/frontend/src/lib/components/issues/events-table.svelte@@ -60,8 +60,8 @@tooltip="Server instance where error occurred"/><TracewayTableHeader- label="Transaction"- tooltip="Transaction ID if this occurred during a request"+ label="Trace"+ tooltip="Trace ID if this occurred during a request"/></Table.Row></Table.Header>@@ -85,7 +85,7 @@{occurrence.serverName || '-'}</Table.Cell><Table.Cell class="font-mono text-sm">- {occurrence.transactionId || '-'}+ {occurrence.traceId || '-'}</Table.Cell></Table.Row>{/each}diff --git a/frontend/src/lib/components/segments/segment-row.svelte b/frontend/src/lib/components/segments/segment-row.svelteindex ddf72abf..7303ce16 100644--- a/frontend/src/lib/components/segments/segment-row.svelte+++ b/frontend/src/lib/components/segments/segment-row.svelte@@ -9,8 +9,8 @@type Props = {row: number;segment: Segment;- transactionStart: number;- transactionDuration: number;+ traceStart: number;+ traceDuration: number;isOdd: boolean;nameColumnWidth: number;updateNameWidth: (width: number) => void;@@ -23,8 +23,8 @@let {row,segment,- transactionStart,- transactionDuration,+ traceStart,+ traceDuration,isOdd,nameColumnWidth,updateNameWidth,@@ -33,14 +33,14 @@segmentCellHandleMouseLeave}: Props = $props();- const segmentStartMs = $derived(new Date(segment.startTime).getTime() - transactionStart);+ const segmentStartMs = $derived(new Date(segment.startTime).getTime() - traceStart);const segmentDurationMs = $derived(segment.duration / 1_000_000);- const transactionDurationMs = $derived(transactionDuration / 1_000_000);+ const traceDurationMs = $derived(traceDuration / 1_000_000);// Calculate position and width as percentages- const leftPercent = $derived(Math.max(0, (segmentStartMs / transactionDurationMs) * 100));+ const leftPercent = $derived(Math.max(0, (segmentStartMs / traceDurationMs) * 100));const widthPercent = $derived(- Math.min(100 - leftPercent, (segmentDurationMs / transactionDurationMs) * 100)+ Math.min(100 - leftPercent, (segmentDurationMs / traceDurationMs) * 100));const segmentColors = [diff --git a/frontend/src/lib/components/segments/segment-waterfall.svelte b/frontend/src/lib/components/segments/segment-waterfall.svelteindex 3c31c340..c339a60f 100644--- a/frontend/src/lib/components/segments/segment-waterfall.svelte+++ b/frontend/src/lib/components/segments/segment-waterfall.svelte@@ -5,21 +5,21 @@type Props = {segments: Segment[];- transactionDuration: number;- transactionStartTime: string;+ traceDuration: number;+ traceStartTime: string;};- let { segments, transactionDuration, transactionStartTime }: Props = $props();+ let { segments, traceDuration, traceStartTime }: Props = $props();- const transactionStart = $derived(+ const traceStart = $derived(segments.length === 0- ? new Date(transactionStartTime).getTime()+ ? new Date(traceStartTime).getTime(): segments.reduce((earliest, seg) => {const segTime = new Date(seg.startTime).getTime();return segTime < earliest ? segTime : earliest;}, new Date(segments[0].startTime).getTime()));- const durationMs = $derived(transactionDuration / 1_000_000);+ const durationMs = $derived(traceDuration / 1_000_000);let nameColumnWidth = $state(180); // default minimum@@ -82,8 +82,8 @@<SegmentRowrow={i}{segment}- {transactionStart}- {transactionDuration}+ {traceStart}+ {traceDuration}isOdd={i % 2 === 1}{nameColumnWidth}{updateNameWidth}diff --git a/frontend/src/lib/types/exceptions.ts b/frontend/src/lib/types/exceptions.tsindex 129e0e58..37394acc 100644--- a/frontend/src/lib/types/exceptions.ts+++ b/frontend/src/lib/types/exceptions.ts@@ -8,8 +8,8 @@ export type ExceptionGroup = {export type ExceptionOccurrence = {id: string;- transactionId: string | null;- transactionType: 'endpoint' | 'task';+ traceId: string | null;+ traceType: 'endpoint' | 'task';exceptionHash: string;stackTrace: string;recordedAt: string;@@ -20,11 +20,11 @@ export type ExceptionOccurrence = {endpoint: string;};-export type LinkedTransaction = {+export type LinkedTrace = {id: string;endpoint: string;duration: number;statusCode: number;recordedAt: string;- transactionType: 'endpoint' | 'task';+ traceType: 'endpoint' | 'task';};diff --git a/frontend/src/lib/types/segments.ts b/frontend/src/lib/types/segments.tsindex 60e7ea55..33c8f1ed 100644--- a/frontend/src/lib/types/segments.ts+++ b/frontend/src/lib/types/segments.ts@@ -1,6 +1,6 @@export type Segment = {id: string;- transactionId: string;+ traceId: string;projectId: string;name: string;startTime: string; // ISO datetime@@ -8,7 +8,7 @@ export type Segment = {recordedAt: string;};-export type TransactionDetail = {+export type TraceDetail = {id: string;projectId: string;endpoint: string;@@ -36,8 +36,8 @@ export type MessageInfo = {scope?: Record<string, string>;};-export type TransactionDetailResponse = {- endpoint: TransactionDetail;+export type TraceDetailResponse = {+ endpoint: TraceDetail;segments: Segment[];hasSegments: boolean;exception?: ExceptionInfo;diff --git a/frontend/src/routes/endpoints/[endpoint]/+page.svelte b/frontend/src/routes/endpoints/[endpoint]/+page.svelteindex 76475353..b4c08dab 100644--- a/frontend/src/routes/endpoints/[endpoint]/+page.svelte+++ b/frontend/src/routes/endpoints/[endpoint]/+page.svelte@@ -35,7 +35,7 @@const timezone = $derived(getTimezone());- type Transaction = {+ type EndpointInstance = {id: string;endpoint: string;duration: number;@@ -63,7 +63,7 @@let { data } = $props();- let transactions = $state<Transaction[]>([]);+ let transactions = $state<EndpointInstance[]>([]);let stats = $state<EndpointStats | null>(null);let loading = $state(true);let error = $state('');@@ -226,19 +226,19 @@<ErrorDisplaystatus={404}title="Endpoint Not Found"- description="The endpoint you're looking for doesn't exist or has no recorded transactions."+ description="The endpoint you're looking for doesn't exist or has no recorded traces."onBack={createSmartBackHandler({ fallbackPath: resolve('/endpoints') })}- backLabel="Back to Transactions"+ backLabel="Back to Endpoints"onRetry={() => loadData(false)}identifier={decodeURIComponent(data.endpoint)}/>{:else if error && !loading}<ErrorDisplaystatus={errorStatus === 400 ? 400 : errorStatus === 422 ? 422 : 400}- title="Failed to Load Transactions"+ title="Failed to Load Traces"description={error}onBack={createSmartBackHandler({ fallbackPath: resolve('/endpoints') })}- backLabel="Back to Transactions"+ backLabel="Back to Endpoints"onRetry={() => loadData(false)}/>{:else}@@ -247,7 +247,7 @@<PageHeadertitle={decodeURIComponent(data.endpoint)}- subtitle="Transaction instances for this endpoint"+ subtitle="Trace instances for this endpoint"onBack={createSmartBackHandler({ fallbackPath: resolve("/endpoints") })}/>@@ -301,7 +301,7 @@</div>{/if}- <!-- Transactions Table -->+ <!-- Traces Table --><div class="rounded-md border overflow-hidden"><Table.Root>{#if loading || transactions.length > 0}@@ -356,7 +356,7 @@</Table.Cell></Table.Row>{:else if transactions.length === 0}- <TableEmptyState colspan={8} message="No transactions found in this time range." />+ <TableEmptyState colspan={8} message="No traces found in this time range." />{:else}{#each transactions as transaction}<Table.Rowdiff --git a/frontend/src/routes/endpoints/[endpoint]/[endpointId]/+page.svelte b/frontend/src/routes/endpoints/[endpoint]/[endpointId]/+page.svelteindex 6936a95a..c21f67f9 100644--- a/frontend/src/routes/endpoints/[endpoint]/[endpointId]/+page.svelte+++ b/frontend/src/routes/endpoints/[endpoint]/[endpointId]/+page.svelte@@ -15,7 +15,7 @@import { ContextGrid } from '$lib/components/ui/context-grid';import SegmentWaterfall from '$lib/components/segments/segment-waterfall.svelte';import SegmentEmptyState from '$lib/components/segments/segment-empty-state.svelte';- import type { TransactionDetailResponse } from '$lib/types/segments';+ import type { TraceDetailResponse } from '$lib/types/segments';import PageHeader from '$lib/components/issues/page-header.svelte';import { createSmartBackHandler } from '$lib/utils/back-navigation';import { resolve } from '$app/paths';@@ -24,7 +24,7 @@const timezone = $derived(getTimezone());- let response = $state<TransactionDetailResponse | null>(null);+ let response = $state<TraceDetailResponse | null>(null);let loading = $state(true);let error = $state('');let notFound = $state(false);@@ -261,8 +261,8 @@{#if response.hasSegments}<SegmentWaterfallsegments={response.segments}- transactionDuration={response.endpoint.duration}- transactionStartTime={response.endpoint.recordedAt}+ traceDuration={response.endpoint.duration}+ traceStartTime={response.endpoint.recordedAt}/>{:else}<SegmentEmptyState framework={projectsState.currentProject?.framework ?? 'gin'} />diff --git a/frontend/src/routes/issues/[exceptionHash]/+page.svelte b/frontend/src/routes/issues/[exceptionHash]/+page.svelteindex c0ebbabd..69adb931 100644--- a/frontend/src/routes/issues/[exceptionHash]/+page.svelte+++ b/frontend/src/routes/issues/[exceptionHash]/+page.svelte@@ -14,7 +14,7 @@import type {ExceptionGroup,ExceptionOccurrence,- LinkedTransaction+ LinkedTrace} from '$lib/types/exceptions';import { createSmartBackHandler } from '$lib/utils/back-navigation';import { resolve } from '$app/paths';@@ -25,7 +25,7 @@let error = $state('');let notFound = $state(false);let total = $state(0);- let linkedTransaction = $state<LinkedTransaction | null>(null);+ let linkedTrace = $state<LinkedTrace | null>(null);let showArchiveDialog = $state(false);let archiving = $state(false);@@ -39,7 +39,7 @@loading = true;error = '';notFound = false;- linkedTransaction = null;+ linkedTrace = null;try {const exceptionHash = page.params.exceptionHash;@@ -58,30 +58,30 @@occurrences = response.occurrences || [];total = response.pagination.total;- // Load linked transaction if the latest occurrence has a transactionId+ // Load linked trace if the latest occurrence has a traceIdconst firstOccurrence = occurrences[0];- if (firstOccurrence?.transactionId) {+ if (firstOccurrence?.traceId) {try {- const isTask = firstOccurrence.transactionType === 'task';+ const isTask = firstOccurrence.traceType === 'task';const endpoint = isTask ? '/tasks' : '/endpoints';const txResponse = await api.post(- `${endpoint}/${firstOccurrence.transactionId}`,+ `${endpoint}/${firstOccurrence.traceId}`,{},{ projectId: projectsState.currentProjectId ?? undefined });const txData = isTask ? txResponse.task : txResponse.endpoint;if (txData) {- linkedTransaction = {+ linkedTrace = {id: txData.id,endpoint: isTask ? txData.taskName : txData.endpoint,duration: txData.duration,statusCode: txData.statusCode || 0,recordedAt: txData.recordedAt,- transactionType: isTask ? 'task' : 'endpoint'+ traceType: isTask ? 'task' : 'endpoint'};}} catch (txError) {- console.warn('Could not load linked transaction:', txError);+ console.warn('Could not load linked trace:', txError);}}} catch (e: any) {@@ -165,7 +165,7 @@{#if latestOccurrence}<EventCardoccurrence={latestOccurrence}- {linkedTransaction}+ {linkedTrace}title="Last Event"description="Details from the most recent occurrence of this exception"/>diff --git a/frontend/src/routes/issues/[exceptionHash]/[exceptionId]/+page.svelte b/frontend/src/routes/issues/[exceptionHash]/[exceptionId]/+page.svelteindex 9c6dbe07..c75a4c52 100644--- a/frontend/src/routes/issues/[exceptionHash]/[exceptionId]/+page.svelte+++ b/frontend/src/routes/issues/[exceptionHash]/[exceptionId]/+page.svelte@@ -7,7 +7,7 @@import { getTimezone } from '$lib/state/timezone.svelte';import { formatDateTime } from '$lib/utils/formatters';import { StackTraceCard, EventCard, EventsTable, PageHeader } from '$lib/components/issues';- import type { ExceptionGroup, ExceptionOccurrence, LinkedTransaction } from '$lib/types/exceptions';+ import type { ExceptionGroup, ExceptionOccurrence, LinkedTrace } from '$lib/types/exceptions';import { createSmartBackHandler } from '$lib/utils/back-navigation';import { resolve } from '$app/paths';import ArchiveConfirmationDialog from '$lib/components/archive-confirmation-dialog.svelte';@@ -25,7 +25,7 @@let error = $state('');let notFound = $state(false);let total = $state(0);- let linkedTransaction = $state<LinkedTransaction | null>(null);+ let linkedTrace = $state<LinkedTrace | null>(null);let showArchiveDialog = $state(false);let archiving = $state(false);@@ -39,7 +39,7 @@loading = true;error = '';notFound = false;- linkedTransaction = null;+ linkedTrace = null;try {// Load the specific exception by ID@@ -63,37 +63,37 @@allOccurrences = response.occurrences || [];total = response.pagination.total;- // Load linked transaction if this occurrence has a transactionId- if (occurrence.transactionId) {+ // Load linked trace if this occurrence has a traceId+ if (occurrence.traceId) {try {- const isTask = occurrence.transactionType === 'task';- console.log('DEBUG linked transaction:', {- transactionId: occurrence.transactionId,- transactionType: occurrence.transactionType,+ const isTask = occurrence.traceType === 'task';+ console.log('DEBUG linked trace:', {+ traceId: occurrence.traceId,+ traceType: occurrence.traceType,isTask});const endpoint = isTask ? '/tasks' : '/endpoints';const txResponse = await api.post(- `${endpoint}/${occurrence.transactionId}`,+ `${endpoint}/${occurrence.traceId}`,{},{ projectId: projectsState.currentProjectId ?? undefined });const txData = isTask ? txResponse.task : txResponse.endpoint;if (txData) {- linkedTransaction = {+ linkedTrace = {id: txData.id,endpoint: isTask ? txData.taskName : txData.endpoint,duration: txData.duration,statusCode: txData.statusCode || 0,recordedAt: txData.recordedAt,- transactionType: isTask ? 'task' : 'endpoint'+ traceType: isTask ? 'task' : 'endpoint'};}} catch (txError) {- console.error('Failed to load linked transaction:', {+ console.error('Failed to load linked trace:', {error: txError,- transactionId: occurrence.transactionId,- transactionType: occurrence.transactionType+ traceId: occurrence.traceId,+ traceType: occurrence.traceType});}}@@ -171,7 +171,7 @@<EventCard{occurrence}- {linkedTransaction}+ {linkedTrace}title="Event"description="Details for this specific occurrence"/>diff --git a/frontend/src/routes/issues/[exceptionHash]/events/+page.svelte b/frontend/src/routes/issues/[exceptionHash]/events/+page.svelteindex cba8f729..9d5c8219 100644--- a/frontend/src/routes/issues/[exceptionHash]/events/+page.svelte+++ b/frontend/src/routes/issues/[exceptionHash]/events/+page.svelte@@ -34,7 +34,7 @@type ExceptionOccurrence = {id: string;- transactionId: string | null;+ traceId: string | null;exceptionHash: string;stackTrace: string;recordedAt: string;@@ -205,8 +205,8 @@tooltip="Server instance where error occurred"/><TracewayTableHeader- label="Transaction"- tooltip="Transaction ID if this occurred during a request"+ label="Trace"+ tooltip="Trace ID if this occurred during a request"/></Table.Row></Table.Header>@@ -233,7 +233,7 @@{occurrence.serverName || '-'}</Table.Cell><Table.Cell class="font-mono text-sm">- {occurrence.transactionId || '-'}+ {occurrence.traceId || '-'}</Table.Cell></Table.Row>{/each}diff --git a/frontend/src/routes/tasks/[task]/[taskId]/+page.svelte b/frontend/src/routes/tasks/[task]/[taskId]/+page.svelteindex efb41ddc..2bc34b95 100644--- a/frontend/src/routes/tasks/[task]/[taskId]/+page.svelte+++ b/frontend/src/routes/tasks/[task]/[taskId]/+page.svelte@@ -259,8 +259,8 @@{#if response.hasSegments}<SegmentWaterfallsegments={response.segments}- transactionDuration={response.task.duration}- transactionStartTime={response.task.recordedAt}+ traceDuration={response.task.duration}+ traceStartTime={response.task.recordedAt}/>{:else}<SegmentEmptyState framework={projectsState.currentProject?.framework ?? 'gin'} />