From 173b00a6299d29a0017aebded2bb22a8844ed20e Mon Sep 17 00:00:00 2001 From: dpacheconr Date: Tue, 17 Oct 2023 13:26:36 +0100 Subject: [PATCH 1/2] add debug log lines #6 --- src/exporter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/exporter.py b/src/exporter.py index 0497f3e..c5a927b 100644 --- a/src/exporter.py +++ b/src/exporter.py @@ -136,7 +136,8 @@ print("Error exporting log line ERROR: ", e) except IOError as e: print("Log file does not exist: "+str(job["name"])+"/"+str(step['number'])+"_"+str(step['name'].replace("/",""))+".txt") - + print("DEBUG:",step) + print("DEBUG:",job) child_1.end(end_time=do_time(step['completed_at'])) child_0.end(end_time=do_time(job['completed_at'])) workflow_run_finish_time=do_time(job['completed_at']) From db97333acb17828dee4a5c8af576832b09ba9cfa Mon Sep 17 00:00:00 2001 From: Diogo Pacheco <100862257+dpacheconr@users.noreply.github.com> Date: Fri, 10 Nov 2023 09:56:21 +0000 Subject: [PATCH 2/2] add workflow id as attribute to each step --- src/exporter.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/exporter.py b/src/exporter.py index c5a927b..657eb5d 100644 --- a/src/exporter.py +++ b/src/exporter.py @@ -101,7 +101,7 @@ # Steps trace span for step in job['steps']: # Set steps tracer and logger - resource_attributes ={SERVICE_NAME: GHA_SERVICE_NAME,"github.source": "github-exporter","github.resource.type": "span"} + resource_attributes ={SERVICE_NAME: GHA_SERVICE_NAME,"github.source": "github-exporter","github.resource.type": "span","workflow_run_id": GHA_RUN_ID} resource_log = Resource(attributes=resource_attributes) step_tracer = get_tracer(endpoint, headers, resource_log, "step_tracer") @@ -136,8 +136,7 @@ print("Error exporting log line ERROR: ", e) except IOError as e: print("Log file does not exist: "+str(job["name"])+"/"+str(step['number'])+"_"+str(step['name'].replace("/",""))+".txt") - print("DEBUG:",step) - print("DEBUG:",job) + child_1.end(end_time=do_time(step['completed_at'])) child_0.end(end_time=do_time(job['completed_at'])) workflow_run_finish_time=do_time(job['completed_at'])