OpenTelemetry Collector
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 unikraft CLI. You need a BuildKit builder. The easiest way to get one is via Docker. Alternatively, you can also directly set up and use BuildKit, see the quick start.
-
Clone the
examplesrepository andcdinto theexamples/opentelemetry-collector/directory:Code
Make sure to log into Unikraft Cloud and pick 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 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. Use port 4317 for gRPC and port 4318 for HTTP. 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:
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.