This example uses OpenTelemetry Collector, a vendor-agnostic implementation of how to receive, process and export telemetry data. OpenTelemetry Collector works with Unikraft / Unikraft Cloud to process telemetry data.
To run this example, follow these steps:
-
Install the
kraftCLI tool and a container runtime engine, for example Docker. -
Clone the
examplesrepository andcdinto theexamples/opentelemetry-collector/directory:
Code
Make sure to log into Unikraft Cloud by setting your token and a metro close to you.
This guide uses fra (Frankfurt, 🇩🇪):
Code
When done, invoke the following command to deploy this app on Unikraft Cloud:
Code
The output shows the instance address and other details:
Code
In this case, the instance name is opentelemetry-collector-bvtnh.
They're different for each run.
Note that the instance doesn't export a service. The default configuration can receive telemetry data from other instances by specifying the private IP or internal DNS as destination. The only configured exporter is the debug exporter. Feel free to change and redeploy!
You can list information about the instance by running:
Code
Code
When done, you can remove the instance:
Code
Customize your app
To customize the OpenTelemetry Collector app, update Kraftfile or, more likely, the rootfs/etc/otel/config.yaml files:
Code
You can update the rootfs/etc/otel/config.yaml file as detailed in the documentation.
Such as adding another export, apart from the debug exporter.
Learn more
Use the --help option for detailed information on using Unikraft Cloud:
Code
Or visit the CLI Reference.