Hi team - thanks for a great product. I have a que...
# general
b
Hi team - thanks for a great product. I have a question regarding trace and logs. Is there a way I can get the trace with an api, as it is happening, and not have to wait for a minute or 2 ? I know the trace id
s
This is not possible, because opentelemetry only exports spans that have been completed.
b
@Srikanth Chekuri - thank you ! Is this what might be causing the delay in seeing the trace ?
Copy code
BatchSpanProcessor...
        .setScheduleDelay(10, TimeUnit.SECONDS)
        .build();
s
Ok, just want to make sure I follow you correctly. Please clarify what you mean by as it is happening.
b
as of now, it takes time for the trace to show up after it has completed. Was wondering, if it happens, because we have set a delay of 10S in the BatchProcessor . I am wondering if the time to send the span to the collector could be upto 10S ?
s
There is a batch at a number of places to improve the throughput. It happens at application, and collector.
b
okay
So if I am developing and I want to show the output immediately after execution, is there any way ?
s
By developing, did you mean the dev environment?
b
I am running a service in my dev environment, and send a request, I would like to see the trace, as it happens, or as soon as it is finished. As it happens would be great (much like log tailing), if not as soon as it happens is also doable. But with the current setup, it takes a while to reflect (10 - 20s). If there is a way to wiretap it and show it to developers, as the transaction happens, it will just make the experience better for our use case
s
Don't use batching anywhere in the pipeline. Use a SimpleSpanProcessor instead of BatchSpanProcessor and remove the batch processor in collector. This setup will give you traces as quick as it can get. It will come with a cost, but as you mentioned, this is a dev environment, so it should be fine. I don't recommend this at all for production.
b
okay thank you, got it.