Skip to content

feat(llm-obs): Patterns - array bracket notation in templates#38222

Open
GLorenzo679 wants to merge 3 commits into
masterfrom
dd/gabriele.lorenzo/patterns-save-validation
Open

feat(llm-obs): Patterns - array bracket notation in templates#38222
GLorenzo679 wants to merge 3 commits into
masterfrom
dd/gabriele.lorenzo/patterns-save-validation

Conversation

@GLorenzo679

@GLorenzo679 GLorenzo679 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

What does this PR do? What is the motivation?

Updates content/en/llm_observability/monitoring/patterns.md to document that template array access requires bracket notation.

To access array elements, use bracket notation: {{meta.input.messages[0].content}}.

Source PRs that made this change necessary:

@datadog-staging-us1-crawler-test

Copy link
Copy Markdown

View session in Datadog

Bits Code status: ✅ Done

CI Auto-fix: Disabled | Enable

Comment @datadog-staging to request changes

@datadog-staging

Copy link
Copy Markdown

I can only run on private repositories.

@github-actions

Copy link
Copy Markdown
Contributor

Preview links (active after the build_preview check completes)

Modified Files

@evazorro evazorro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for updating the docs! I added a tiny suggestion (on existing language, not something you changed) for a Vale warning, but this is good to go otherwise.

- **Which spans do you want to cluster?:** Filter by application, environment, span type, or other tags to scope the Pattern to a specific slice of traffic.
- **Sampling Rate:** The percentage of matching interactions to include. Patterns processes up to 10,000 records per run; if your filter matches more than that, records are randomly sampled down to the cap.
5. Under **What should we detect Patterns on?**, enter a template that defines what gets sent to the model for analysis. Use {{variable}} syntax to reference any span field — for example, {{meta.input.value}} to analyze patterns by user input, or {{meta.span.kind}} to analyze by span kind. Click {{< ui >}}Template Examples{{< /ui >}} to see common configurations. As you type, the right panel previews matching spans and shows what percentage of interactions have values for the variables you've referenced.
5. Under **What should we detect Patterns on?**, enter a template that defines what gets sent to the model for analysis. Use `{{variable}}` syntax to reference any span field — for example, `{{meta.input.value}}` to analyze patterns by user input, or `{{meta.span.kind}}` to analyze by span kind. To access array elements, use bracket notation: `{{meta.input.messages[0].content}}`. Click {{< ui >}}Template Examples{{< /ui >}} to see common configurations. As you type, the right panel previews matching spans and shows what percentage of interactions have values for the variables you've referenced.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
5. Under **What should we detect Patterns on?**, enter a template that defines what gets sent to the model for analysis. Use `{{variable}}` syntax to reference any span field for example, `{{meta.input.value}}` to analyze patterns by user input, or `{{meta.span.kind}}` to analyze by span kind. To access array elements, use bracket notation: `{{meta.input.messages[0].content}}`. Click {{< ui >}}Template Examples{{< /ui >}} to see common configurations. As you type, the right panel previews matching spans and shows what percentage of interactions have values for the variables you've referenced.
5. Under **What should we detect Patterns on?**, enter a template that defines what gets sent to the model for analysis. Use `{{variable}}` syntax to reference any span field; for example, `{{meta.input.value}}` to analyze patterns by user input, or `{{meta.span.kind}}` to analyze by span kind. To access array elements, use bracket notation: `{{meta.input.messages[0].content}}`. Click {{< ui >}}Template Examples{{< /ui >}} to see common configurations. As you type, the right panel previews matching spans and shows what percentage of interactions have values for the variables you've referenced.

Fixing this existing issue to solve the Vale warning!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants