Skip to content

feat(scrape,discovery,promtext): 수집 계층 이관 - #13

Merged
eightynine01 merged 1 commit into
mainfrom
feat/scrape
Aug 12, 2026
Merged

feat(scrape,discovery,promtext): 수집 계층 이관#13
eightynine01 merged 1 commit into
mainfrom
feat/scrape

Conversation

@eightynine01

Copy link
Copy Markdown
Contributor

Phase 1 의 ① 데이터 유입입니다. Prometheus 텍스트 파서 · 타겟 발견(static/kubernetes) · 스크레이프 루프를 옮겼습니다.

promtextdiscovery 는 내부 의존이 없어 그대로 왔고, scrape 만 개조했습니다.

Appender 인터페이스

scrape*tsdb.DB 를 직접 받던 것을 인터페이스로 바꿨습니다:

type Appender interface {
    Append(lset labels.Labels, t int64, v float64) error
}

promql 이 저장 계층 인터페이스를 스스로 정의한 것과 같은 이유입니다. tsdb.DB 가 이미 이 시그니처를 만족하므로 어댑터가 필요 없고, 테스트는 저장 엔진 없이 가짜 하나로 끝납니다.

검증

이관된 테스트가 그대로 통과합니다 — 스크레이프 사이클·타겟 발견·텍스트 파싱.

Prometheus 텍스트 파서·타겟 발견(static/kubernetes)·스크레이프 루프를 옮겼다.
promtext 와 discovery 는 의존이 없어 그대로 왔고, scrape 만 개조했다.

scrape 는 *tsdb.DB 대신 Appender 인터페이스를 받는다 — promql 이 저장 계층
인터페이스를 스스로 정의한 것과 같은 이유다. tsdb.DB 가 그 시그니처를 이미
만족하므로 어댑터가 필요 없고, 테스트는 저장 엔진 없이 가짜 하나로 끝난다.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@eightynine01
eightynine01 merged commit 298e43c into main Aug 12, 2026
1 check passed
@eightynine01
eightynine01 deleted the feat/scrape branch August 12, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants