Compatible content libraries
Content-level trace collection in Posit Connect uses the R otelsdk package to emit traces. R applications that use the otelsdk package or an R package that integrates with it can emit traces that Connect can retain when trace collection is enabled.
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 emit OpenTelemetry traces through the otelsdk package. This list is not exhaustive and might not include 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 your Connect administrator enables OpenTelemetry. You do not need to make additional application code changes beyond upgrading the package version.
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:
- Open the content in Connect.
- Use the Get content traces API to request traces.
- If traces are available, the API returns newline-delimited JSON (NDJSON), with one OpenTelemetry Protocol (OTLP) JSON object per line.
If you still do not see traces after upgrading and redeploying, ask your Connect administrator to confirm that their configuration enables OpenTelemetry and permits content instrumentation. Confirm that you enabled trace collection for this content.