本节仅适用于未在离线模式下运行的客户,并假设您使用的是提供 0.9.0 或更高版本的自托管 LangSmith 实例。早期版本的 LangSmith 没有此功能。
自托管 LangSmith 实例在本地存储所有信息,永远不会将敏感信息发送到网络外部。我们目前仅根据您订单中的权利跟踪平台使用情况以用于计费目的。为了更好地远程支持我们的客户,我们确实需要出口流量到 https://beacon.langchain.com。
将来,我们将引入支持诊断,以帮助我们确保 LangSmith 在您的环境中以最佳水平运行。
这将需要从您的网络出口流量到 https://beacon.langchain.com。如果需要,请参阅白名单 IP 部分以获取静态 IP 地址。
通常,我们发送到 Beacon 的数据可以分类如下:
-
订阅指标
-
订阅指标用于确定 LangSmith 的访问级别和利用率。这包括但不限于:
-
操作元数据
- 此元数据将包含并收集上述订阅指标以协助远程支持,允许 LangChain 团队更有效和主动地诊断和排除性能问题。
LangSmith Telemetry
As of version 0.11, LangSmith deployments will by default send telemetry data back to our backend. All telemetry data is associated with an organization and deployment, but never identified with individual users. We do not collect PII (personally identifiable information) in any form.
What we use it for
- To provide more proactive support and faster troubleshooting of self-hosted instances.
- Assisting with performance tuning.
- Understanding real-world usage to prioritize improvements.
What we collect
- Request metadata: anonymized request counts, sizes, and durations.
- Database metrics: query durations, error rates, and performance counters.
- Distributed traces: end-to-end traces with timing and error information for high-latency or failed requests.
We do not collect actual payload contents, database records, or any data that can identify your end users or customers.
How to disable
Set the following values in your langsmith_config.yaml file:
config:
telemetry:
metrics: false
traces: false
Example payloads
In an effort to maximize transparency, we provide sample payloads here:
License Verification
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
}
Usage Reporting
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": {}
}
]
}
]
}
]
}
Our Commitment
LangChain will not store any sensitive information in the Subscription Metrics or Operational Metadata. Any data collected will not be shared with a third party. If you have any concerns about the data being sent, please reach out to your account team.