이 섹션은 오프라인 모드에서 실행하지 않는 고객에게만 적용되며, 버전 0.9.0 이상을 제공하는 자체 호스팅 LangSmith 인스턴스를 사용하고 있다고 가정합니다. 이전 버전의 LangSmith에는 이 기능이 없었습니다.
자체 호스팅 LangSmith 인스턴스는 모든 정보를 로컬에 저장하며 네트워크 외부로 민감한 정보를 전송하지 않습니다. 현재 주문서의 권한에 따라 청구 목적으로만 플랫폼 사용량을 추적합니다. 고객을 더 잘 원격 지원하기 위해 https://beacon.langchain.com으로의 egress가 필요합니다.
향후 환경 내에서 LangSmith가 최적의 수준으로 실행되고 있는지 확인하는 데 도움이 되는 지원 진단 기능을 도입할 예정입니다.
네트워크에서 https://beacon.langchain.com으로의 egress가 필요합니다. 필요한 경우 고정 IP 주소는 IP 허용 목록 섹션을 참조하세요.
일반적으로 Beacon으로 전송하는 데이터는 다음과 같이 분류할 수 있습니다:
-
구독 메트릭
-
구독 메트릭은 LangSmith의 액세스 수준 및 활용도를 결정하는 데 사용됩니다. 여기에는 다음이 포함되지만 이에 국한되지 않습니다:
- trace 수
- 계약당 할당된 seat 수
- 현재 사용 중인 seat 수
-
운영 메타데이터
- 이 메타데이터는 위의 구독 메트릭을 포함하고 수집하여 원격 지원을 지원하며, LangChain 팀이 성능 문제를 보다 효과적이고 사전에 진단하고 해결할 수 있도록 합니다.
LangSmith Telemetry
버전 0.11부터 LangSmith 배포는 기본적으로 telemetry 데이터를 백엔드로 전송합니다. 모든 telemetry 데이터는 조직 및 배포와 연결되지만 개별 사용자와는 식별되지 않습니다. 어떤 형태로든 PII(개인 식별 정보)를 수집하지 않습니다.
사용 목적
- 자체 호스팅 인스턴스에 대한 보다 사전 예방적인 지원 및 더 빠른 문제 해결을 제공합니다.
- 성능 튜닝을 지원합니다.
- 실제 사용 현황을 이해하여 개선 사항의 우선순위를 정합니다.
수집하는 데이터
- Request 메타데이터: 익명화된 request 수, 크기 및 기간.
- Database 메트릭: query 기간, 오류율 및 성능 카운터.
- Distributed traces: 높은 지연 시간 또는 실패한 request에 대한 타이밍 및 오류 정보가 포함된 end-to-end trace.
실제 payload 내용, database 레코드 또는 최종 사용자나 고객을 식별할 수 있는 데이터는 수집하지 않습니다.
비활성화 방법
langsmith_config.yaml 파일에서 다음 값을 설정하세요:
config:
telemetry:
metrics: false
traces: false
예제 payload
투명성을 극대화하기 위해 여기에 샘플 payload를 제공합니다:
License 검증
Endpoint:
POST beacon.langchain.com/v1/beacon/verify
Request:
{
"license": "<YOUR_LICENSE_KEY>"
}
Response:
{
"token": "Valid JWT" //Short-lived JWT token to avoid repeated license checks
}
사용량 보고
Endpoint:
POST beacon.langchain.com/v1/beacon/ingest-traces
Request:
{
"license": "<YOUR_LICENSE_KEY>",
"trace_transactions": [
{
"id": "af28dfea-5358-463d-a2dc-37df1da72498",
"tenant_id": "3a1c2b6f-4430-4b92-8a5b-79b8b567bbc1",
"session_id": "b26ae531-cdb3-42a5-8bcf-05355199fe27",
"trace_count": 5,
"start_insertion_time": "2025-01-06T10:00:00Z",
"end_insertion_time": "2025-01-06T11:00:00Z",
"start_interval_time": "2025-01-06T09:00:00Z",
"end_interval_time": "2025-01-06T10:00:00Z",
"status": "completed",
"num_failed_send_attempts": 0,
"transaction_type": "type1",
"organization_id": "c5b5f53a-4716-4326-8967-d4f7f7799735"
}
]
}
Response:
{
"inserted_count": 1 //Number of transactions successfully ingested
}
Telemetry: Metrics
Endpoint:
POST beacon.langchain.com/v1/beacon/v1/metrics
Request:
{
"resourceMetrics": [
{
"resource": {
"attributes": [
{
"key": "resource.name",
"value": { "stringValue": "langsmith-metrics" }
},
{
"key": "env",
"value": { "stringValue": "ls_self_hosted" }
}
]
},
"scopeMetrics": [
{
"scope": {
"name": "langsmith.metrics",
"version": "0.1.0"
},
"metrics": [
{
"name": "langsmith_http_requests_latency",
"unit": "seconds",
"description": "Request latency of LangSmith services",
"gauge": {
"dataPoints": [
{
"asDouble": 12.34,
"startTimeUnixNano": 1678886400000000000,
"timeUnixNano": 1678886400000000000,
"attributes": [
{
"key": "endpoint",
"value": { "stringValue": "/sessions" }
},
{ "key": "method", "value": { "stringValue": "GET" } },
{
"key": "service_name",
"value": { "stringValue": "langsmith_backend" }
}
]
}
]
}
},
{
"name": "langsmith_http_requests_failed",
"unit": "1",
"description": "Counter of failed requests for LangSmith services",
"sum": {
"dataPoints": [
{
"asInt": 456,
"startTimeUnixNano": 1678886400000000000,
"timeUnixNano": 1678886400000000000,
"attributes": [
{
"key": "endpoint",
"value": { "stringValue": "/info" }
},
{ "key": "method", "value": { "stringValue": "POST" } },
{
"key": "service_name",
"value": { "stringValue": "langsmith_platform_backend" }
}
],
"aggregationTemporality": 2,
"isMonotonic": true
}
]
}
}
]
}
]
}
]
}
Telemetry: Traces
Endpoint:
POST beacon.langchain.com/v1/beacon/v1/traces
Request:
{
"resourceSpans": [
{
"resource": {
"attributes": [
{
"key": "env",
"value": {
"stringValue": "ls_self_hosted"
}
},
{
"key": "service.name",
"value": {
"stringValue": "langsmith_backend"
}
}
]
},
"scopeSpans": [
{
"scope": {},
"spans": [
{
"traceId": "71699b6fe85982c7c8995ea3d9c95df2",
"spanId": "3c191d03fa8be0",
"parentSpanId": "",
"name": "receive_request",
"startTimeUnixNano": "1581452772000000321",
"endTimeUnixNano": "1581452773000000789",
"droppedAttributesCount": 1,
"events": [
{
"timeUnixNano": "1581452773000000123",
"name": "parse_request",
"attributes": [
{
"key": "request_size",
"value": {
"stringValue": "100"
}
}
],
"droppedAttributesCount": 2
},
{
"timeUnixNano": "1581452773000000123",
"name": "event",
"droppedAttributesCount": 2
}
],
"droppedEventsCount": 1,
"status": {
"message": "status-cancelled",
"code": 2
}
},
{
"traceId": "71699b6fe85982c7c8995ea3d9c95df2",
"spanId": "0932ksdka12345",
"parentSpanId": "3c191d03fa8be0",
"name": "process_request",
"startTimeUnixNano": "1581452772000000321",
"endTimeUnixNano": "1581452773000000789",
"links": [],
"droppedLinksCount": 3,
"status": {}
}
]
}
]
}
]
}
우리의 약속
LangChain은 구독 메트릭 또는 운영 메타데이터에 민감한 정보를 저장하지 않습니다. 수집된 데이터는 제3자와 공유되지 않습니다. 전송되는 데이터에 대해 우려 사항이 있으시면 계정 팀에 문의하시기 바랍니다.