Skip to content

Commit

Permalink
Update another otel example
Browse files Browse the repository at this point in the history
  • Loading branch information
veqryn committed Mar 10, 2024
1 parent fae79b8 commit 47ec50a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ import (
"go.opentelemetry.io/otel/exporters/stdout/stdouttrace"
"go.opentelemetry.io/otel/sdk/resource"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.21.0"
semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
"go.opentelemetry.io/otel/trace"
)

Expand Down Expand Up @@ -336,6 +336,8 @@ func main() {
// Handle OTEL shutdown properly so nothing leaks
defer traceProvider.Shutdown(context.Background())

slog.Info("Starting server. Please run: curl localhost:8080/hello")

// Demonstrate the slogotel.ExtractTraceSpanID with a http server
http.HandleFunc("/hello", helloHandler)
err := http.ListenAndServe(":8080", nil)
Expand Down

0 comments on commit 47ec50a

Please sign in to comment.