Skip to content

[chore/#751] 실시간 핸들러 처리 시간 메트릭 추가 - #752

Merged
kanghana1 merged 2 commits into
developfrom
chore/#751
Sep 30, 2026
Merged

kanghana1 merged 2 commits into
developfrom
chore/#751

Conversation

@kanghana1

Copy link
Copy Markdown
Contributor

❤️ 기능 설명

코드 개선 전 성능을 수치화 하기 위해 처리 시간 메트릭을 추가합니다.


연결된 issue

연결된 issue를 자동으로 닫기 위해 아래 {이슈넘버}를 입력해주세요.

close #751



✅ 체크리스트

  • PR 제목 규칙 잘 지켰는가?
  • 추가/수정사항을 설명하였는가?
  • 테스트 결과 사진을 넣었는가?
  • 이슈넘버를 적었는가?

@kanghana1
kanghana1 requested a review from Dimo-2562 September 28, 2026 07:32
@kanghana1 kanghana1 self-assigned this Sep 28, 2026
@kanghana1 kanghana1 added the 🎵 CHORE This will not be worked on label Sep 28, 2026
JsonNode payload = envelope.payload() == null ? NullNode.getInstance() : envelope.payload();

Timer.Sample sample = Timer.start(meterRegistry);
String outcome = "success";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

outcome의 의미가 조금 애매하다고 여겨집니다.

그 이유로는 handle() 메서드에서 예외가 터질 때 error로 outcome을 전환하는데, handle() 메서드 내부에서 sendError()를 호출할경우 예외가 발생하지 않으므로 예외이지만 outcome은 success입니다!
이 부분을 명확하게 개선하면 좋겠습니다!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 피드백 감사합니다!
router가 handler에 넘기는 responder를 감싸 오류 응답 전송 여부를 기록하도록 바꿨고, 태그 의미를 둘로 나누어 개선하였습니다.

  • outcome(success/error): 요청자가 실제로 받은 결과 기준 - handler가 보낸 오류 응답도 error
  • exception: router까지 전파된 예외

@Dimo-2562 Dimo-2562 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~

@kanghana1
kanghana1 merged commit e1cf82e into develop Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎵 CHORE This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE] 실시간 핸들러 처리 시간 메트릭 추가

2 participants