Skip to content

Commit

Permalink
chore: add span attribute for full grpc request (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
crnbarr93 authored Feb 11, 2025
1 parent 08e95fc commit 2dafe7a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions baseapp/grpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package baseapp

import (
"context"
"fmt"
"strconv"

gogogrpc "github.com/cosmos/gogoproto/grpc"
Expand Down Expand Up @@ -81,6 +82,7 @@ func (app *BaseApp) RegisterGRPCServer(server gogogrpc.Server) {
defer span.End()

span.SetAttributes(attribute.String("http.method", grpcInfo.FullMethod))
span.SetAttributes(attribute.String("http.request", fmt.Sprintf("%+v", req)))

resp, err = handler(grpcCtx, req)

Expand Down

0 comments on commit 2dafe7a

Please sign in to comment.