[일지] 2026.03.20

김재만·2026년 3월 20일

작업한 것

  • 회사 온보딩(개발 환경 가이드 및 컨벤션 관련)
    • Metrics uv add prometheus-client
      // metrics.py
      
      from prometheus_client import Counter, generate_latest
      
      request_counter = Counter(
          "http_requests_total",
          "Total HTTP requests",
          ["path"]
      )
      // main.py
      
      from fastapi import FastAPI, Request, Response
      from prometheus_client import generate_latest
      ...
      from my_service.metrics import request_counter
      
      ...
      
      @app.get("/health")
      def health_check(request: Request) -> Dict[str, str]:
          logger.info("health endpoint called", extra={"path": request.url.path, "method": request.method})
          request_counter.labels(path="/health").inc()
          return {"status": "ok"}
      
      ...
      
      @app.get("/metrics")
      def metrics():
          return Response(generate_latest(), media_type="text/plain")

배운 것

  • git push origin chore/gitignore-setup -f: 로컬 상태로 원격 브랜치를 강제 업데이트

이슈

  • 다른 브랜치에서 작업 → 브랜치 옮기다가 컴플릭트 ㅋㅋㅋㅋ
    • 로컬에서 작업 전에 브랜치 체크할 방법 고민하기

다음 작업

  • Tracing
  • CD

마무리

깃과의 사투

profile
듣는 것을 좋아하는 개발자입니다

0개의 댓글