From 6a7bacc15449588a6ee553eb0011410c743e144b Mon Sep 17 00:00:00 2001 From: traut Date: Fri, 30 Jan 2026 11:01:20 +0100 Subject: [PATCH 1/2] Print number of input/output bytes instead of raw bytes in the debug log message --- go/core/action.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/core/action.go b/go/core/action.go index 50c1aa63a5..2a048fc726 100644 --- a/go/core/action.go +++ b/go/core/action.go @@ -186,12 +186,12 @@ func (a *ActionDef[In, Out, Stream]) runWithTelemetry(ctx context.Context, input inputBytes, _ := json.Marshal(input) logger.FromContext(ctx).Debug("Action.Run", "name", a.Name(), - "input", inputBytes) + "input_bytes_count", len(inputBytes)) defer func() { outputBytes, _ := json.Marshal(output) logger.FromContext(ctx).Debug("Action.Run", "name", a.Name(), - "output", outputBytes, + "output_bytes_count", len(outputBytes), "err", err) }() From 3c1a74723e5edfedb3fee1d90dbd5ec5c24c9422 Mon Sep 17 00:00:00 2001 From: traut Date: Fri, 30 Jan 2026 11:13:55 +0100 Subject: [PATCH 2/2] Remove JSON marshaling that was used only for the debug messages --- go/core/action.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/go/core/action.go b/go/core/action.go index 2a048fc726..65613b6de2 100644 --- a/go/core/action.go +++ b/go/core/action.go @@ -183,15 +183,10 @@ func (a *ActionDef[In, Out, Stream]) Run(ctx context.Context, input In, cb Strea // Run executes the Action's function in a new trace span. func (a *ActionDef[In, Out, Stream]) runWithTelemetry(ctx context.Context, input In, cb StreamCallback[Stream]) (output api.ActionRunResult[Out], err error) { - inputBytes, _ := json.Marshal(input) - logger.FromContext(ctx).Debug("Action.Run", - "name", a.Name(), - "input_bytes_count", len(inputBytes)) + logger.FromContext(ctx).Debug("Action.Run", "name", a.Name()) defer func() { - outputBytes, _ := json.Marshal(output) logger.FromContext(ctx).Debug("Action.Run", "name", a.Name(), - "output_bytes_count", len(outputBytes), "err", err) }()