Skip to content

Commit ff642d7

Browse files
Remove langsmith overrides
1 parent a3ff00f commit ff642d7

File tree

3 files changed

+5
-85
lines changed

3 files changed

+5
-85
lines changed

README.md

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,9 @@ The LangSmith Collector-Proxy addresses these issues by batching multiple spans
1818
* **Semantic Translation**: Converts GenAI semantic convention attributes to the LangSmith tracing model.
1919
* **Flexible Batching**: Configurable batching based on either the number of spans or a time interval.
2020

21-
## Getting Started
22-
23-
### Prerequisites
24-
25-
* Kubernetes cluster
26-
* Helm installed and configured
27-
28-
### Installation
29-
30-
To deploy the LangSmith Collector-Proxy, follow these steps:
31-
32-
1. Add the LangChain Helm repository:
33-
34-
```bash
35-
helm repo add langchain-ai https://github.com/langchain-ai/helm
36-
helm repo update
37-
```
38-
39-
2. Install the Collector-Proxy using Helm:
40-
41-
```bash
42-
helm install langsmith-collector-proxy langchain-ai/langsmith-collector-proxy --namespace=<your-namespace> --create-namespace
43-
```
44-
45-
Replace `<your-namespace>` with your desired Kubernetes namespace.
46-
4721
## Configuration
4822

49-
The Collector-Proxy can be customized via environment variables or Helm chart values:
23+
The Collector-Proxy can be customized via environment variables:
5024

5125
| Variable | Description | Default |
5226
| -------------------- | ---------------------------------------------- | --------------------------------- |
@@ -55,36 +29,12 @@ The Collector-Proxy can be customized via environment variables or Helm chart va
5529
| `LANGSMITH_API_KEY` | API key for authenticating with LangSmith | Required |
5630
| `LANGSMITH_PROJECT` | Default project for tracing data | Optional |
5731
| `BATCH_SIZE` | Number of spans per upload batch | `100` |
58-
| `FLUSH_INTERVAL_MS` | Time interval (in milliseconds) to flush spans | `5000` (5 seconds) |
32+
| `FLUSH_INTERVAL_MS` | Time interval (in milliseconds) to flush spans | `1000` (1 seconds) |
5933
| `MAX_BUFFER_BYTES` | Maximum uncompressed buffer size | `10485760` (10MB) |
6034
| `MAX_BODY_BYTES` | Maximum size of incoming request body | `209715200` (200MB) |
6135
| `MAX_RETRIES` | Number of retry attempts for failed uploads | `3` |
6236
| `RETRY_BACKOFF_MS` | Initial backoff duration in milliseconds | `100` |
6337

64-
### Example Helm Configuration
65-
66-
```yaml
67-
langsmith:
68-
endpoint: "https://api.smith.langchain.com"
69-
apiKey: "your-api-key"
70-
project: "default-project"
71-
72-
batching:
73-
size: 200
74-
intervalMs: 1000
75-
maxBufferBytes: 10485760
76-
77-
retry:
78-
maxAttempts: 5
79-
backoffInitialMs: 200
80-
```
81-
82-
Save this as `values.yaml` and deploy with:
83-
84-
```bash
85-
helm upgrade --install langsmith-collector-proxy langchain-ai/langsmith-collector-proxy -f values.yaml
86-
```
87-
8838
## Usage
8939

9040

internal/config/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ func Load() Config {
5151
// 3. The batch size is reached.
5252
// Because zstd compression can be extremely effective, we use the uncompressed size of the buffer to determine how much data
5353
// will be sent to LangSmith.
54-
BatchSize: int(envInt64("BATCH_SIZE", 100)), // default 100 runs
55-
FlushInterval: time.Duration(envInt64("FLUSH_INTERVAL_MS", 1000)) * time.Millisecond,
56-
MaxBufferBytes: int(envInt64("MAX_BUFFER_BYTES", 10*1024*1024)), // default 10MB
54+
BatchSize: int(envInt64("BATCH_SIZE", 100)), // default 100 runs
55+
FlushInterval: time.Duration(envInt64("FLUSH_INTERVAL_MS", 1000)) * time.Millisecond, // default 1 second
56+
MaxBufferBytes: int(envInt64("MAX_BUFFER_BYTES", 10*1024*1024)), // default 10MB
5757
// Uploader Config
5858
MaxRetries: int(envInt64("MAX_RETRIES", 3)),
5959
BackoffInitial: time.Duration(envInt64("RETRY_BACKOFF_MS", 100)) * time.Millisecond,

internal/translator/otel_converter.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ const (
5454
LangSmithTraceName = "langsmith.trace.name"
5555
LangSmithSpanKind = "langsmith.span.kind"
5656
LangSmithMetadataPrefix = "langsmith.metadata"
57-
LangSmithRunID = "langsmith.span.id"
58-
LangSmithTraceID = "langsmith.trace.id"
59-
LangSmithDottedOrder = "langsmith.span.dotted_order"
60-
LangSmithParentRunID = "langsmith.span.parent_id"
6157
LangSmithSessionID = "langsmith.trace.session_id"
6258
LangSmithSessionName = "langsmith.trace.session_name"
6359
LangSmithTags = "langsmith.span.tags"
@@ -265,19 +261,6 @@ func (c *GenAiConverter) ConvertSpan(span *tracesdkpb.Span, genericOtelEnabled b
265261
}
266262
}
267263

268-
// Map LangSmith-specific attributes to run fields
269-
if traceID, ok := spanAttrs[LangSmithTraceID]; ok {
270-
if stringValue, ok := traceID.Value.(*commonpb.AnyValue_StringValue); ok {
271-
run.TraceID = strPointer(stringValue.StringValue)
272-
}
273-
}
274-
275-
if dottedOrder, ok := spanAttrs[LangSmithDottedOrder]; ok {
276-
if stringValue, ok := dottedOrder.Value.(*commonpb.AnyValue_StringValue); ok {
277-
run.DottedOrder = strPointer(stringValue.StringValue)
278-
}
279-
}
280-
281264
if sessionID, ok := spanAttrs[LangSmithSessionID]; ok {
282265
if stringValue, ok := sessionID.Value.(*commonpb.AnyValue_StringValue); ok {
283266
run.SessionID = strPointer(stringValue.StringValue)
@@ -290,19 +273,6 @@ func (c *GenAiConverter) ConvertSpan(span *tracesdkpb.Span, genericOtelEnabled b
290273
}
291274
}
292275

293-
// Handle LangSmith IDs with priority over OTLP IDs
294-
if langsmithRunID, ok := spanAttrs[LangSmithRunID]; ok {
295-
if stringValue, ok := langsmithRunID.Value.(*commonpb.AnyValue_StringValue); ok {
296-
run.ID = strPointer(stringValue.StringValue)
297-
}
298-
}
299-
300-
if langsmithParentRunID, ok := spanAttrs[LangSmithParentRunID]; ok {
301-
if stringValue, ok := langsmithParentRunID.Value.(*commonpb.AnyValue_StringValue); ok {
302-
run.ParentRunID = strPointer(stringValue.StringValue)
303-
}
304-
}
305-
306276
// invocation params
307277
for _, modelAttrKey := range TraceLoopInvocationParams {
308278
if modelAttr, ok := spanAttrs[modelAttrKey]; ok {

0 commit comments

Comments
 (0)