• Stars
    star
    1,586
  • Rank 28,464 (Top 0.6 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Rust OpenTelemetry implementation

OpenTelemetry β€” An observability framework for cloud-native software.

OpenTelemetry Rust

The Rust OpenTelemetry implementation.

Crates.io: opentelemetry Documentation LICENSE GitHub Actions CI codecov Slack

Website | Slack | Documentation

Overview

OpenTelemetry is a collection of tools, APIs, and SDKs used to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. You can export and analyze them using Prometheus, Jaeger, and other observability tools.

Compiler support: requires rustc 1.60+

Project Status

Signal Status
Logs Alpha*
Metrics Alpha
Traces Beta

*OpenTelemetry Rust is not introducing a new end user callable Logging API. Instead, it provides Logs Bridge API, that allows one to write log appenders that can bridge existing logging libraries to the OpenTelemetry log data model. The following log appenders are available:

If you already use the logging APIs from above, continue to use them, and use the appenders above to bridge the logs to OpenTelemetry. If you are using a library not listed here, feel free to contribute a new appender for the same.

If you are starting fresh, then consider using tracing as your logging API. It supports structured logging and is actively maintained.

Project versioning information and stability guarantees can be found here.

Getting Started

use opentelemetry::{
    global,
    sdk::trace::TracerProvider,
    trace::{Tracer, TracerProvider as _},
};

fn main() {
    // Create a new trace pipeline that prints to stdout
    let provider = TracerProvider::builder()
        .with_simple_exporter(opentelemetry_stdout::SpanExporter::default())
        .build();
    let tracer = provider.tracer("readme_example");

    tracer.in_span("doing_work", |cx| {
        // Traced app logic here...
    });

    // Shutdown trace pipeline
    global::shutdown_tracer_provider();
}

See the examples directory for different integration patterns.

Ecosystem

Related Crates

In addition to opentelemetry, the open-telemetry/opentelemetry-rust repository contains several additional crates designed to be used with the opentelemetry ecosystem. This includes a collection of trace SpanExporter and metrics pull and push controller implementations, as well as utility and adapter crates to assist in propagating state and instrumenting applications.

In particular, the following crates are likely to be of interest:

Additionally, there are also several third-party crates which are not maintained by the opentelemetry project. These include:

If you're the maintainer of an opentelemetry ecosystem crate not listed above, please let us know! We'd love to add your project to the list!

Supported Rust Versions

OpenTelemetry is built against the latest stable release. The minimum supported version is 1.60. The current OpenTelemetry version is not guaranteed to build on Rust versions earlier than the minimum supported version.

The current stable Rust compiler and the three most recent minor versions before it will always be supported. For example, if the current stable compiler version is 1.49, the minimum supported version will not be increased past 1.46, three minor versions prior. Increasing the minimum supported compiler version is not considered a semver breaking change as long as doing so complies with this policy.

Contributing

See the contributing file.

The Rust special interest group (SIG) meets weekly on Tuesdays at 9 AM Pacific Time (16:00 UTC). The meeting is subject to change depending on contributors' availability. Check the OpenTelemetry community calendar for specific dates and for Zoom meeting links. "OTel Rust SIG" is the name of meeting for this group.

Meeting notes are available as a public Google doc. If you have trouble accessing the doc, please get in touch on Slack.

The meeting is open for all to join. We invite everyone to join our meeting, regardless of your experience level. Whether you're a seasoned OpenTelemetry developer, just starting your journey, or simply curious about the work we do, you're more than welcome to participate!

More Repositories

1

opentelemetry-go

OpenTelemetry Go API and SDK
Go
4,753
star
2

opentelemetry-collector

OpenTelemetry Collector
Go
3,851
star
3

opentelemetry-specification

Specifications for OpenTelemetry
Makefile
3,592
star
4

opentelemetry-dotnet

The OpenTelemetry .NET Client
C#
2,947
star
5

opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
Go
2,512
star
6

opentelemetry-js

OpenTelemetry JavaScript Client
TypeScript
2,448
star
7

opentelemetry-java

OpenTelemetry Java SDK
Java
1,832
star
8

opentelemetry-java-instrumentation

OpenTelemetry auto-instrumentation and instrumentation libraries for Java
Java
1,709
star
9

opentelemetry-python

OpenTelemetry Python API and SDK
Python
1,586
star
10

opentelemetry-demo

This repository contains the OpenTelemetry Astronomy Shop, a microservice-based distributed system intended to illustrate the implementation of OpenTelemetry in a near real-world environment.
TypeScript
1,397
star
11

opentelemetry-operator

Kubernetes Operator for OpenTelemetry Collector
Go
1,044
star
12

opentelemetry-go-contrib

Collection of extensions for OpenTelemetry-Go.
Go
988
star
13

opentelemetry-cpp

The OpenTelemetry C++ Client
C++
754
star
14

community

OpenTelemetry community content
690
star
15

opentelemetry-php

The OpenTelemetry PHP Library
PHP
671
star
16

opentelemetry-python-contrib

OpenTelemetry instrumentation for Python modules
Python
606
star
17

opentelemetry-js-contrib

OpenTelemetry instrumentation for JavaScript modules
TypeScript
605
star
18

docs-cn

OpenTelemetry δΈ­ζ–‡ζ–‡ζ‘£: ζŽ₯ε…₯δ½Ώη”¨γ€ζŠ€ζœ―ζ ‡ε‡†γ€RFC、SDKη­‰.
584
star
19

opentelemetry-proto

OpenTelemetry protocol (OTLP) specification and Protobuf definitions
Makefile
519
star
20

opentelemetry.io

The OpenTelemetry website and documentation
JavaScript
462
star
21

opentelemetry-ruby

OpenTelemetry Ruby API & SDK, and related gems
Ruby
447
star
22

opentelemetry-dotnet-contrib

This repository contains set of components extending functionality of the OpenTelemetry .NET SDK. Instrumentation libraries, exporters, and other components can find their home here.
C#
375
star
23

opentelemetry-go-instrumentation

OpenTelemetry Auto Instrumentation using eBPF
C
351
star
24

opentelemetry-helm-charts

OpenTelemetry Helm Charts
Smarty
332
star
25

opentelemetry-dotnet-instrumentation

OpenTelemetry .NET Automatic Instrumentation
C++
329
star
26

oteps

OpenTelemetry Enhancement Proposals
Makefile
315
star
27

opentelemetry-erlang

OpenTelemetry Erlang SDK
Erlang
310
star
28

opentelemetry-lambda

Create your own Lambda Layer in each OTel language using this starter code. Add the Lambda Layer to your Lamdba Function to get tracing with OpenTelemetry.
Go
242
star
29

opentelemetry-network

eBPF Collector
C++
231
star
30

opentelemetry-collector-releases

OpenTelemetry Collector Official Releases
Go
200
star
31

opentelemetry-swift

OpenTelemetry API for Swift
Swift
181
star
32

semantic-conventions

Defines standards for generating consistent, accessible telemetry across a variety of domains
Roff
175
star
33

opentelemetry-java-examples

Java
152
star
34

opentelemetry-java-contrib

Java
136
star
35

opentelemetry-erlang-contrib

OpenTelemetry instrumentation for Erlang & Elixir
Elixir
131
star
36

opamp-go

OpAMP protocol implementation in Go
Go
116
star
37

opentelemetry-cpp-contrib

Python
115
star
38

opamp-spec

OpAMP Specification
Makefile
92
star
39

opentelemetry-log-collection

OpenTelemetry log collection library
Go
91
star
40

opentelemetry-js-api

OpenTelemetry Javascript API
TypeScript
82
star
41

opentelemetry-android

OpenTelemetry Tooling for Android
Java
82
star
42

opentelemetry-php-instrumentation

OpenTelemetry PHP auto-instrumentation extension
C
81
star
43

opentelemetry-ruby-contrib

Contrib Packages for the OpenTelemetry Ruby API and SDK implementation.
Ruby
68
star
44

opentelemetry-erlang-api

Erlang/Elixir OpenTelemetry API
Erlang
60
star
45

opentelemetry-collector-builder

A CLI tool that generates OpenTelemetry Collector binaries based on a manifest.
Go
56
star
46

opentelemetry-php-contrib

opentelemetry-php-contrib
PHP
53
star
47

otel-arrow

Protocol and libraries for sending and receiving OpenTelemetry data using Apache Arrow
Go
51
star
48

wg-prometheus

Workgroup for building Prometheus-OTLP interoperability for the OTEL Collector and Prometheus related discussions.
40
star
49

otel-arrow-collector

[DoNotUse] OpenTelemetry Collector with Apache Arrow support FORK OF OPENTELEMETRY COLLECTOR
Go
30
star
50

opentelemetry-go-build-tools

Build tools for use by the Go API/SDK, the collector, and their associated contrib repositories
Go
30
star
51

build-tools

Building tools provided by OpenTelemetry
Python
29
star
52

opentelemetry-proto-go

Generated code for OpenTelemetry protobuf data model
Makefile
24
star
53

opentelemetry-profiling

OpenTelemetry Profiling (language independent code, benchmarks, experiments, etc)
22
star
54

opentelemetry-configuration

JSON Schema definitions for OpenTelemetry file configuration
Makefile
22
star
55

opentelemetry-sqlcommenter

SQLCommenter components for various languages
JavaScript
19
star
56

docs-ja

Makefile
16
star
57

opentelemetry-rust-contrib

OpenTelemetry Contrib Packages for Rust
Rust
16
star
58

opentelemetry-proto-java

Java Bindings for the OpenTelemetry Protocol (OTLP)
Java
13
star
59

opentelemetry-sandbox-web-js

non-production level experimental Web JS packages
TypeScript
12
star
60

semantic-conventions-java

Java generated classes for semantic conventions
Java
11
star
61

weaver

A (currently prototype) tool for interacting with Telemetry Schemas / definitions in OpenTelemetry
Rust
9
star
62

assign-reviewers-action

GitHub action to assign reviewers/approvers/etc based on configuration
TypeScript
7
star
63

sig-security

Python
6
star
64

opamp-java

OpAMP protocol implementation in Java
Java
4
star
65

opentelemetry-network-build-tools

eBPF Collector Build Tools
C
4
star
66

opentelemetry-go-vanityurls

Vanityurls config for go.opentelemetry.io subdomain
Shell
2
star
67

.github

1
star
68

experimental-arrow-proto

[Experiment] Protocol definitions for the OpenTelemetry protocol (OTLP) with Apache Arrow support
Makefile
1
star
69

cpp-build-tools

Builds a docker image to make interacting with C++ projects easier.
Shell
1
star