Skip to content

Instantly share code, notes, and snippets.

@joelrebel
Last active September 18, 2024 14:02
Show Gist options
  • Select an option

  • Save joelrebel/5bcd4cc0e3c734a291899587727ed00a to your computer and use it in GitHub Desktop.

Select an option

Save joelrebel/5bcd4cc0e3c734a291899587727ed00a to your computer and use it in GitHub Desktop.
otel test
package main
import (
"context"
"time"
"github.com/equinix-labs/otel-init-go/otelinit"
"go.opentelemetry.io/otel"
)
func main() {
ctx, otelShutdown := otelinit.InitOpenTelemetry(context.Background(), "otel-tester")
defer otelShutdown(ctx)
ctx, span := otel.Tracer("main").Start(
ctx,
"main",
)
time.Sleep(5 * time.Second)
defer span.End()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment