Skip to content

Commit

Permalink
feat: add egress information for telemetry/licensing
Browse files Browse the repository at this point in the history
  • Loading branch information
langchain-infra committed Jan 7, 2025
1 parent 14062a7 commit 4c7dfab
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 4 deletions.
71 changes: 71 additions & 0 deletions docs/self_hosting/egress.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
---
sidebar_label: Egress for Subscription Metrics and Operational Metadata
sidebar_position: 7
---

# Egress for Subscription Metrics and Operational Metadata

By default, Self-Hosted LangSmith instances store all information locally and will never send sensitive information outside your network. However, we do require egress to `https://beacon.langchain.com` for two reasons:

1. Subscription Metrics:
- Metrics used to determine Customer's access and use of the Licensed Platform, including but not limited to, the number of Traces, number of Users, number of Nodes Executed, or other mutually agreed criteria as set out in an Order Form.
- This includes license verification and usage reporting.
2. Operational Metadata
- Operational Metadata means usage information generated by the Licensed Platform and collected by LangChain for the purposes of delivering an optimal implementation of the Licensed Platform. Operational Metadata may include information such as type and version of the LangChain software, operating system version and environment type of Customer's Infrastructure, uptime and availability, system error logs and health metrics, product feature usage, general integrity and security of the Licensed Platform. For the avoidance of doubt, Operational Metadata will never include Customer Data, AI Content, or Customer Confidential Information.

This will require egress to `https://beacon.langchain.com` from your network.

## Example Payloads

### License Verification

POST beacon.langchain.com/v1/beacon/verify
```json
{
"license: "<YOUR_LICENSE_KEY>"
}
```
Response:
```json
{
"token": "Valid JWT" //Short-lived JWT token to avoid repeated license checks
}
```

### Usage Reporting

POST beacon.langchain.com/v1/beacon/ingest-traces
Example request payload:
```json
{
"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"
}
]
}
```

Example response payload:
```json
{
"inserted_count": 1 // Number of transactions successfully ingested
}
```

## Our Commitment

LangChain Inc. promises not store any sensitive information in the Subscription Metrics or Operational Metadata. This data will be used solely for the purpose of providing the Licensed Platform and will not be shared with any third party.
If you have any concerns about the data being sent/this still doesn't meet your requirements, LangSmith does offer an offline mode that can be enabled. Please reach out to us at [[email protected]](mailto:[email protected])
11 changes: 8 additions & 3 deletions docs/self_hosting/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ description: "Frequently Asked Questions"
### _I can't create API keys or manage users in the UI, what's wrong?_

- You have likely deployed LangSmith without setting up SSO. LangSmith requires SSO to manage users and API keys. You can find more information on setting up SSO in the [configuration section.](../self_hosting/configuration/sso)
-

#### _How does load balancing/ingress work_?

Expand All @@ -28,12 +27,18 @@ You can find more information on setting up SSO in the [configuration section.](

#### _Does my application need egress to function properly?_

Our deployment only needs egress for a few things:
Our deployment only needs egress for a few things (most of which can reside within your VPC):

- Fetching images (If mirroring your images, this may not be needed)
- Talking to any LLMs
- Talking to any LLM endpoints
- Talking to any external storage services you may have configured
- Fetching OAuth information
- Telemetry (if not running in offline mode)
- Requires egress to `https://beacon.langchain.com`
- See [usage reporting](../self_hosting/usage_reporting) for more information
- License Checks (if not running in offline mode)
- Requires egress to `https://beacon.langchain.com`
- See [license verification](../self_hosting/license_verification) for more information

Your VPC can set up rules to limit any other access.
Note: We require the `X-Organization-Id` and `X-Tenant-Id` headers to be allowed to be passed through to the backend service. These are used to determine which organization and workspace (previously called "tenant") the request is for.
Expand Down
1 change: 1 addition & 0 deletions docs/self_hosting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Step-by-step guides that cover the installation, configuration, and scaling of y
- [TTLs](./self_hosting/configuration/ttl): Configure LangSmith to use TTLs.
- [Usage](./self_hosting/usage): How to use your self-hosted instance of LangSmith.
- [Upgrades](./self_hosting/upgrades): How to upgrade your self-hosted instance of LangSmith.
- [Egress for Subscription Metrics and Operational Metadata](./self_hosting/egress): Egress requirements for Subscription Metrics and Operational Metadata.
- [Release notes](./self_hosting/release_notes): The latest release notes for LangSmith.
- - [Week of August 26, 2024 - LangSmith v0.7](./self_hosting/release_notes#week-of-august-26-2024---langsmith-v07): Release notes for version 0.7 of LangSmith.
- [Week of June 17, 2024 - LangSmith v0.6](./self_hosting/release_notes#week-of-june-17-2024---langsmith-v05): Release notes for version 0.6 of LangSmith.
Expand Down
4 changes: 3 additions & 1 deletion docs/self_hosting/installation/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ This guide provides instructions for installing and setting up your environment
```bash
openssl rand -base64 32
```
1. Egress to `https://beacon.langchain.com` (if not running in offline mode)
1. LangSmith requires egress to `https://beacon.langchain.com` for license verification and usage reporting. This is required for LangSmith to function properly. You can find more information on egress requirements in the [Egress](/self_hosting/egress) section.
1. Configuration
1. There are several configuration options that you can set in the `.env` file. You can find more information on the available configuration options in the [Configuration](/self_hosting/configuration) section.
1. There are several configuration options that you can set in the `.env` file. You can find more information on the available configuration options in the [Configuration](/self_hosting/configuration) section.

## Running via Docker Compose

Expand Down
2 changes: 2 additions & 0 deletions docs/self_hosting/installation/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ Ensure you have the following tools/items ready. Some items are marked optional:
```bash
openssl rand -base64 32
```
1. Egress to `https://beacon.langchain.com` (if not running in offline mode)
1. LangSmith requires egress to `https://beacon.langchain.com` for license verification and usage reporting. This is required for LangSmith to function properly. You can find more information on egress requirements in the [Egress](/self_hosting/egress) section.
1. Configuration
1. There are several configuration options that you can set in the `langsmith_config.yaml` file. You can find more information on specific configuration options in the [Configuration](/self_hosting/configuration) section.
1. If you are new to Kubernetes or Helm, we’d recommend starting with one of the example configurations in the examples directory of the Helm Chart repository here: [LangSmith helm chart examples](https://github.com/langchain-ai/helm/tree/main/charts/langsmith/examples).
Expand Down
Binary file modified docs/self_hosting/static/self_hosted_architecture_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4c7dfab

Please sign in to comment.