Skip to content

docs: add comprehensive metadata and labels guide#121

Open
drewdrewthis wants to merge 2 commits intomainfrom
docs/metadata-and-labels-guide
Open

docs: add comprehensive metadata and labels guide#121
drewdrewthis wants to merge 2 commits intomainfrom
docs/metadata-and-labels-guide

Conversation

@drewdrewthis
Copy link
Contributor

Summary

Adds a unified guide for sending metadata and labels to LangWatch, covering all integration methods.

What's Included

  • Quick reference table — All attributes at a glance
  • TypeScript SDK examples with gen_ai.conversation.id as primary recommendation
  • Raw OpenTelemetry examples for vanilla OTEL users
  • REST API examples with curl
  • Python SDK examples
  • OpenInference (Phoenix) integration

Key Decisions

  • gen_ai.conversation.id is the primary recommendation for thread/conversation ID (OTEL semconv aligned)
  • langwatch.thread.id still works but documented as legacy
  • Custom metadata via metadata attribute (JSON object)

Verified

Tested against production API:

  • REST path (/api/collector) ✅
  • OTEL path (/api/otel/v1/traces) ✅
  • Random custom metadata fields ✅

Related


## OpenInference (Phoenix)

If you're using [OpenInference](https://github.com/Arize-ai/openinference) instrumentation:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@drewdrewthis drewdrewthis force-pushed the docs/metadata-and-labels-guide branch from 0b9e184 to 3c27627 Compare February 17, 2026 10:55
…ctions

Adds both-language examples throughout the metadata guide:
- Raw OpenTelemetry: added Python alongside existing TypeScript
- Exporter config: added Python alongside existing TypeScript
- REST API: added Python (requests) and TypeScript (fetch) alongside curl

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants