Skip to content

Commit a57afe5

Browse files
committed
addressing lint
Signed-off-by: Lucas Fontes <[email protected]>
1 parent 3a87b0f commit a57afe5

File tree

1 file changed

+5
-1
lines changed
  • examples/component/wasitel-http

1 file changed

+5
-1
lines changed

examples/component/wasitel-http/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@ func init() {
2424
}
2525

2626
func echoHandler(w http.ResponseWriter, r *http.Request) {
27+
if err := setupOTelSDK(); err != nil {
28+
http.Error(w, "failed setting up otel", http.StatusInternalServerError)
29+
return
30+
}
31+
2732
ctx := r.Context()
28-
setupOTelSDK()
2933
_, span := tracer.Start(ctx, serviceName)
3034
defer span.End()
3135

0 commit comments

Comments
 (0)