-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: trace #266
base: 2.x.x
Are you sure you want to change the base?
feat: trace #266
Conversation
Signed-off-by: surajgour-d11 <[email protected]>
Signed-off-by: surajgour-d11 <[email protected]>
24f4e49
to
2812544
Compare
@@ -43,6 +49,6 @@ func grpcClient(ctx *context.Context) (*grpc.ClientConn, *context.Context, error | |||
return nil, nil, err | |||
} | |||
// Enrich context with authorisation metadata | |||
requestCtx := metadata.AppendToOutgoingContext(*ctx, "Authorization", fmt.Sprintf("Bearer %s", appConfig.AccessToken)) | |||
requestCtx := metadata.AppendToOutgoingContext(*ctx, "Authorization", fmt.Sprintf("Bearer %s", appConfig.AccessToken), "TraceId", traceID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let' use consistent key name TRACE_ID/TraceId/traceId/trace-id
. I prefer trace-id
.
https://www.w3.org/TR/trace-context/#trace-id
appConfig := config.GetConfig() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we generate traceId
here itself? That way we can avoid writing it in all the commands
if err != nil { | ||
log.Fatal("Failed to deploy service ", err) | ||
log.Info("TraceId: ", traceID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trace id should be always be logged as a debug message
Odin version(x.y.z)
Features
Resources