Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
<useBeta>true</useBeta>
<elasticstack.version>9.1.4</elasticstack.version>
<error-prone.version>2.41.0</error-prone.version>
<ban-commons-lang-2.skip>false</ban-commons-lang-2.skip>
<ban-commons-lang-2.skip>false</ban-commons-lang-2.skip>
<spotless.check.skip>false</spotless.check.skip>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -153,10 +154,6 @@
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-lang3-api</artifactId>
</dependency>
<dependency>
<groupId>co.elastic.clients</groupId>
<artifactId>elasticsearch-java</artifactId>
Expand Down Expand Up @@ -198,6 +195,10 @@
<groupId>io.jenkins.plugins</groupId>
<artifactId>apache-httpcomponents-client-5-api</artifactId>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-lang3-api</artifactId>
</dependency>
Comment on lines +198 to +201
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to answer #1213 (comment):

This was not moved out of dependency management. Just reordered within the <dependencies/> tag. Removed line here (156-159) were not in dependency management.


<dependency>
<groupId>io.jenkins.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package io.jenkins.plugins.opentelemetry;

import static org.awaitility.Awaitility.await;
import static org.hamcrest.Matchers.is;

import io.jenkins.plugins.opentelemetry.semconv.JenkinsMetrics;
import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.sdk.metrics.data.MetricData;
Expand All @@ -17,16 +20,15 @@
import org.jvnet.hudson.test.Issue;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.junit.jupiter.WithJenkins;
import static org.awaitility.Awaitility.await;
import static org.hamcrest.Matchers.is;

@WithJenkins
public class JenkinsOpenTelemetryPluginConfigurationIntegrationTest {
static {
OpenTelemetryConfiguration.TESTING_INMEMORY_MODE = true;
}

@BeforeEach() public void before() {
@BeforeEach()
public void before() {
GlobalOpenTelemetry.resetForTest();
}

Expand Down Expand Up @@ -60,7 +62,7 @@ private static String getServiceNameFromLastExportedMetric(String metricName) {
Map<String, MetricData> exportedMetrics = InMemoryMetricExporterUtils.getLastExportedMetricByMetricName(
InMemoryMetricExporterProvider.LAST_CREATED_INSTANCE.getFinishedMetricItems());
var metric = Optional.ofNullable(exportedMetrics.get(metricName));
return metric.map(m -> m.getResource().getAttributes().get(ServiceAttributes.SERVICE_NAME)).orElse(null);
return metric.map(m -> m.getResource().getAttributes().get(ServiceAttributes.SERVICE_NAME))
.orElse(null);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ public class JenkinsOtelPluginMBPIntegrationTest extends BaseIntegrationTest {
@Test
public void testMultibranchPipelineStep() throws Exception {
assumeFalse(SystemUtils.IS_OS_WINDOWS);
String pipelineScript =
"""
String pipelineScript = """
pipeline {
agent any
stages {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public void testNoOptionalParamsOnDeclarativePipeline() throws Exception {
+ " withNewSpan(label: 'run-builds') { }\n"
+ " }\n"
+ " }\n"
+" }\n"
+ " }\n"
+ "}";

pipeline.setDefinition(new CpsFlowDefinition(pipelineScript, true));
Expand Down
Loading