OpenTelemetry.jl

An unofficial implementation of OpenTelemetry in Julia.
Author oolong-dev
Popularity
27 Stars
Updated Last
4 Months Ago
Started In
September 2021

OpenTelemetry.jl

doc CI codecov ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

An unofficial implementation of OpenTelemetry in Julia.

Get Started

Logs

using OpenTelemetry
using Term # optional, for better display
using Logging

@info "Hello, World!"
@warn "from"
@error "OpenTelemetry.jl!"

Traces

with_span("Hello, World!") do
    with_span("from") do
        @info "OpenTelemetry.jl!"
    end
end

Metrics

m = Meter("demo_metrics");
c = Counter{Int}("fruit_counter", m);

c(; name = "apple", color = "red")
c(2; name = "lemon", color = "yellow")
c(1; name = "lemon", color = "yellow")
c(2; name = "apple", color = "green")
c(5; name = "apple", color = "red")
c(4; name = "lemon", color = "yellow")

r = MetricReader();
r()

Tutorial

It's recommended to walk through these tutorials one-by-one.

Tips for Developers

(WIP)

  • Understand the Architecture of OpenTelemetry.jl
  • How to Add Instrumentation to a Third-party Package?
  • How to Extend OpenTelemetrySDK?
  • Conventions and Best Practices to Instrument Your Application

FAQ

Some frequently asked questions are maintained here. If you can't find the answer to your question there, please create an issue. Your feedback is VERY IMPORTANT to the quality of this package❤.

Packages

Package Description Latest Version
OpenTelemetryAPI Common data structures and interfaces. Instrumentations should rely on it only. version
OpenTelemetrySDK Based on the specification, application owners use SDK constructors; plugin authors use SDK plugin interfaces version
OpenTelemetryProto See the OTLP specification. Note the major and minor version is kept the same with the original opentelemetry-proto version. version
OpenTelemetryExporterOtlpProtoGrpc Provide an AbstractExporter in OTLP through gRPC. (WARNING!!! This package is not updated to the latest version yet since gRPCClient.jl doesn't support ProtoBuf.jl@v1 yet.) version
OpenTelemetryExporterOtlpProtoHttp Provide exporters in OTLP through HTTP. version
OpenTelemetryExporterPrometheus Provide a meter to allow pulling metrics from Prometheus version
OpenTelemetry Reexport all above. For demonstration and test only. Application users should import OpenTelemetrySDK in combination with necessary plugins or instrumentations explicitly. version

Required Packages

Used By Packages