public Future<TokenUsage> getTokenStats(ProxyContext context) {
        return vertx.executeBlocking(() -> {
            ResourceDescriptor resource = toResource(context.getTraceId());
            String json = resourceService.getResource(resource);
            TraceContext traceContext = ProxyUtil.convertToObject(json, TraceContext.class);
            if (traceContext == null) {
                return null;
            }
            return traceContext.getStats(context);
        }, false);
    }
Starts current span.
<p>
    Note. The method is blocking and shouldn't be run in the event loop thread.
</p>
server/src/main/java/com/epam/aidial/core/server/token/TokenStatsTracker.java