From 3e05a9e4fb18a10e9907cdaa489bdab1cc907f3d Mon Sep 17 00:00:00 2001 From: Liudmila Molkova Date: Mon, 21 Oct 2024 19:02:13 -0700 Subject: [PATCH] add clarification --- docs/database/database-spans.md | 6 +++++- docs/gen-ai/gen-ai-spans.md | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/database/database-spans.md b/docs/database/database-spans.md index c227e5a021..2839163b94 100644 --- a/docs/database/database-spans.md +++ b/docs/database/database-spans.md @@ -45,7 +45,11 @@ linkTitle: Client Calls > for at least six months after it starts emitting both sets of conventions. > * SHOULD drop the environment variable in the next major version. -**Span kind:** SHOULD be `CLIENT`. +**Span kind:** SHOULD be `CLIENT`. It MAY be set to `INTERNAL` on spans representing +in-memory database calls. +It's RECOMMENDED to use `CLIENT` kind when database system being instrumented usually +runs in a different process than its client or when database calls happen over +instrumented protocol such as HTTP. Span that describes database call SHOULD cover the duration of the corresponding call as if it was observed by the caller (such as client application). For example, if a transient issue happened and was retried within this database call, the corresponding span should cover the duration of the logical operation diff --git a/docs/gen-ai/gen-ai-spans.md b/docs/gen-ai/gen-ai-spans.md index 4dd4820669..34c09191e1 100644 --- a/docs/gen-ai/gen-ai-spans.md +++ b/docs/gen-ai/gen-ai-spans.md @@ -18,7 +18,11 @@ linkTitle: Generative AI traces A request to an Generative AI is modeled as a span in a trace. -**Span kind:** SHOULD always be `CLIENT`. +**Span kind:** SHOULD be `CLIENT`. It MAY be set to `INTERNAL` on spans representing +call to models running in the same process. +It's RECOMMENDED to use `CLIENT` kind when GenAI system being instrumented usually +runs in a different process than its client or when GenAI call happens over +instrumented protocol such as HTTP. ## Name