Skip to content

Commit

Permalink
[WFLY-19449] opentelemetry-tracing Quickstarts should have a root web…
Browse files Browse the repository at this point in the history
…page similar to helloworld
  • Loading branch information
sudeshnas93 committed Jun 23, 2024
1 parent 741125f commit 2e88bf0
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
import jakarta.ws.rs.core.Application;

@ApplicationScoped
@ApplicationPath("/")
@ApplicationPath("/rest")
public class JakartaRestApplication extends Application {
}
28 changes: 28 additions & 0 deletions opentelemetry-tracing/src/main/webapp/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
JBoss, Home of Professional Open Source
Copyright 2024, Red Hat, Inc. and/or its affiliates, and individual
contributors by the @authors tag. See the copyright.txt in the
distribution for a full listing of individual contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html>
<title>opentelemetry-tracing</title>
<body>
<div style="text-align:center">

<h1>Hello There! Welcome to WildFly!</h1>
<h2>The opentelemetry-tracing application has been deployed and running successfully.</h2>

</div>
</body>

</html>
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void testImplicit() throws IOException, InterruptedException, URISyntaxEx
String applicationUrl = BasicRuntimeIT.getApplicationUrl();

final HttpClient client = BasicRuntimeIT.getHttpClient();
final HttpRequest implicit = HttpRequest.newBuilder().uri(new URI(applicationUrl + "/implicit-trace")).GET().build();
final HttpRequest implicit = HttpRequest.newBuilder().uri(new URI(applicationUrl + "/rest/implicit-trace")).GET().build();
assertEquals(200, client.send(implicit, HttpResponse.BodyHandlers.ofString()).statusCode());
}

Expand All @@ -41,7 +41,7 @@ public void testExplicit() throws IOException, InterruptedException, URISyntaxEx
String applicationUrl = BasicRuntimeIT.getApplicationUrl();

final HttpClient client = BasicRuntimeIT.getHttpClient();
final HttpRequest implicit = HttpRequest.newBuilder().uri(new URI(applicationUrl + "/explicit-trace")).GET().build();
final HttpRequest implicit = HttpRequest.newBuilder().uri(new URI(applicationUrl + "/rest/explicit-trace")).GET().build();
assertEquals(200, client.send(implicit, HttpResponse.BodyHandlers.ofString()).statusCode());
}
}

0 comments on commit 2e88bf0

Please sign in to comment.