이 섹션은 Kubernetes 배포에만 적용됩니다.
Self-Hosted LangSmith 인스턴스는 로그, 메트릭 및 트레이스 형태의 텔레메트리 데이터를 생성합니다. 이 섹션에서는 해당 데이터에 액세스하고 관찰성 수집기 또는 백엔드로 내보내는 방법을 보여줍니다. 이 섹션은 이미 모니터링 인프라가 설정되어 있거나, 이 인프라를 설정할 예정이며 LangSmith가 데이터를 수집하도록 구성하는 방법을 알고 싶다고 가정합니다. 인프라는 다음을 의미합니다:

Logs: OTel 예제

LangSmith self-hosted 배포의 일부인 모든 서비스는 노드의 파일시스템과 stdout에 로그를 작성합니다. 이러한 로그에 액세스하려면 파일시스템 또는 stdout에서 읽도록 수집기를 설정해야 합니다. 대부분의 인기 있는 수집기는 파일시스템에서 로그 읽기를 지원합니다.

Metrics: OTel 예제

LangSmith Services

다음 LangSmith 서비스는 Prometheus 메트릭 형식으로 엔드포인트에서 메트릭을 노출합니다. frontend는 현재 메트릭을 노출하지 않습니다.
  • Backend: http://<langsmith_release_name>-backend.<namespace>.svc.cluster.local:1984/metrics
  • Platform Backend: http://<langsmith_release_name>-platform-backend.<namespace>.svc.cluster.local:1986/metrics
  • Playground: http://<langsmith_release_name>-playground.<namespace>.svc.cluster.local:1988/metrics
  • (LangSmith Control Plane only) Host Backend: http://<langsmith_release_name>-host-backend.<namespace>.svc.cluster.local:1985/metrics
Prometheus 또는 OpenTelemetry 수집기를 사용하여 엔드포인트를 스크랩하고 선택한 백엔드로 메트릭을 내보낼 수 있습니다.

Frontend Nginx

frontend 서비스는 다음 엔드포인트에서 Nginx 메트릭을 노출합니다: langsmith-frontend.langsmith.svc.cluster.local:80/nginx_status. 직접 스크랩하거나 LangSmith Observability Helm Chart를 사용하여 Prometheus Nginx exporter를 실행할 수 있습니다.
다음 섹션은 클러스터 내 데이터베이스에만 적용됩니다. 외부 데이터베이스를 사용하는 경우 메트릭 노출 및 가져오기를 구성해야 합니다.

Postgres + Redis

클러스터 내 Postgres/Redis 인스턴스를 사용하는 경우 Prometheus exporter를 사용하여 인스턴스에서 메트릭을 노출할 수 있습니다. 직접 배포하거나 원하는 경우 LangSmith Observability Helm Chart를 사용하여 exporter를 배포할 수 있습니다.

Clickhouse

클러스터 내 Clickhouse는 exporter 없이 메트릭을 노출하도록 구성되어 있습니다. 수집기를 사용하여 http://<langsmith_release_name>-clickhouse.<namespace>.svc.cluster.local:9363/metrics에서 메트릭을 스크랩할 수 있습니다.

Traces: OTel 예제

LangSmith Backend, Platform Backend, Playground 및 LangSmith Queue 배포는 Otel 트레이스를 방출하도록 계측되었습니다. 트레이싱은 기본적으로 꺼져 있으며, langsmith_config.yaml(또는 동등한) 파일에 다음을 추가하여 모든 LangSmith 서비스에 대해 활성화할 수 있습니다:
config:
  tracing:
    enabled: true
    endpoint: "<your_collector_endpoint>"
    useTls: true # / false
    env: "ls_self_hosted" # This value will be set as an "env" attribute in your spans
    exporter: "http" # must be either http or grpc

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.
I