Skip to content

Commit

Permalink
build(deps): bump io.opentelemetry.javaagent:opentelemetry-javaagent …
Browse files Browse the repository at this point in the history
…from 2.4.0 to 2.5.0 (#271)

* build(deps): bump io.opentelemetry.javaagent:opentelemetry-javaagent

Bumps [io.opentelemetry.javaagent:opentelemetry-javaagent](https://github.com/open-telemetry/opentelemetry-java-instrumentation) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-java-instrumentation@v2.4.0...v2.5.0)

---
updated-dependencies:
- dependency-name: io.opentelemetry.javaagent:opentelemetry-javaagent
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix test

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ndr_brt <[email protected]>
  • Loading branch information
dependabot[bot] and ndr-brt authored Jul 1, 2024
1 parent 489b421 commit f1d9077
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
2 changes: 1 addition & 1 deletion advanced/advanced-01-open-telemetry/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
- "29194:29194"
environment:
EDC_HOSTNAME: consumer
OTEL_SERVICE_NAME: provider
OTEL_SERVICE_NAME: consumer
OTEL_LOGS_EXPORTER: none
OTEL_JAVAAGENT_EXTENSIONS: /app/opentelemetry-exporter-otlp.jar
OTEL_EXPORTER_OTLP_ENDPOINT: http://jaeger:4318
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM openjdk:17-slim

WORKDIR /app
COPY build/libs/opentelemetry-javaagent-2.4.0.jar /app/opentelemetry-javaagent.jar
COPY build/libs/opentelemetry-javaagent-2.5.0.jar /app/opentelemetry-javaagent.jar
COPY build/libs/opentelemetry-exporter-otlp-1.39.0.jar /app/opentelemetry-exporter-otlp.jar
COPY build/libs/connector.jar /app/connector.jar
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ junit-pioneer = { module = "org.junit-pioneer:junit-pioneer", version.ref = "jun
okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "okhttp-mockwebserver" }
opentelemetry-annotations = { module = "io.opentelemetry:opentelemetry-extension-annotations", version = "1.18.0" }
opentelemetry-exporter-otlp = { module = "io.opentelemetry:opentelemetry-exporter-otlp", version = "1.39.0" }
opentelemetry-javaagent = { module = "io.opentelemetry.javaagent:opentelemetry-javaagent", version = "2.4.0" }
opentelemetry-javaagent = { module = "io.opentelemetry.javaagent:opentelemetry-javaagent", version = "2.5.0" }
restAssured = { module = "io.rest-assured:rest-assured", version.ref = "restAssured" }
testcontainers = { module = "org.testcontainers:testcontainers", version.ref = "testcontainers" }
testcontainers-junit-jupiter = { module = "org.testcontainers:junit-jupiter", version.ref = "testcontainers" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,14 @@

package org.eclipse.edc.samples.advanced;

import org.apache.http.HttpStatus;
import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.testcontainers.containers.ComposeContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import static io.restassured.RestAssured.given;
import static org.eclipse.edc.connector.controlplane.transfer.spi.types.TransferProcessStates.STARTED;
import static org.eclipse.edc.samples.common.FileTransferCommon.getFileContentFromRelativePath;
import static org.eclipse.edc.samples.common.FileTransferCommon.getFileFromRelativePath;
Expand All @@ -54,16 +47,11 @@ public class Advanced01openTelemetryTest {
private static final String JAEGER_URL = "http://localhost:16686";

@Container
public static ComposeContainer environment =
public ComposeContainer environment =
new ComposeContainer(getFileFromRelativePath(DOCKER_COMPOSE_YAML))
.withLocalCompose(true)
.waitingFor("consumer", Wait.forLogMessage(".*ready.*", 1));

@BeforeAll
static void setUp() {
environment.start();
}

@Test
void runSampleSteps() {
createAsset();
Expand All @@ -75,16 +63,11 @@ void runSampleSteps() {
var transferRequest = getFileContentFromRelativePath(START_TRANSFER_FILE_PATH);
var transferProcessId = startTransfer(transferRequest, contractAgreementId);
checkTransferStatus(transferProcessId, STARTED);
assertJaegerState();
}

private void assertJaegerState() {
try {
var url = new URL(JAEGER_URL);
var huc = (HttpURLConnection) url.openConnection();
assertThat(huc.getResponseCode()).isEqualTo(HttpStatus.SC_OK);
} catch (IOException e) {
fail("Unable to assert Jaeger state", e);
}
given()
.baseUri(JAEGER_URL)
.get()
.then()
.statusCode(200);
}
}

0 comments on commit f1d9077

Please sign in to comment.