Connect your agent
Polaris
Export agent, model and tool activity from an existing Polaris application.
Polaris tracing plugins record agent invocations, model requests and tool calls. Configure the OpenTelemetry plugin in your existing server to export that activity to Radiant Platform.
Configure export
Section titled “Configure export”Enable the otel feature on your existing polaris-ai dependency, keeping its pinned revision and other enabled features. Get the traces endpoint and ingestion key from Set up your project and configure the application’s environment:
export RADIANT_TRACES_ENDPOINT='https://YOUR_INGESTION_HOST/v1/traces'export RADIANT_INGESTION_KEY='YOUR_INGESTION_KEY'export OTEL_SERVICE_NAME='YOUR_APPLICATION_NAME'In the application’s existing server setup, register ServerInfoPlugin and TracingPlugin if they are not already present. Add the exporter before calling server.finish().await?:
use polaris_ai::plugins::OpenTelemetryPlugin;
server.add_plugins( OpenTelemetryPlugin::new(std::env::var("RADIANT_TRACES_ENDPOINT")?) .with_service_name(std::env::var("OTEL_SERVICE_NAME")?) .with_env_filter("info,polaris=debug") .with_export_header( "Authorization", format!("Bearer {}", std::env::var("RADIANT_INGESTION_KEY")?), ),);This fragment uses the application’s existing server inside an async function returning Result. Keep the application’s model, tool and session plugins. Call server.cleanup().await during shutdown to flush pending spans.
Capture messages and tool payloads
Section titled “Capture messages and tool payloads”Content capture is opt-in. To export model messages and tool arguments and results, update your existing TracingPlugin registration:
use polaris_ai::plugins::TracingPlugin;
server.add_plugins(TracingPlugin::default().with_capture_genai_content());Keep any other options configured on that builder. Enable capture only for payloads you intend to export. Recorded messages appear in the model operation’s Thread tab; tool payloads appear on the corresponding tool operations.
Add attributes
Section titled “Add attributes”For deployment context, append a resource attribute to the exporter builder configured earlier:
.with_resource_attribute("deployment.environment.name", "production")Resource attributes describe the process producing telemetry and apply to its exported spans. They are not per-request values.
Polaris sessions already record the conversation identifier as gen_ai.conversation.id. Open Conversations in Logs to inspect the session’s turns together. To identify agent releases, add version to your existing Agent implementation:
fn version(&self) -> Option<&str> { Some(env!("CARGO_PKG_VERSION"))}Session invocations record this value as gen_ai.agent.version, which appears in Agents and versions. Here it uses the application’s Cargo package version. See Telemetry reference for the recognized fields.
Check the recorded activity
Section titled “Check the recorded activity”Run a normal agent request and open the project’s Logs. Polaris session turns emit agent invocations with agent identity and conversation identifiers; model and tool calls appear beneath the invocation.
Find the invocation in All agent runs, or use All traces to check the exported operations. See Runs and traces to inspect them and Telemetry reference if activity is missing.
Copyright © 2026, Radiant AI Limited.