Ankit Bansal
Ankit Bansal

Reputation: 2358

Zipkin With Spring Boot

I am using spring boot and zipkin.

And using spring slueth to generate trace Id.

Is there a way I can generate this trace Id on my own?

Also I want to log only specific requests say with 500 error or response time > threshold, how to do this?

Upvotes: 1

Views: 154

Answers (1)

jramapurath
jramapurath

Reputation: 261

To log only request with particular error you can add the log in your exception mapper where you are handling those error.

To show the log for error response you can set like below,

    @Autowired
    private Tracer tracer;

and set

    tracer.addTag("error","Your message")

Upvotes: 1

Related Questions