Sync LLM Observability API documentation with Go implementation#33633
Closed
aniszoubiramar wants to merge 1 commit intomasterfrom
Closed
Sync LLM Observability API documentation with Go implementation#33633aniszoubiramar wants to merge 1 commit intomasterfrom
aniszoubiramar wants to merge 1 commit intomasterfrom
Conversation
Updated documentation to match Go implementation (source of truth). ## Changes by Endpoint ### POST /api/intake/llm-obs/v1/trace/spans 📄 **Doc:** content/en/llm_observability/instrumentation/api.md 🔧 **Handler:** httphandlerv1.TraceHandler.CreateSpans **Required Status Fixes (4)** - Removed [*required*] from data.type (optional in Go) - Removed [*required*] from data.attributes (optional in Go) - Removed [*required*] from meta.kind (optional in Go) - Removed [*required*] from message.content (optional in Go) **Meta Object - Added Fields (8)** - span: object (span-level metadata) - expected_output: IO (expected output information) - tool_definitions: array (list of available tools) - intent: string (span intent) - embedding_for_prompt_idx: integer (embedding prompt index) - model_name: string (model name) - model_provider: string (model provider) - model_version: string (model version) **IO Object - Added Fields (2)** - embedding: array of floats (embedding vector) - parameters: object (additional parameters) **Message Object - Added Fields (2)** - tool_calls: array (tool calls made in message) - tool_results: array (tool results in message) **New Type Definitions (3)** - ToolCall: name, arguments, tool_id, type - ToolResult: name, result, tool_id, type - ToolDefinition: name, description, schema **Document Object - Added Fields (2)** - ranking: integer (document ranking) - metadata: object (additional metadata) **Prompt Object - Updated (3)** - Updated tags field type from Dict[string, string] to Dict[string, any] - Added _dd_context_variable_keys: array (internal Datadog field) - Added _dd_query_variable_keys: array (internal Datadog field) **Metrics Section - Restructured (1)** - Changed from fixed structure to flexible key-value map - Documented as Dict[key (string), float] with common examples - Allows custom metrics beyond standard fields **Span Object - Added Fields (4)** - service: string (service name) - ml_app: string (can override payload-level ml_app) - ml_app_version: string (ML app version) - _dd: object (internal Datadog object with apm_trace_id) --- ### POST /api/intake/llm-obs/v2/eval-metric 📄 **Doc:** content/en/llm_observability/instrumentation/api.md 🔧 **Handler:** httphandlerv1.EvalMetricHandlerV2.CreateEvalMetrics **Required Status Fixes (6)** - Removed [*required*] from data.type (optional in Go) - Removed [*required*] from data.attributes (optional in Go) - Added [*required*] to join_on.span.span_id (required in Go) - Added [*required*] to join_on.span.trace_id (required in Go) - Added [*required*] to join_on.tag.key (required in Go) - Added [*required*] to join_on.tag.value (required in Go) **EvalMetric Object - Added Fields (4)** - trace_id: string (trace ID) - span_id: string (span ID) - ml_app_version: string (ML app version) - metadata: object (additional metadata) --- ### POST /api/v2/llm-obs/v1/spans/events/search 📄 **Doc:** content/en/llm_observability/evaluations/export_api.md 🔧 **Handler:** httphandlerv2.TraceHandler.SearchSpans **Required Status Fixes (2)** - Removed [*required*] from data.type (optional in Go) - Removed [*required*] from data.attributes (optional in Go) **SearchSpansRequest - Added Fields (1)** - id: string (JSONAPI primary identifier) --- ## Summary | Change Type | Count | |-------------|-------| | Required status fixes | 12 | | Fields added | 31 | | Type/structure fixes | 1 | | New type definitions | 3 | | **Total Changes** | **47** | ## Files Modified | File | Insertions | Deletions | |------|------------|-----------| | instrumentation/api.md | +62 | -24 | | evaluations/export_api.md | +2 | -2 | ## Link Fixes Fixed 2 broken internal hyperlinks: - Line 519: [Span](#SpanContext) → [Span](#spancontext) - Line 520: [Tag](#TagContext) → [Tag](#tagcontext) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Contributor
Preview links (active after the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated documentation to match Go implementation (source of truth).
Changes by Endpoint
POST /api/intake/llm-obs/v1/trace/spans
📄 Doc: content/en/llm_observability/instrumentation/api.md 🔧 Handler: httphandlerv1.TraceHandler.CreateSpans
Required Status Fixes (4)
Meta Object - Added Fields (8)
IO Object - Added Fields (2)
Message Object - Added Fields (2)
New Type Definitions (3)
Document Object - Added Fields (2)
Prompt Object - Updated (3)
Metrics Section - Restructured (1)
Span Object - Added Fields (4)
POST /api/intake/llm-obs/v2/eval-metric
📄 Doc: content/en/llm_observability/instrumentation/api.md 🔧 Handler: httphandlerv1.EvalMetricHandlerV2.CreateEvalMetrics
Required Status Fixes (6)
EvalMetric Object - Added Fields (4)
POST /api/v2/llm-obs/v1/spans/events/search
📄 Doc: content/en/llm_observability/evaluations/export_api.md 🔧 Handler: httphandlerv2.TraceHandler.SearchSpans
Required Status Fixes (2)
SearchSpansRequest - Added Fields (1)
Summary
Files Modified
Link Fixes
Fixed 2 broken internal hyperlinks:
🤖 Generated with Claude Code
What does this PR do? What is the motivation?
Merge instructions
Merge readiness:
For Datadog employees:
Your branch name MUST follow the
<name>/<description>convention and include the forward slash (/). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.If your branch doesn't follow this format, rename it or create a new branch and PR.
[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.
Additional notes