From f94b58c0d2a17f7d3f3299cf6cc0dd06aeeb4d74 Mon Sep 17 00:00:00 2001 From: Jacob Simpher Date: Tue, 14 Oct 2025 16:23:01 -0400 Subject: [PATCH 1/3] add prompt template to auto instrumentation llm docs --- .../llm_observability/instrumentation/auto_instrumentation.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/content/en/llm_observability/instrumentation/auto_instrumentation.md b/content/en/llm_observability/instrumentation/auto_instrumentation.md index 046bbd12a7605..824b87735f511 100644 --- a/content/en/llm_observability/instrumentation/auto_instrumentation.md +++ b/content/en/llm_observability/instrumentation/auto_instrumentation.md @@ -104,6 +104,8 @@ The LangChain integration instruments the following methods: - [Retrieval][25] - `langchain_community..similarity_search()` - `langchain_pinecone.similarity_search()` +- [Prompt Templating][64] + - `BasePromptTemplate.invoke()`, `BasePromptTemplate.ainvoke()` ## Amazon Bedrock @@ -375,6 +377,7 @@ Both the `run_live` and `run_async` methods are supported. [61]: https://google.github.io/adk-docs/agents/ [62]: https://google.github.io/adk-docs/tools [63]: https://google.github.io/adk-docs/agents/llm-agents/#code-execution +[64]: https://python.langchain.com/docs/concepts/#prompt-templates {{% /tab %}} {{% tab "Node.js" %}} From 7f9d43778d697e9aeb5f73fc4bb9f1c11f73adf2 Mon Sep 17 00:00:00 2001 From: Jacob Simpher Date: Mon, 20 Oct 2025 16:51:07 -0400 Subject: [PATCH 2/3] add note about variable names --- .../llm_observability/instrumentation/auto_instrumentation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/en/llm_observability/instrumentation/auto_instrumentation.md b/content/en/llm_observability/instrumentation/auto_instrumentation.md index 824b87735f511..5611877d6e11c 100644 --- a/content/en/llm_observability/instrumentation/auto_instrumentation.md +++ b/content/en/llm_observability/instrumentation/auto_instrumentation.md @@ -107,6 +107,8 @@ The LangChain integration instruments the following methods: - [Prompt Templating][64] - `BasePromptTemplate.invoke()`, `BasePromptTemplate.ainvoke()` + **Note**: For best results, assign templates to variables with meaningful names, as auto-instrumentation uses these names to identify prompts. + ## Amazon Bedrock The Amazon Bedrock integration provides automatic tracing for the Amazon Bedrock Runtime Python SDK's chat model calls (using [Boto3][5]/[Botocore][6]). From 75fa6d3ad73d94c2547faa2880c71e2c1c84ef40 Mon Sep 17 00:00:00 2001 From: Jacob Simpher Date: Thu, 23 Oct 2025 10:38:32 -0400 Subject: [PATCH 3/3] add example inline to auto intr --- .../instrumentation/auto_instrumentation.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/en/llm_observability/instrumentation/auto_instrumentation.md b/content/en/llm_observability/instrumentation/auto_instrumentation.md index 5611877d6e11c..522eec63f3ad2 100644 --- a/content/en/llm_observability/instrumentation/auto_instrumentation.md +++ b/content/en/llm_observability/instrumentation/auto_instrumentation.md @@ -109,6 +109,12 @@ The LangChain integration instruments the following methods: **Note**: For best results, assign templates to variables with meaningful names, as auto-instrumentation uses these names to identify prompts. + ```python + # "translation_template" will be used to identify the template in Datadog + translation_template = PromptTemplate.from_template("Translate {text} to {language}") + chain = translation_template | llm + ``` + ## Amazon Bedrock The Amazon Bedrock integration provides automatic tracing for the Amazon Bedrock Runtime Python SDK's chat model calls (using [Boto3][5]/[Botocore][6]).