zig-o11y/opentelemetry-sdk
An implementation of @open-telemetry SDK in @ziglang
mastermasterrefsCAUTION This project is in alpha stage. While it is ready for usage and testing, it has not been battle-tested in production environments. Use with caution and expect breaking changes between releases.
This is an implementation of the OpenTelemetry specification for the Zig programming language.
The version of the OpenTelemetry specification targeted here is 1.48.0.
Run the following command to add the package to your build.zig.zon dependencies, replacing <ref> with a release version:
zig fetch --save "git+https://github.com/zig-o11y/opentelemetry-sdk#<ref>"
Then in your build.zig:
const sdk = b.dependency("opentelemetry-sdk", .{
.target = target,
.optimize = optimize,
});
| Signal | Status |
|---|---|
| Traces | ✅ |
| Metrics | ✅ |
| Logs | ✅ |
| Profiles | ❌ |
| Feature | Status |
|---|---|
| HTTP/Protobuf | ✅ |
| HTTP/JSON | ✅ |
| gRPC | ❌ |
| Compression (gzip) | ✅ |
Check out the examples folder for practical usage examples of traces, metrics, and logs.
We welcome contributions! Please see CONTRIBUTING.md for guidelines on how to contribute to this project, including:
This project originated from a proposal in the OpenTelemetry community to create a native Zig implementation of the OpenTelemetry SDK.
You can read more about the original proposal and discussion at:
https://github.com/open-telemetry/community/issues/2514
For a more in-depth read of why OpenTelemetry needs a Zig SDK, see "Zig is great for Observability".