Skip to content
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

Open
wants to merge 2 commits into
base: 2.x.x
Choose a base branch
from
Open

feat: trace #266

wants to merge 2 commits into from

Conversation

surajgour-d11
Copy link
Contributor

Odin version(x.y.z)

Features

Resources

@@ -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)
Copy link
Collaborator

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()

Copy link
Collaborator

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)
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants