Skip to content

Commit

Permalink
reduce method parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
casstait committed Sep 8, 2021
1 parent b9a06ff commit c72486c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ private void buildFinishedOrInterrupted (SRunningBuild build) {
Span span = this.otelHelper.getSpan(buildId);
Loggers.SERVER.debug("OTEL_PLUGIN: Build finished and span found for " + buildName);
try (Scope ignored = span.makeCurrent()){
createQueuedEventsSpans(build, buildName, span);
createBuildStepSpans(build, buildName, span);
createQueuedEventsSpans(build, span);
createBuildStepSpans(build, span);
setArtifactAttributes(build, span);

this.otelHelper.addAttributeToSpan(span, PluginConstants.ATTRIBUTE_SUCCESS_STATUS, build.getBuildStatus().isSuccessful());
Expand All @@ -185,10 +185,10 @@ private void buildFinishedOrInterrupted (SRunningBuild build) {
}
}

private void createQueuedEventsSpans(SRunningBuild build, String buildName, Span buildSpan) {
private void createQueuedEventsSpans(SRunningBuild build, Span buildSpan) {
long startDateTime = build.getQueuedDate().getTime();
Map<String, BigDecimal> reportedStatics = build.getStatisticValues();
Loggers.SERVER.info("OTEL_PLUGIN: Retrieving queued event spans for build " + buildName);
Loggers.SERVER.info("OTEL_PLUGIN: Retrieving queued event spans for build " + getBuildName(build));

for (Map.Entry<String,BigDecimal> entry : reportedStatics.entrySet()) {
String key = entry.getKey();
Expand All @@ -209,9 +209,9 @@ private void createQueuedEventsSpans(SRunningBuild build, String buildName, Span
}
}

private void createBuildStepSpans(SRunningBuild build, String buildName, Span buildSpan) {
private void createBuildStepSpans(SRunningBuild build, Span buildSpan) {
Map<String, Span> blockMessageSpanMap = new HashMap<>();
Loggers.SERVER.info("OTEL_PLUGIN: Retrieving build step event spans for build " + buildName);
Loggers.SERVER.info("OTEL_PLUGIN: Retrieving build step event spans for build " + getBuildName(build));
List<LogMessage> buildBlockLogs = getBuildBlockLogs(build);
for (LogMessage logMessage: buildBlockLogs) {
BlockLogMessage blockLogMessage = (BlockLogMessage) logMessage;
Expand Down

0 comments on commit c72486c

Please sign in to comment.