Skip to content

Permissions ​

The plugin is named otel, which is the prefix of its commands (plugin:otel|log) and of its permission identifiers (otel:default). It exposes two commands to the webview, and nothing else.

commandwhat the webview sends
loga batch of log records, each offered to the export floor
export_spansa batch of finished spans; returns how many were accepted

Neither command can fail. Malformed input is dropped, counted, and reported through the Rust side's own log.

Identifiers ​

identifierwhat it does
otel:defaultallows log and export_spans
otel:allow-logenables the log command
otel:deny-logdenies the log command
otel:allow-export-spansenables the export_spans command
otel:deny-export-spansdenies the export_spans command

The allow-* and deny-* permissions are generated by tauri-plugin from the command list in build.rs; the default set is permissions/default.toml.

Granting it ​

json
{ "identifier": "main", "windows": ["main"], "permissions": ["otel:default"] }

Both commands are allowed by default, and neither can do harm: they only hand the page's own telemetry to the exporter, which drops what does not parse and exports under the app's identity, not the page's. The worst a hostile page could do with them is spend the app's collector quota.

An app that does not instrument its frontend should leave otel:default out of its capability rather than narrow it. The Rust half exports either way.

Without the capability ​

The guest package never throws into the page. When the plugin is present but cannot be reached, for example because the capability does not grant it, the first failure prints one console.warn:

text
tauri-plugin-otel: telemetry is not reaching the app, and will be dropped

Every later call is dropped silently.

Released under the MIT License.