Add obsx library
This commit is contained in:
17
doc.go
Normal file
17
doc.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// Package obsx provides observability setup for the platform: metrics (Prometheus)
|
||||
// and tracing (OpenTelemetry).
|
||||
//
|
||||
// # Quick Start
|
||||
//
|
||||
// // Tracing
|
||||
// shutdown, err := obsx.SetupTracer(ctx, obsx.TracerConfig{
|
||||
// ServiceName: "my-service",
|
||||
// Endpoint: "localhost:4317",
|
||||
// })
|
||||
// defer shutdown(ctx)
|
||||
//
|
||||
// // Metrics
|
||||
// metrics := obsx.NewMetrics(obsx.MetricsConfig{Namespace: "myapp"})
|
||||
// reqCounter := metrics.Counter("requests_total", "Total requests", "method", "status")
|
||||
// http.Handle("/metrics", metrics.Handler())
|
||||
package obsx
|
||||
Reference in New Issue
Block a user