Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

For an AI agent hosted in Microsoft Foundry, connect an Application Insights resource to the project to start server-side tracing. For agent code running outside the hosted service, use instrumentation documented for its framework or the OpenTelemetry SDK and an Azure Monitor exporter. Then query the resulting telemetry in Log Analytics and bring selected, aggregated results into Power BI. In this documented Microsoft-centered setup, Power BI is the reporting layer—not the agent tracing SDK or trace backend.

What does the end-to-end pipeline look like?

The path is: instrument the agent at the boundary you need to observe, export telemetry to Azure Monitor Application Insights, inspect and query it in Log Analytics, then load a deliberate subset of query results into Power BI.

  1. Trace the hosted agent. If the agent runs in Microsoft Foundry, connect Application Insights to the project and begin with server-side tracing. Foundry stores traces using OpenTelemetry semantic conventions.
  2. Instrument application code outside the hosted service. Add framework-specific instrumentation or SDK spans for code whose behavior is not visible from the hosted service alone.
  3. Verify in Azure Monitor. Run a representative agent interaction and inspect the trace before building reports.
  4. Query in Log Analytics. Filter and aggregate the telemetry with KQL for the service, time range, and dimensions that the report needs.
  5. Load results into Power BI. Choose a query export, dataset, or dataflow path according to where you need to transform and reuse the data.

This is a documented Microsoft/Azure route, not a universal recipe for every agent framework, hosting provider, language, or Power BI tenant. Instrumentation and available fields vary by integration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should you use server-side or client-side tracing?

Approach What it observes Effort and trade-off
Server-side tracing Operations handled by a Microsoft Foundry-hosted agent service. Recommended starting point in Microsoft’s Foundry setup instructions; connect Application Insights to the project.
Client-side instrumentation Custom application code surrounding calls to the hosted agent. Requires instrumentation in that application, but adds visibility into logic outside the hosted service.

Use the smallest boundary that answers the operational question. If you need to explain application behavior before or after an agent call, hosted-service traces alone may not show those custom operations; instrument that code separately.

How do you instrument an agent outside the hosted service?

Use a documented integration where one fits

Instrumentation is framework-specific. Microsoft’s Python framework guidance documents a path using microsoft-opentelemetry, use_microsoft_opentelemetry, Azure Monitor export, and agent identity options. The code samples in that guidance require Python 3.10 or later. Treat the package and setup as an example for the integrations it documents, not as code that applies to every framework.

Use the OpenTelemetry SDK when the documented framework path is not the one you need

Microsoft’s OpenAI Agents SDK example configures an OpenTelemetry SDK/provider with the Azure Monitor exporter. It uses console export for local debugging when an Application Insights connection string is absent. Follow the integration’s own setup rather than assuming this configuration works unchanged for another agent SDK.

Configure identity and secrets deliberately

The Microsoft examples use an Application Insights connection string and can add agent ID and name attributes. Keep connection strings and other secrets in environment configuration rather than embedding them in shared code. After deployment, inspect telemetry to confirm that the intended service and agent identity are present.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should traces include prompts, responses, or tool content?

Decide this before enabling content capture. Depending on the integration and settings, telemetry can include prompts, model responses, tool arguments, or tool results. Microsoft’s integration guidance also describes experimental GenAI convention options for some integrations; capture controls and behavior are not identical across packages.

  • Check what content the selected instrumentation actually records.
  • Confirm the destination, who can access the telemetry, and the applicable retention policy.
  • Enable message-body capture only when the operational value justifies placing that content in telemetry.

How do you verify that traces are arriving?

  1. Run a representative agent interaction after connecting the exporter or enabling Foundry tracing.
  2. Inspect the trace in the relevant Azure portal experience. Check for the root agent operation and the child operations needed to understand the run.
  3. For the Foundry/framework workflow described by Microsoft, traces typically appear within 2–5 minutes after agent execution. This is a documented expectation for that setup, not a service guarantee.
  4. If the trace is absent or incomplete, check the selected integration’s exporter configuration, connection string, and deployed service identity. Resolve missing spans before treating a Power BI report as complete.

Which Log Analytics tables can hold the telemetry?

Application Insights maps common OpenTelemetry signals to tables including these. The signal, instrumentation, and workspace schema determine which fields and records are actually available, so verify the target workspace rather than assuming every table or attribute will be populated.

Table Common signal or use
AppTraces Logs
AppRequests Incoming requests
AppDependencies Outgoing dependencies
AppExceptions Exceptions
AppMetrics Metrics

In Log Analytics, write and validate a KQL query that selects the service, time window, and dimensions required for the report. Aggregate there when a summarized result is sufficient; sending a smaller, purposeful result set downstream makes the reporting model easier to manage.

How do you move query results into Power BI?

Route Where it leads Best fit
Power BI (as an M query) Exports an M query for use in Power BI Desktop. Build or manage the report and query in Desktop.
Power BI (new Dataset) Creates a dataset in the Power BI service. Create the dataset directly in the service, if you have the required workspace permission.
Azure Log Analytics connector in a Power BI dataflow Uses a dataflow for shared preparation or transformations. Reuse preparation logic before reports consume the data.

To use either query-export option, run and validate the KQL query in Log Analytics, then choose the corresponding Power BI export. A dataflow is an alternative when shared transformations are useful; it is not required for every report.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Log Analytics query export is subject to Query API limits. If a response exceeds the maximum size, the export can contain partial results. Filter and aggregate the query to a manageable result set, and verify that the exported data is complete before relying on it for reporting.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What permissions, refresh, and licensing should you check?

  • Exporting a query to Desktop: requires workspace query-read permission; Microsoft gives Log Analytics Reader as an example.
  • Creating a dataset directly in the service: requires workspace write permission; Microsoft gives Log Analytics Contributor as an example.
  • Incremental refresh: the query output needs a datetime field.
  • Advanced Power BI capabilities: sharing, scheduled refresh, dataflows, or incremental refresh may require Pro or Premium, depending on the feature. Confirm the current tenant licensing and permissions before deployment.

Is the Azure Monitor OpenTelemetry collector path production-ready?

The cited Azure Monitor OpenTelemetry collection documentation is marked Preview. It describes collector export over OTLP HTTP/protobuf and notes other limitations for particular ingestion paths. Preview status, protocol support, and limitations can change, so verify the current Microsoft documentation and the target environment before adopting this path for production. Do not infer that preview collector guidance applies to every exporter route in this article.

What should you settle before publishing a dashboard?

  • Choose the tracing boundary and confirm whether custom application code needs separate spans.
  • Validate the actual workspace schema and fields produced by the selected instrumentation.
  • Decide whether message content belongs in telemetry and verify access and retention controls.
  • Check for complete query exports, appropriate permissions, and tenant licensing for the refresh and sharing features you plan to use.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.