Learn about OpenTelemetry semantic conventions and LangWatch’s custom attributes for consistent observability
Attribute | Type | Description | Example |
---|---|---|---|
langwatch.span.type | string | Type of span being traced | "llm" , "rag" , "prompt" |
langwatch.user.id | string | User identifier | "user-123" |
langwatch.thread.id | string | Conversation thread identifier | "thread-456" |
langwatch.customer.id | string | Customer identifier | "customer-789" |
langwatch.streaming | boolean | Whether the operation involves streaming | true , false |
langwatch.input | string/object | Input data for the span | "Hello, how are you?" |
langwatch.output | string/object | Output data from the span | "I'm doing well, thank you!" |
langwatch.contexts | array | RAG contexts for retrieval-augmented generation | Array of document contexts |
langwatch.tags | array | Tags for categorizing spans | ["chat", "greeting"] |
langwatch.params | object | Parameter data for operations | { temperature: 0.7 } |
langwatch.metrics | object | Custom metrics data | { response_time: 1250 } |
langwatch.timestamps | object | Timing information for events | { start: 1234567890 } |
langwatch.evaluation.custom | object | Custom evaluation data | { score: 0.95 } |
Attribute | Type | Description | Example |
---|---|---|---|
langwatch.sdk.name | string | LangWatch SDK implementation name | "langwatch-typescript" |
langwatch.sdk.version | string | Version of the LangWatch SDK | "1.0.0" |
langwatch.sdk.language | string | Programming language of the SDK | "typescript" |
Attribute | Type | Description | Example |
---|---|---|---|
langwatch.prompt.id | string | Unique prompt identifier | "prompt-123" |
langwatch.prompt.handle | string | Human-readable prompt handle | "customer-support-greeting" |
langwatch.prompt.version.id | string | Prompt version identifier | "version-456" |
langwatch.prompt.version.number | number | Prompt version number | 2 |
langwatch.prompt.selected.id | string | Selected prompt from a set | "selected-prompt-789" |
langwatch.prompt.variables | object | Variables used in prompt templates | { customer_name: "John" } |
Attribute | Type | Description | Example |
---|---|---|---|
langwatch.langchain.run.id | string | LangChain run identifier | "run-123" |
langwatch.langchain.run.type | string | Type of LangChain run | "chain" , "tool" |
langwatch.langchain.run.parent.id | string | Parent run identifier | "parent-run-456" |
langwatch.langchain.event_name | string | LangChain event type | "chain_start" |
langwatch.langchain.run.metadata | object | Run metadata | { model: "gpt-5-mini" } |
langwatch.langchain.run.extra_params | object | Additional run parameters | { max_tokens: 1000 } |
langwatch.langchain.run.tags | array | Run-specific tags | ["production", "chain"] |
langwatch.langchain.tags | array | LangChain operation tags | ["langchain", "llm"] |
✅ Good | ❌ Avoid | Reason |
---|---|---|
4-8 attributes per span | 50+ attributes | Too many impacts performance |
Short string values | Large text content | Use span.setInput() for large content |
Structured data | Nested objects | Keep attributes simple |
Essential metadata | Redundant information | Only include what’s needed |
attributes
from LangWatch for autocomplete