Compatible content libraries

Content-level trace collection in Posit Connect uses the R otelsdk package to emit traces. Only R applications that use the otelsdk (or an R package that integrates with it) can emit traces visible in the Connect traces viewer.

If you have enabled trace collection but are not seeing traces for your R content, ensure that your application dependencies include compatible versions of the libraries listed below.

Compatible R packages

The following R packages are known to emit OpenTelemetry traces via otelsdk. This list is not exhaustive and may not reflect all compatible packages. Update to the minimum version listed (or later) to enable trace emission.

Package Minimum version What it traces
shiny 1.12.0 Web application requests and sessions
plumber2 0.2.0 API endpoint execution
httr2 1.2.2 Outbound HTTP requests
DBI 1.3.0 Database queries
ellmer 0.5.0 Large Language Model (LLM) interactions
knitr 1.51 Document rendering
testthat 3.3.2 Test execution
mirai 2.5.0 Parallel computing tasks

These packages automatically emit traces when the otelsdk package is available and OpenTelemetry is configured. You do not need to make additional application code changes beyond upgrading the package version.

Note

When you upgrade a library that adds tracing support, you must re-deploy (re-activate the bundle) for Connect to pick up the new dependency versions.

Verifying trace emission

After upgrading your dependencies and redeploying:

  1. Open the content in Connect.
  2. Navigate to the Traces viewer from the content header.
  3. Select a job from the job list.
  4. If traces are available, they appear as an interactive flame graph.

If you still do not see traces after upgrading and redeploying, confirm that your Connect administrator has enabled OpenTelemetry and that you have enabled trace collection for this content.