DST instrumentation reporting

Updated at:

The server-side service for Distributed Tracing (DST) is no longer available and has been replaced by the distributed tracing service of Real-Time Monitoring Service (RMS). Instrumentation reporting continues to use the DST reporting plugin in SOFATracer.

Procedure

  1. Import the dependency.

    Add the SOFATracer dependency to your project:

    <dependency>
         <groupId>com.alipay.sofa</groupId>
         <artifactId>tracer-enterprise-sofa-boot-starter</artifactId>
     </dependency>

  2. Add the configuration.

    Add the required SOFATracer parameters to the application.properties file in your project:

    com.alipay.sofa.tracer.remote=dst
    com.alipay.sofa.tracer.dst.acvip=false   
    com.alipay.sofa.tracer.dst.url=http://<monitor-gateway-lb>/zipkin/api/v1/spans
    Note

    Because RMS is no longer part of the Finance Cloud middleware system and does not register with ACVIP, set com.alipay.sofa.tracer.dst.acvip to false and configure com.alipay.sofa.tracer.dst.url to use SLB for addressing.

  3. Report instrumentation data.

    Use the following code to trigger a SOFARPC REST instrumentation report:

    @Path("/sofarest")
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    @Produces(MediaType.APPLICATION_JSON + ";charset=UTF-8")
    public interface SampleRestFacade {
        /**
         * http://localhost:8341/sofarest/hello
         */
        @GET
        @Path("/hello")
        String hello();
    }
  4. Start the application.

    Access http://localhost:8341/sofarest/hello in your local browser.

  5. You can view the server-side display.

    Use the trace query feature in RMS to query the reported traces. For more information, see Trace query.

Configuration details

You can also configure the following parameters in the application.properties file as needed:

Parameter

Description

com.alipay.sofa.tracer.remote

The reporting type. Valid values are `dst` and `zipkin`.

To specify multiple types, separate them with a comma (,).

com.alipay.sofa.tracer.dst.acvip

Specifies whether to use ACVIP for addressing. Set this parameter to `false`.

com.alipay.sofa.tracer.dst.url

The destination URL. Use SLB for addressing.

com.alipay.sofa.tracer.dst.queueSize

The queue cache size. Default value: 65536.

com.alipay.sofa.tracer.dst.batchSize

The batch size for uploads. Default value: 255.

com.alipay.sofa.tracer.dst.concurrency

The number of concurrent uploads. Default value: 10.

com.alipay.sofa.tracer.dst.timeout

The timeout period. Reports that exceed this time will fail.

com.alipay.sofa.tracer.dst.retry

The number of retries for a failed upload. Default value: 1.