Skip to content

Commit

Permalink
Move injecting DD actions before BuildData initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-tkachenko-datadog committed Nov 14, 2024
1 parent c001b87 commit 436aa19
Showing 1 changed file with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,10 @@ public void onInitialize(Run run) {
}
logger.fine("Start DatadogBuildListener#onInitialize");

// Get Datadog Client Instance
DatadogClient client = getDatadogClient();
if (client == null) {
return;
}
run.addAction(new GitCommitAction());
run.addAction(new GitRepositoryAction());
run.addAction(new TraceInfoAction());
run.addAction(new PipelineQueueInfoAction());

// Collect Build Data
BuildData buildData;
Expand Down Expand Up @@ -123,11 +122,6 @@ public void onInitialize(Run run) {
final BuildSpanAction buildSpanAction = new BuildSpanAction(buildSpanContext, upstreamBuildSpanContext);
run.addAction(buildSpanAction);

run.addAction(new GitCommitAction());
run.addAction(new GitRepositoryAction());
run.addAction(new TraceInfoAction());
run.addAction(new PipelineQueueInfoAction());

logger.fine("End DatadogBuildListener#onInitialize");
} catch (Exception e) {
DatadogUtilities.severe(logger, e, "Failed to process build initialization");
Expand Down

0 comments on commit 436aa19

Please sign in to comment.