Giter VIP home page Giter VIP logo

otel-weaver's Introduction

Important Note: This project has been moved to the OpenTelemetry Weaver project.

OTel Weaver (status: Archived)

Overview

At this stage, the project is being used as a Proof of Concept to explore and refine the 'Application Telemetry Schema: Vision and Roadmap' OTEP, which has been approved and merged.

This project is a work in progress and is not ready for production use.

OTel Weaver is a CLI tool that enables users to:

  • Search for and retrieve information from a semantic convention registry or a telemetry schema.
  • Resolve a semantic convention registry or a telemetry schema.
  • Generate a client SDK/API from a telemetry schema.

Install

Currently, there is no binary distribution available. To install the tool, you must build it from source. To do so, you need to have Rust installed on your system (see Install Rust).

To build the tool:

  • In debug mode, run the following command:
    cargo build
    
  • In release mode, run the following command:
    cargo build --release
    

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

Usage

Usage: weaver [OPTIONS] [COMMAND]

Commands:
  resolve     Resolve a semantic convention registry or a telemetry schema
  gen-client  Generate a client SDK or client API
  languages   List all supported languages
  search      Search in a semantic convention registry or a telemetry schema
  help        Print this message or the help of the given subcommand(s)

Options:
  -d, --debug...  Turn debugging information on
  -h, --help      Print help
  -V, --version   Print version

Command search

This command provides an interactive terminal UI, allowing users to search for attributes and metrics specified within a given semantic convention registry or a telemetry schema (including dependencies).

To search into the OpenTelemetry Semantic Convention Registry, run the following command:

weaver search registry https://github.com/open-telemetry/semantic-conventions.git model 

To search into a telemetry schema, run the following command:

weaver search schema demo/app-telemetry-schema.yaml

This search engine leverages Tantivy and supports a simple search syntax in the search bar.

Command resolve

This command resolves a schema or a semantic convention registry (not yet implemented) and displays the result on the standard output. Alternatively, the result can be written to a file if specified using the --output option. This command is primarily used for validating and debugging telemetry schemas and semantic convention registries.

weaver resolve schema telemetry-schema.yaml --output telemetry-schema-resolved.yaml

A "resolved schema" is one where:

  • All references have been resolved and expanded.
  • All overrides have been applied.
  • This resolved schema is what the code generator and upcoming plugins utilize.

Command gen-client

This command generates a client SDK from a telemetry schema for a given language specified with the --language option.

weaver gen-client --schema telemetry-schema.yaml --language go

In the future, users will be able to specify the protocol to use for the generated client SDK (i.e. OTLP or OTel Arrow Protocol) and few others options.

Command languages

This command displays all the languages for which a client SDK/API can be generated.

weaver languages

Architecture

The OTel Weaver tool is architecturally designed as a platform. By default, this tool incorporates a template engine that facilitates Client SDK/API generation across various programming languages. In the future, we plan to integrate a WASM plugin system, allowing the community to enhance the platform. This would pave the way for features like enterprise data catalog integration, privacy policy enforcement, documentation generation, dashboard creation, and more.

Below is a diagram detailing the primary components of the OTel Weaver tool.

OTel Weaver Platform

ToDo

Semantic Convention Registry and Application Telemetry Schema

  • Add support for open enum types (i.e. allow custom values=true).
  • Add support for template types.
  • Add support for all in telemetry schema versions section.
  • Add support for span_events in telemetry schema versions section.
  • Add support for apply_to_spans in telemetry schema versions section.
  • Add support for apply_to_metrics in telemetry schema metrics versions section.
  • Add support for split in telemetry schema metrics versions section.
  • Add support for group constraints any_of, ...
  • Support more than 2 levels of telemetry schema inheritance.
  • Minimize number of declaration duplications in the resolved schema (especially for attributes).

Client SDK/API Code Generation

  • Generate Go Client SDK/API on top of the generic Go Client SDK/API.
    • Generate type-safe API for metric groups.
    • Support obfuscation and masking.
  • Generate Go Client SDK/API with support for OTel Arrow Protocol.
  • Generate Rust Client SDK/API on top of the generic Rust Client SDK/API.
  • Generate Rust Client SDK/API with support for OTel Arrow Protocol.

Tooling and Plugins

  • Add support for WASM plugins.
  • Add Tera filter to apply obfuscation, masking, ... based on tags and language configuration.

Links

Internal links:

External 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

OTel Weaver is licensed under Apache License Version 2.0.

otel-weaver's People

Contributors

lquerel avatar dependabot[bot] avatar

Stargazers

 avatar Sascha avatar Johannes Tax avatar  avatar

Watchers

Josh Suereth avatar  avatar Joshua MacDonald avatar

otel-weaver's Issues

Implement the process for resolving a Semantic Convention Registry

The resolution process for a semconv registry must:

  • Load and parse files from a local or remote semconv registry.
  • Resolve all the ref clauses.
  • Resolve all the extends clauses.
  • Attach versioning info to elements covered in the telemetry schema v1.1.0 section versions.
  • Attach lineage and provenance to registry elements.
  • Output a serializable data structure representing the resolved registry.

Implement the `weaver search registry` subcommand

The weaver search registry subcommand must:

  • Read the resolved registry from issue #35.
  • Index all the data from this resolved registry to enable an interactive search UI.
  • Create TUI (Text-based User Interface) screens for each registry concept (e.g., attributes, metrics, spans, logs, events, resources).
    • Include all fields.
    • Display the lineage and provenance information computed in the resolution process.

Implement an example of `weaver generate registry` subcommand

The weaver generate registry subcommand must demonstrate one of the following capabilities:

  • Generate HTML documentation for a registry (weaver generate registry doc-html).
  • Generate code for a registry in a specific language (weaver generate registry go-semconv).
  • Generate a dashboard configuration for elements defined in a semconv registry.
  • Or any other useful subcommand to demonstrate the generate registry command.

The main goal is to create a framework for generating various outputs from a resolved semconv registry.

Add more tests to validate the semconv registry resolution process

Right now it's not obvious that the existing tests cover all the various configurations observed in the existing official semconv registry.

The current tests are located in the weaver_resolver crate and more specifically in the registry module.
The new data model used to represent the resolved registry is present in the weaver_resolved_schema crate.

Note: there is a previous attempt, in the code base, for this resolution process trying to resolve both the semconv registry and the telemetry schema. This part of the code will be removed soon.

Automate GitHub releases for the project

Use cargo-dist or similar tools to automatically generate releases.
Ideally, each release should contain binaries for the three major operating systems (Linux, macOS, and Windows).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.