diff --git a/spec/src/main/asciidoc/microprofile-opentracing.asciidoc b/spec/src/main/asciidoc/microprofile-opentracing.asciidoc index 9425b3a..c894996 100644 --- a/spec/src/main/asciidoc/microprofile-opentracing.asciidoc +++ b/spec/src/main/asciidoc/microprofile-opentracing.asciidoc @@ -133,8 +133,10 @@ The operation name can be configured via key `mp.opentracing.server.operation-na The implementation has to provide two operation name providers: * `class-method` - the provider for the default operation name. -* `http-path` - the operation name consists of values provided to `@Path` annotation. For example -if the class is annotated with `@Path(service)` and method `@Path(endpoint)` then the operation name is `/service/endpoint`. +* `http-path` - the operation name has the following form +`:<@Path value of endpoint's class>/<@Path value of endpoint's method>`. +For example if the class is annotated with `@Path(service)` and method `@Path(endpoint)` then +the operation name is `GET:/service/endpoint`. If no operation name provider is specified then `class-method` is used. diff --git a/tck/src/main/java/org/eclipse/microprofile/opentracing/tck/OpenTracingHTTPPathNameTests.java b/tck/src/main/java/org/eclipse/microprofile/opentracing/tck/OpenTracingHTTPPathNameTests.java index 9659eaa..3a092e2 100644 --- a/tck/src/main/java/org/eclipse/microprofile/opentracing/tck/OpenTracingHTTPPathNameTests.java +++ b/tck/src/main/java/org/eclipse/microprofile/opentracing/tck/OpenTracingHTTPPathNameTests.java @@ -75,7 +75,7 @@ public static WebArchive createDeployment() { @Override protected String getOperationName(String spanKind, String httpMethod, Class clazz, Method method) { if (spanKind.equals(Tags.SPAN_KIND_SERVER)) { - StringBuilder operationName = new StringBuilder(); + StringBuilder operationName = new StringBuilder(httpMethod.toUpperCase() + ":"); Path classPath = clazz.getAnnotation(Path.class); if (classPath == null) { throw new IllegalArgumentException("Supplied clazz is not JAX-RS resource");