Skip to content

Commit 8412516

Browse files
committed
more
1 parent 0d26f9e commit 8412516

File tree

2 files changed

+14
-0
lines changed
  • instrumentation/jaxrs
    • jaxrs-2.0/jaxrs-2.0-common/testing/src/main/java/io/opentelemetry/instrumentation/jaxrs/v2_0/test
    • jaxrs-3.0/jaxrs-3.0-common/testing/src/main/java/io/opentelemetry/instrumentation/jaxrs/v3_0/test

2 files changed

+14
-0
lines changed

instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0-common/testing/src/main/java/io/opentelemetry/instrumentation/jaxrs/v2_0/test/Resource.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55

66
package io.opentelemetry.instrumentation.jaxrs.v2_0.test;
77

8+
import static javax.ws.rs.core.MediaType.TEXT_PLAIN;
9+
810
import javax.ws.rs.POST;
911
import javax.ws.rs.Path;
1012
import javax.ws.rs.PathParam;
13+
import javax.ws.rs.Produces;
1114

1215
@Path("/ignored")
1316
public interface Resource {
@@ -24,6 +27,7 @@ interface SubResource extends Cloneable, Resource {
2427

2528
class Test1 implements SubResource {
2629
@Override
30+
@Produces(TEXT_PLAIN)
2731
public String hello(String name) {
2832
return "Test1 " + name + "!";
2933
}
@@ -32,6 +36,7 @@ public String hello(String name) {
3236
@Path("/test2")
3337
class Test2 implements SubResource {
3438
@Override
39+
@Produces(TEXT_PLAIN)
3540
public String hello(String name) {
3641
return "Test2 " + name + "!";
3742
}
@@ -42,12 +47,14 @@ class Test3 implements SubResource {
4247
@Override
4348
@POST
4449
@Path("/hi/{name}")
50+
@Produces(TEXT_PLAIN)
4551
public String hello(@PathParam("name") String name) {
4652
return "Test3 " + name + "!";
4753
}
4854

4955
@POST
5056
@Path("/nested")
57+
@Produces(TEXT_PLAIN)
5158
public String nested() {
5259
return hello("nested");
5360
}

instrumentation/jaxrs/jaxrs-3.0/jaxrs-3.0-common/testing/src/main/java/io/opentelemetry/instrumentation/jaxrs/v3_0/test/Resource.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55

66
package io.opentelemetry.instrumentation.jaxrs.v3_0.test;
77

8+
import static jakarta.ws.rs.core.MediaType.TEXT_PLAIN;
9+
810
import jakarta.ws.rs.POST;
911
import jakarta.ws.rs.Path;
1012
import jakarta.ws.rs.PathParam;
13+
import jakarta.ws.rs.Produces;
1114

1215
@Path("/ignored")
1316
public interface Resource {
@@ -24,6 +27,7 @@ interface SubResource extends Cloneable, Resource {
2427

2528
class Test1 implements SubResource {
2629
@Override
30+
@Produces(TEXT_PLAIN)
2731
public String hello(String name) {
2832
return "Test1 " + name + "!";
2933
}
@@ -32,6 +36,7 @@ public String hello(String name) {
3236
@Path("/test2")
3337
class Test2 implements SubResource {
3438
@Override
39+
@Produces(TEXT_PLAIN)
3540
public String hello(String name) {
3641
return "Test2 " + name + "!";
3742
}
@@ -42,12 +47,14 @@ class Test3 implements SubResource {
4247
@Override
4348
@POST
4449
@Path("/hi/{name}")
50+
@Produces(TEXT_PLAIN)
4551
public String hello(@PathParam("name") String name) {
4652
return "Test3 " + name + "!";
4753
}
4854

4955
@POST
5056
@Path("/nested")
57+
@Produces(TEXT_PLAIN)
5158
public String nested() {
5259
return hello("nested");
5360
}

0 commit comments

Comments
 (0)