From e9b75e92ebcd7a45ff982d7558b6bb4d52d32cde Mon Sep 17 00:00:00 2001 From: chandumlg <54652834+chandumlg@users.noreply.github.com> Date: Wed, 30 Nov 2022 13:01:09 +0530 Subject: [PATCH] chore: enhance transformer error with more metadata (#2742) --- processor/transformer/transformer.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/processor/transformer/transformer.go b/processor/transformer/transformer.go index 156c68e63d..f3b280cbf3 100644 --- a/processor/transformer/transformer.go +++ b/processor/transformer/transformer.go @@ -320,7 +320,14 @@ func (trans *HandleT) request(ctx context.Context, url string, data []Transforme }, endlessBackoff, func(err error, t time.Duration) { - trans.logger.Errorf("JS HTTP connection error: URL: %v Error: %+v", url, err) + var transformationID, transformationVersionID string + if len(data[0].Destination.Transformations) > 0 { + transformationID = data[0].Destination.Transformations[0].ID + transformationVersionID = data[0].Destination.Transformations[0].VersionID + } + trans.logger.Errorf("JS HTTP connection error: URL: %v Error: %+v. WorkspaceID: %s, sourceID: %s, destinationID: %s, transformationID: %s, transformationVersionID: %s", + url, err, data[0].Metadata.WorkspaceID, data[0].Metadata.SourceID, data[0].Metadata.DestinationID, + transformationID, transformationVersionID) }) // control plane back up