This is a plugin that makes it easy to use OTel with Spin.
Spin applications have the ability to export metrics and trace data. This plugin provides dashboards for viewing the data.
This plugin relies on third-party software to work properly. Please be sure you have the following installed before continuing:
- Latest version of Docker
You can install the otel plugin either using a stable release or from the main branch.
The latest stable release of the otel plugin can be installed as shown here:
spin plugins update
spin plugin install otelThe canary release of the otel plugin represents the most recent commit on main (HEAD) and may not be stable, with some features still in progress.
spin plugins install --url https://github.com/fermyon/otel-plugin/releases/download/canary/otel.jsonAlternatively, use the spin pluginify plugin to install from a fresh build. This will use the pluginify manifest (spin-pluginify.toml) to package the plugin and proceed to install it:
spin plugins install pluginify
go build -o otel
spin pluginify --installThe otel plugin currently supports two different observability stacks:
- Default: Multi-container observability stack based on Prometheus, Loki, Grafana and Jaeger
- Aspire: Single-container observability stack using .NET Aspire Dashboard
Once the plugin is installed, you can try the below commands:
You chose the desired observability stack as part of the setup command. You can change the observability stack at any point in time by cleaning it up and re-running the setup command using another stack.
spin otel setupspin otel setup --aspirespin otel upAny flags that work with the spin up command, will work with the spin otel up command.
spin otel up -- --helpDepending on the chosen observability stack, you can use the sub-commands of spin otel open to open corresponding dashboards using your default browser.
Dashboard for viewing metrics and logs:
spin otel open grafanaDashboard for viewing trace data:
spin otel open jaegerDashboard for querying and viewing metrics:
spin otel open prometheus.NET Aspire Dashboard (all-in-one).
spin otel open aspirespin otel cleanup