Skip to content

Commit

Permalink
chore: expose otel version from stats library (#488)
Browse files Browse the repository at this point in the history
Co-authored-by: Francesco Casula <fracasula@users.noreply.github.com>
  • Loading branch information
lvrach and fracasula committed May 29, 2024
1 parent 0ccb5aa commit 6acb052
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stats/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/spf13/cast"
ootel "go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
noopMetric "go.opentelemetry.io/otel/metric/noop"
Expand Down Expand Up @@ -62,6 +63,10 @@ type otelStats struct {
prometheusGatherer prometheus.Gatherer
}

func OtelVersion() string {
return ootel.Version()
}

func (s *otelStats) Start(ctx context.Context, goFactory GoRoutineFactory) error {
if !s.config.enabled.Load() {
return nil
Expand Down

0 comments on commit 6acb052

Please sign in to comment.