- Notifications
You must be signed in to change notification settings - Fork4
R API for OpenTelemetry
License
Unknown, MIT licenses found
Licenses found
r-lib/otel
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
OpenTelemetry API for R packages and projects
OpenTelemetry is an observability framework.OpenTelemetry is a collection of tools,APIs, and SDKs used to instrument, generate, collect, and exporttelemetry data such as metrics, logs, and traces, for analysis in orderto understand your software’s performance and behavior.
For an introduction to OpenTelemetry, see theOpenTelemetry websitedocs.
To learn how to instrument your R code, seeGettingStarted. Forproject status, installation instructions and more, read on.
- Lightweight packages. otel is a small R package without dependenciesand compiled code. otelsdk needs a C++11 compiler and otel.
- Minimal performance impact when tracing is disabled. otel functions donot evaluate their arguments in this case.
- Zero-code instrumentation support. Add tracing to (some) functions ofselected packages automatically.
- Configuration via environment variables.
- Minimal extra code. Add tracing to a function with a single extrafunction call.
- Production mode: otel functions do not crash your production app inproduction mode.
- Development mode: otel functions error early in development mode.
Setotel_tracer_name to the desired tracer name. (See?otel_tracer_name.) Then addotel::start_local_active_span() callsto the functions you want to trace:
otel_tracer_name<-"<package-id>"fn<-function(...) {spn<-otel::start_local_active_span("fn")...}
SeeGettingStarted fordetails.
Use theotel package as a dependency ifyou want to instrument your R package or project for OpenTelemetry.
Use theotelsdk package to produceOpenTelemetry output from an R package or project that was instrumentedwith the otel package.
The current status of the major functional components for OpenTelemetryR is as follows:
| Traces | Metrics | Logs |
|---|---|---|
| Development | Development | Development |
otel and otelsdk support R 3.6.0 and higher on Unix and R 4.3.0 orhigher on Windows.
Install otel from CRAN:
# install.packages("pak")pak::pak("otel")
You can install the development version of otel fromGitHub with:
# install.packages("pak")pak::pak("r-lib/otel")
MIT © Posit, PBC
About
R API for OpenTelemetry
Resources
License
Unknown, MIT licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.