If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text
TIP 1: select at least one tag that further categorizes your topic. For example server
for APM Server related questions, java
for questions regarding the Elastic APM Java agent, or ui
for questions about the APM App within Kibana.
APM Server version: "version": "7.13.0"
APM Agent language and version: Java 11.0.19 apm agent 1.48.1
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
download page
Fresh install or upgraded from other version?
Fresh install
Is there anything special in your setup?
Nothing special in setup
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
I am trying to set up some custom instrumentation and tracing
and i know for a fact that the method i am trying to instrument is an async operation since its is called in a background thread always.
I want to show the async badge in apm by some how setting the sync=false in the span but the Elastic apm api does not expose any method to modify this span and make it sync=false.
all i can do is set some label but then those don't show up in the apm ui with the async badge.
private <T> Callable<T> wrapTask(Callable<T> delegate) {
return () -> {
log.info("setting config refresh label to sync false");
final Span span = ElasticApm.currentSpan();
span.setLabel("sync", false);
final T call = delegate.call();
log.info("setting this to sync ");
return call;
};
}