Caution
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.
- Provide a Zig library implementing the stable features of an OpenTelemetry SDK
- Provide a reference implementation of the OpenTelemetry API
- Provide examples on how to use the library in real-world use cases
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:
- Running tests locally
- Running benchmarks
- Test and benchmark options
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:
For a more in-depth read of why OpenTelemetry needs a Zig SDK, see "Zig is great for Observability".
