From ffdc6ca75c22d456407bded464b6b696619cac9b Mon Sep 17 00:00:00 2001 From: wonyongChoi05 Date: Thu, 12 Oct 2023 14:55:25 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Trace=20=EC=96=B4=EB=85=B8=ED=85=8C?= =?UTF-8?q?=EC=9D=B4=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/zipgo/petfood/application/PetFoodQueryService.java | 3 +++ .../petfood/infra/persist/PetFoodQueryRepositoryImpl.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/backend/src/main/java/zipgo/petfood/application/PetFoodQueryService.java b/backend/src/main/java/zipgo/petfood/application/PetFoodQueryService.java index 569fd29b..66d9735f 100644 --- a/backend/src/main/java/zipgo/petfood/application/PetFoodQueryService.java +++ b/backend/src/main/java/zipgo/petfood/application/PetFoodQueryService.java @@ -1,5 +1,6 @@ package zipgo.petfood.application; +import datadog.trace.api.Trace; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -37,6 +38,7 @@ public GetPetFoodsResponse getPetFoodsByFilters(FilterRequest filterDto, Long la ); } + @Trace(resourceName = "식품 페이징 조회") private List getPagingPetFoods(FilterRequest filterDto, Long lastPetFoodId, int size) { return petFoodQueryRepository.findPagingPetFoods( filterDto.brands(), @@ -48,6 +50,7 @@ private List getPagingPetFoods(FilterRequest filterDto, ); } + @Trace(resourceName = "식품 페이징 카운트 조회") private Long getPetFoodsCount(FilterRequest filterDto) { return petFoodQueryRepository.findPetFoodsCount( filterDto.brands(), diff --git a/backend/src/main/java/zipgo/petfood/infra/persist/PetFoodQueryRepositoryImpl.java b/backend/src/main/java/zipgo/petfood/infra/persist/PetFoodQueryRepositoryImpl.java index 2387b7b7..8ed1aed4 100644 --- a/backend/src/main/java/zipgo/petfood/infra/persist/PetFoodQueryRepositoryImpl.java +++ b/backend/src/main/java/zipgo/petfood/infra/persist/PetFoodQueryRepositoryImpl.java @@ -2,6 +2,7 @@ import com.querydsl.core.types.dsl.BooleanExpression; import com.querydsl.jpa.impl.JPAQueryFactory; +import datadog.trace.api.Trace; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Repository; import org.springframework.transaction.annotation.Transactional; @@ -26,6 +27,7 @@ public class PetFoodQueryRepositoryImpl implements PetFoodQueryRepository { private final JPAQueryFactory queryFactory; + @Trace(resourceName = "식품 페이징 조회 쿼리") public List findPagingPetFoods( List brandsName, List standards, @@ -103,6 +105,7 @@ private BooleanExpression isContainFunctionalities(List functionalityLis .functionality.name.in(functionalityList); } + @Trace(resourceName = "식품 페이징 조회 카운트 쿼리") @Override public Long findPetFoodsCount( List brandsName,