Skip to content

Commit

Permalink
Make parent trace names consistent between runs
Browse files Browse the repository at this point in the history
With tracing in newrelic, groups are done via the name on the parent trace. With each run having a unique name (due to the run ID being unique each time), it makes it hard to use the traces and compare runs over time. If the previous functionality is desired by consumers of this action, it is easy enough to restore by updating the GHA_RUN_NAME environment variable, which is only used in the context of the name of the parent trace.
  • Loading branch information
nsheaps authored Jul 10, 2024
1 parent e04acfe commit 625cf87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
workflow_run_atts = json.loads(get_workflow_run_by_run_id)
atts=parse_attributes(workflow_run_atts,"","workflow")
print("Processing Workflow ->",GHA_RUN_NAME,"run id ->",GHA_RUN_ID)
p_parent = tracer.start_span(name=str(GHA_RUN_NAME) + " - run: "+str(GHA_RUN_ID),attributes=atts,start_time=do_time(workflow_run_atts['run_started_at']),kind=trace.SpanKind.SERVER)
p_parent = tracer.start_span(name=str(GHA_RUN_NAME),attributes=atts,start_time=do_time(workflow_run_atts['run_started_at']),kind=trace.SpanKind.SERVER)

# Download logs
# Have to use python requests due to known issue with ghapi -> https://github.com/fastai/ghapi/issues/119
Expand Down

0 comments on commit 625cf87

Please sign in to comment.