synchronized void doAccept(List<Span> spans) {
    int delta = spans.size();
    acceptedSpanCount.addAndGet(delta);

    int spansToRecover = (spansByTraceIdTimestamp.size() + delta) - maxSpanCount;
    evictToRecoverSpans(spansToRecover);
    for (Span span : spans) {
      long timestamp = span.timestampAsLong() / 1000L;
      String lowTraceId = lowTraceId(span.traceId());
      TraceIdTimestamp traceIdTimeStamp = new TraceIdTimestamp(lowTraceId, timestamp);
      spansByTraceIdTimestamp.put(traceIdTimeStamp, span);
      traceIdToTraceIdTimestamps.put(lowTraceId, traceIdTimeStamp);

      if (!searchEnabled) continue;
      String serviceName = span.localServiceName();
      if (serviceName != null) {
        serviceToTraceIds.put(serviceName, lowTraceId);
        String remoteServiceName = span.remoteServiceName();
        if (remoteServiceName != null) {
          serviceToRemoteServiceNames.put(serviceName, remoteServiceName);
        }
        String spanName = span.name();
        if (spanName != null) {
          serviceToSpanNames.put(serviceName, spanName);
        }
      }
      for (Map.Entry<String, String> tag : span.tags().entrySet()) {
        if (autocompleteKeys.contains(tag.getKey())) {
          autocompleteTags.put(tag.getKey(), tag.getValue());
        }
      }
    }
  }
This is an index of {@link Span#remoteServiceName()} by {@link Endpoint#serviceName() service
name}
zipkin/src/main/java/zipkin2/storage/InMemoryStorage.java