Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump io.opentelemetry.javaagent:opentelemetry-javaagent from 2.4.0 to 2.5.0 #271

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
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);
}
}
Loading