Learning Opentelemetry Book Review

Learning OpenTelemetry book review

I recently finished reading Learning OpenTelemetry by Ted Young and Austin Parker. I recommend this book to everyone interested in a deeper understanding of observability. The authors focus first on providing historical context for telemetry and how the signals evolved. I particularly liked two concepts: soft and hard context and signal layering. They also explain how the current monitoring landscape looks and why OpenTelemetry was created. The authors explain the difference between OpenTelemetry API and SDK and instrumenting library vs....

April 13, 2025 · 2 min
Measuring Elapsed Time in Go

Measuring Elapsed Time in Go

To measure elapsed time in Go, you can use following code. package main import ( "fmt" "time" "go.opentelemetry.io/otel/metric" ) func expensiveCall() { } func main() { // setup meter opDurationHistogration, _ := meter.Int64Histogram("operation_duration", metric.WithDescription("Operation duration"), metric.WithUnit("ms")) start := time.Now() expensiveCall() elapsed := time.Since() fmt.Printf("Took %s\n", elapsed) opDurationHistogration.Record(context.TODO(), elapsed) } Output Took 11.583µs

October 29, 2024 · 1 min