open-telemetry / weaver

OTel Weaver lets you easily develop, validate, document, and deploy semantic conventions
Apache License 2.0
52 stars 19 forks source link
codegen documentation observability opentelemetry policy semconv

OpenTelemetry Weaver

build codecov build License Slack

Getting started | Main commands | Generate Doc & Code | Architecture | Change log | Contributing | Links |

[!NOTE] Codegen authors, please refer to the following documentation to learn how to use Weaver for generating code from semantic conventions:

What is OpenTelemetry Weaver?

OTel Weaver is a comprehensive tool designed to enable developers to easily develop, validate, document, and deploy semantic conventions (phase 1) and application telemetry schemas (phase 2). As an open, customizable, and extensible platform, it aims to serve both as a standalone developer tool and as an integral component within CI/CD pipelines—whether for the OpenTelemetry project itself, other open-source projects, vendor solutions, or even large-scale enterprise deployments leveraging OpenTelemetry.

Semantic Conventions and Application Telemetry Schema

Design Principles

Weaver is built upon principles of extensibility, customizability, scalability, robustness, reliability, and cross-platform compatibility.

Key Features

Scalability

Robustness and Reliability

Cross-Platform Compatibility

Getting started

Currently, weaver can be consumed in one of three ways:

Pre-built Binaries

Weaver release attach pre-built binaries for supported platforms with every release. Instructions for installing are included in these release notes.

See: Weaver Releases

Docker Image

Weaver deploys a docker image for development to docker hub.

Instructions for using the docker image can be found here.

Building from source

To install the tool from source. you need to have Rust installed on your system (see Install Rust).

To build the tool:

The generated weaver binary will be located in the target/debug directory for debug mode or the target/release directory for release mode.

To run a registry check, use the following command:

cargo run -- registry check

This command will check the OpenTelemetry Semantic Convention Registry by default.

To check a set of policies against the registry, use the following command:

cargo run -- registry check -b path/to/policies

An example of a policy file can be found here schemas/otel_policies.rego.

Main commands

In phase 1, the only supported commands are related to the management of Semantic Convention Registries. The following commands are available:

Command Description
weaver registry check Check the validity of a semconv registry
weaver registry resolve Resolve a semconv registry
weaver registry generate Generate artifacts from a semconv registry
weaver registry update-markdown Update semconv snippet-based markdown files
weaver registry stats Generate statistics on a semconv registry

Phase 2 will introduce commands related to the management of Application Telemetry Schemas.

Documentation

Experimental

Links

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. For more information, please read CONTRIBUTING.

License

OpenTelemetry Weaver is licensed under Apache License Version 2.0.