This repository is a demonstration of the capabilities of OpenTelemetry Weaver for designing your observability.
The key principle is treating observability (metrics, logs, spans, etc.) just as you would an API.
This project demonstrates the following key capabilities of weaver:
weaver registry check: Ensures defined observability signals match policies (e.g. backwards compatibility)weaver registry generate: Creates example applications.
sides from Observability Day EU 2025 talk
The example application is a dead simple HTTP service that provides "auction" capabilities. New bids are posted to the /auction/{auction_id}/bid endpoint.
This example showed tracking bids via metrics and spans.
- Spans leverage OOTB http semantic conventions from the OpenTelemetry project.
- Metrics use a newly deifned
auction.bid.countmetric, defined in theo11ydirectory.
- The
o11y/direcotry contains all deifned observability signals specific to this application. - THe
docs/o11ydirectory contains autogenerated documentation about the defined metric. - The
go/o11ydirectort contains autogenerated Go library that will simplify writing all defined metrics in the project. - The
policies/directory contains policies that will be enforced on observability signal definitions. - The
templates/registrydirectory contains templates for autogenerating documentation and code.templates/registry/markdowncontains documenation generatoin templates.templates/registry/gocontains Go code generation templates.templates/registry/rustcontains Rust code generation templates.
go/contains the Go example application code.
- Generate code for Go:
make generate-go - Generate code for Rust:
make generate-rust
- Running the Go Example
- Move to the go directory:
cd go - Run the go server
go run . - In a separate terminal, issue some requests
curl localhost:8080/auction/1/bide.g. - Check the prometheus metrics:
curl localhost:2223/metrics
- Move to the go directory:
- Running the Rust Example TODO
Run make generate-docs.
All docs in the docs/ directory will be updated.
Run make check and all defined policies for Weaver will be checked against
defined telemetry.
Note: We recommend inlcuding policy checks in CI/CD pipelines.