From ce794661fd0a5501d262b34960711e7c3958c515 Mon Sep 17 00:00:00 2001 From: Anis Amar Date: Mon, 5 Jan 2026 14:49:09 +0100 Subject: [PATCH] Sync LLM Observability API documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated documentation to match Go implementation (source of truth). ## Changes by Endpoint ### POST /api/intake/llm-obs/v2/eval-metric 📄 Doc: content/en/llm_observability/instrumentation/api.md 🔧 Handler: CreateEvalMetrics | Change | Field | Details | |--------|-------|---------| | ✅ Add | trace_id (EvalMetric) | string | | ✅ Add | span_id (EvalMetric) | string | | ✅ Add | ml_app_version (EvalMetric) | string | | ✅ Add | metadata (EvalMetric) | object | | 🔒 Required | span_id (SpanContext) | optional → required | | 🔒 Required | trace_id (SpanContext) | optional → required | | 🔒 Required | key (TagContext) | optional → required | | 🔒 Required | value (TagContext) | optional → required | ## Summary | Change Type | Count | |-------------|-------| | ✅ Fields added | 4 | | ❌ Fields removed | 0 | | 🔄 Type fixes | 0 | | 🔒 Required fixes | 4 | | **Total** | **8** | 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- .../en/llm_observability/instrumentation/api.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/content/en/llm_observability/instrumentation/api.md b/content/en/llm_observability/instrumentation/api.md index 63cf4aaeaa1..cbec8539cc7 100644 --- a/content/en/llm_observability/instrumentation/api.md +++ b/content/en/llm_observability/instrumentation/api.md @@ -463,9 +463,12 @@ Evaluations must be joined to a unique span. You can identify the target span us | Field | Type | Description | |--------------------------------------------------------------------|---------------------|--------------------------------------------------------------------------------------------------------| | ID | string | Evaluation metric UUID (generated upon submission). | +| trace_id | string | The trace ID of the span that this evaluation is associated with. | +| span_id | string | The span ID of the span that this evaluation is associated with. | | join_on [*required*] | [[JoinOn](#joinon)] | How the evaluation is joined to a span. | | timestamp_ms [*required*] | int64 | A UTC UNIX timestamp in milliseconds representing the time the request was sent. | | ml_app [*required*] | string | The name of your LLM application. See [Application naming guidelines](#application-naming-guidelines). | +| ml_app_version | string | The version of your LLM application. | | metric_type [*required*] | string | The type of evaluation: `"categorical"`, `"score"`, or `"boolean"`. | | label [*required*] | string | The unique name or label for the provided evaluation . | | categorical_value [*required if the metric_type is "categorical"*] | string | A string representing the category that the evaluation belongs to. | @@ -473,28 +476,29 @@ Evaluations must be joined to a unique span. You can identify the target span us | boolean_value [*required if the metric_type is "boolean"*] | boolean | A boolean value of the evaluation. | | assessment | string | An assessment of this evaluation. Accepted values are `pass` and `fail`. | | reasoning | string | A text explanation of the evaluation result. | +| metadata | Dict[key (string), any] | Additional metadata associated with this evaluation metric. | | tags | [[Tag](#tag)] | A list of tags to apply to this particular evaluation metric. | #### JoinOn | Field | Type | Description | |------------|-----------------|--------------| -| span | [[Span](#SpanContext)] | Uniquely identifies the span associated with this evaluation using span ID & trace ID. | -| tag | [[Tag](#TagContext)] | Uniquely identifies the span associated with this evaluation using a tag key-value pair. | +| span | [[Span](#spancontext)] | Uniquely identifies the span associated with this evaluation using span ID & trace ID. | +| tag | [[Tag](#tagcontext)] | Uniquely identifies the span associated with this evaluation using a tag key-value pair. | #### SpanContext | Field | Type | Description | |------------|-----------------|--------------| -| span_id | string | The span ID of the span that this evaluation is associated with. | -| trace_id | string | The trace ID of the span that this evaluation is associated with. | +| span_id [*required*] | string | The span ID of the span that this evaluation is associated with. | +| trace_id [*required*] | string | The trace ID of the span that this evaluation is associated with. | #### TagContext | Field | Type | Description | |------------|-----------------|--------------| -| key | string | The tag key name. This must be the same key used when setting the tag on the span. | -| value | string | The tag value. This value must match exactly one span with the specified tag key/value pair. | +| key [*required*] | string | The tag key name. This must be the same key used when setting the tag on the span. | +| value [*required*] | string | The tag value. This value must match exactly one span with the specified tag key/value pair. | #### EvalMetricsRequestData