[Microsoft Foundry] Add Agent Metrics datastream#17422
[Microsoft Foundry] Add Agent Metrics datastream#17422muthu-mps wants to merge 9 commits intoelastic:mainfrom
Conversation
✅ Vale Linting ResultsNo issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
🚀 Benchmarks reportTo see the full report comment with |
There was a problem hiding this comment.
Pull request overview
Adds a new agent_metrics metrics data stream to the azure_ai_foundry (Microsoft Foundry) integration to collect preview “AI Agents” metrics from Azure Monitor under the Microsoft.CognitiveServices/accounts/projects resource type.
Changes:
- Bumps package version to
0.9.0and adds changelog entry. - Adds
agent_metricsdata stream with fields, sample event, stream template, and ingest pipeline. - Updates user docs (source + built docs) with an Agent metrics section and exported fields reference.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/azure_ai_foundry/manifest.yml | Version bump + adds agent_metrics to policy template and moves azure/metrics vars to input-level. |
| packages/azure_ai_foundry/data_stream/metrics/manifest.yml | Simplifies metrics stream vars (leaves only processors) and adds title/description. |
| packages/azure_ai_foundry/data_stream/agent_metrics/manifest.yml | New agent metrics data stream definition. |
| packages/azure_ai_foundry/data_stream/agent_metrics/agent/stream/stream.yml.hbs | New Azure Monitor metrics query template for agent metrics. |
| packages/azure_ai_foundry/data_stream/agent_metrics/elasticsearch/ingest_pipeline/default.yml | New ingest pipeline to normalize agent metric field names. |
| packages/azure_ai_foundry/data_stream/agent_metrics/fields/* | New field definitions for agent metrics (ECS/base + package + agent metrics fields). |
| packages/azure_ai_foundry/data_stream/agent_metrics/sample_event.json | Example event for the agent metrics data stream. |
| packages/azure_ai_foundry/docs/README.md | Adds Agent metrics documentation and a full example event + exported fields table. |
| packages/azure_ai_foundry/_dev/build/docs/README.md | Regenerated built docs to include agent metrics event/fields. |
| packages/azure_ai_foundry/changelog.yml | Adds 0.9.0 enhancement entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| The Microsoft Foundry agent metrics provide visibility into agent activity and usage, such as token consumption, runs, and tool calls. | ||
|
|
||
| An example event for `agent` looks as following: |
There was a problem hiding this comment.
Minor grammar in the new agent metrics section: "looks as following" should be "looks as follows", and it would be clearer to reference the data stream name (e.g. agent_metrics / azure.ai_foundry.agent) rather than just agent.
| An example event for `agent` looks as following: | |
| An example event for the `agent_metrics` data stream (dataset `azure.ai_foundry.agent`) looks as follows: |
packages/azure_ai_foundry/data_stream/agent_metrics/agent/stream/stream.yml.hbs
Show resolved
Hide resolved
| resource_type: "Microsoft.CognitiveServices/accounts/projects" | ||
| metrics: | ||
| - name: | ||
| - AgentEvents | ||
| namespace: "Microsoft.CognitiveServices/accounts" | ||
| timegrain: "PT1M" | ||
| ignore_unsupported: true |
There was a problem hiding this comment.
In the resource_groups branch, the metrics blocks use namespace: "Microsoft.CognitiveServices/accounts" while the resource type is Microsoft.CognitiveServices/accounts/projects (and the default resource_query branch uses /accounts/projects). This mismatch will query the wrong Azure Monitor namespace for project-scoped agent metrics; update these namespaces to Microsoft.CognitiveServices/accounts/projects for consistency.
packages/azure_ai_foundry/data_stream/agent_metrics/agent/stream/stream.yml.hbs
Show resolved
Hide resolved
packages/azure_ai_foundry/data_stream/agent_metrics/elasticsearch/ingest_pipeline/default.yml
Show resolved
Hide resolved
💚 Build Succeeded
History
cc @muthu-mps |
Proposed commit message
This PR adds support for Microsoft Foundry Agent metrics. The metrics is in preview state and its subject to change. Please see here for more details on the AI Agent metrics.
The AI Agent metrics is available under
Microsoft.CognitiveServices/accounts/projectsresource type.The alerting rule and the dashboard will be created once the metrics is Generally Available in Azure.
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots