-
Notifications
You must be signed in to change notification settings - Fork 1.3k
OTEL persistence context deadline #7208
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
Conversation
6a88f00 to
439bb79
Compare
439bb79 to
2c3ff10
Compare
2c3ff10 to
1d1bdcb
Compare
common/telemetry/grpc.go
Outdated
| if ok { | ||
| span.SetAttributes(attribute.String("rpc.request.timeout", deadline.Format(time.RFC3339Nano))) | ||
| if deadline, ok := ctx.Deadline(); ok { | ||
| span.SetAttributes(attribute.Int64("rpc.request.deadline", deadline.UnixNano())) |
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.
I realized "deadline" is clearer. And UnixNano seems like a better choice, too.
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.
I think both of them make sense. "timeout" should be a duration though. deadline-now.
common/telemetry/grpc.go
Outdated
| if ok { | ||
| span.SetAttributes(attribute.String("rpc.request.timeout", deadline.Format(time.RFC3339Nano))) | ||
| if deadline, ok := ctx.Deadline(); ok { | ||
| span.SetAttributes(attribute.Int64("rpc.request.deadline", deadline.UnixNano())) |
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.
I think both of them make sense. "timeout" should be a duration though. deadline-now.

What changed?
Added "persistence.deadline" attributes to OTEL persistence span.
Why?
Add more details for debugging.
How did you test it?
Potential risks
Documentation
Is hotfix candidate?