Skip to content

Instantly share code, notes, and snippets.

View TonPC64's full-sized avatar
:shipit:
Gopher

Chanwit Piromplad TonPC64

:shipit:
Gopher
View GitHub Profile
func handler(c *gin.Context) {
tracer := otel.GetTracerProvider().Tracer("gin-hander")
ctx, span := tracer.Start(c.Request.Context(), "handler-span")
defer span.End()
fmt.Println(c.Request.Header)
rand.Seed(time.Now().Unix())
msg := sarama.ProducerMessage{
Topic: "example-topic",