feature: add jaeger opentracing

This commit is contained in:
Alexander
2022-04-14 15:18:33 +03:00
parent 501b5a9cec
commit ea25e8e8bc
6 changed files with 39 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import com.eventsourcing.es.EventStoreDB;
import com.eventsourcing.mappers.BankAccountMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.sleuth.annotation.NewSpan;
import org.springframework.stereotype.Service;
import java.util.Optional;
@@ -22,6 +23,7 @@ public class BankAccountQueryHandler implements BankAccountQueryService {
private final BankAccountMongoRepository mongoRepository;
@Override
@NewSpan
public BankAccountResponseDTO handle(GetBankAccountByIDQuery query) {
Optional<BankAccountDocument> optionalDocument = mongoRepository.findByAggregateId(query.aggregateID());
if (optionalDocument.isPresent()) {