An unofficial implementation of OpenTelemetry in Julia.
using OpenTelemetry
with_span("Hello") do
with_span("World") do
println("Hello world from OpenTelemetry.jl!")
end
end
using OpenTelemetry
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()
using OpenTelemetry
using Logging
using LoggingExtras
with_logger(TransformerLogger(OtelLogTransformer(), global_logger())) do
@info "World!"
end
(WIP)
- View Metrics in Prometheus
- View Metrics in Prometheus through Open Telemetry Collector
- View Metrics/Traces/Logs in Grafana/ElasticAPM
- An End-to-end Toy Example with Auto Instrumentation across Different Languages
- Case Study 1: Empower
Dagger.jl
withOpenTelemetry.jl
- Case Study 2: Empower
AlphaZero.jl
withOpenTelemetry.jl
(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
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❤.
Package | Description | Latest Version |
---|---|---|
OpenTelemetryAPI |
Common data structures and interfaces. Instrumentations should rely on it only. | |
OpenTelemetrySDK |
Based on the specification, application owners use SDK constructors; plugin authors use SDK plugin interfaces | |
OpenTelemetryProto |
See the OTLP specification | |
OpenTelemetryExporterOtlpProtoGrpc |
Provide an AbstractExporter in OTLP through gRPC |
|
OpenTelemetryExporterPrometheus |
Provide an AbstractExporter to allow pulling metrics from Prometheus |
|
OpenTelemetry |
Reexport all above. For demonstration and test only. Application users should import OpenTelemetrySDK and necessary plugins or instrumentations explicitly. |
|
OpenTelemetryInstrumentationBase |
Add basic metrics under the Base module in Julia runtime. |
|
OpenTelemetryInstrumentationDownloads |
Add metrics and inject context info in Downloads.jl . |
|
OpenTelemetryInstrumentationDistributed |
Add metrics and inject context info in Distributed.jl . |
|
OpenTelemetryInstrumentationHTTP |
Add metrics and inject context info in HTTP.jl . |
|
OpenTelemetryInstrumentationGenie |
Add metrics and inject context info in Genie.jl . |
|
OpenTelemetryUber |
Reexport all above. For demonstration and test only. Application users should import OpenTelemetrySDK and necessary plugins or instrumentations explicitly. |
Check out the benchmark results of some essential operations with Julia@v1.6, Julia@v1.7.