src/main/java/com/linecorp/armeria/client/tracing/TracingRemoteInvoker.java
/**
     * Returns client side annotations that should be added to span.
     */
Returns client side annotations that should be added to span.
Returns client side annotations that should be added to span .
@SuppressWarnings("UnusedParameters")
    protected <T> List<KeyValueAnnotation> annotations(URI uri, ClientOptions options, ClientCodec codec,
                                                       Method method, Object[] args,
                                                       @Nullable Future<? super T> result) {
        final KeyValueAnnotation clientUriAnnotation = KeyValueAnnotation.create(
                "client.uri", uri.toString() + '#' + method.getName());
        if (result == null || !result.isDone()) {
            return Collections.singletonList(clientUriAnnotation);
        }
        final List<KeyValueAnnotation> annotations = new ArrayList<>(3);
        annotations.add(clientUriAnnotation);
        final String clientResultText = result.isSuccess() ? "success" : "failure";
        annotations.add(KeyValueAnnotation.create("client.result", clientResultText));
        if (result.cause() != null) {
            annotations.add(KeyValueAnnotation.create("client.cause", result.cause().toString()));
        }
        return annotations;
    }
@ SuppressWarnings ( "UnusedParameters" ) protected < T > List < KeyValueAnnotation > annotations ( URI uri , ClientOptions options , ClientCodec codec , Method method , Object [ ] args , @ Nullable Future < ? super T > result ) { final KeyValueAnnotation clientUriAnnotation = KeyValueAnnotation . create ( "client.uri" , uri . toString ( ) + '#' + method . getName ( ) ) ; if ( result == null || ! result . isDone ( ) ) { return Collections . singletonList ( clientUriAnnotation ) ; } final List < KeyValueAnnotation > annotations = new ArrayList < > ( 3 ) ; annotations . add ( clientUriAnnotation ) ; final String clientResultText = result . isSuccess ( ) ? "success" : "failure" ; annotations . add ( KeyValueAnnotation . create ( "client.result" , clientResultText ) ) ; if ( result . cause ( ) != null ) { annotations . add ( KeyValueAnnotation . create ( "client.cause" , result . cause ( ) . toString ( ) ) ) ; } return annotations ; }
Returns client side annotations that should be added to span.
Returns client side annotations that should be added to span .