Skip to content

Conversation

@stephanos
Copy link
Contributor

@stephanos stephanos commented Jan 31, 2025

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?

@stephanos stephanos marked this pull request as ready for review January 31, 2025 21:26
@stephanos stephanos requested a review from a team as a code owner January 31, 2025 21:26
@stephanos stephanos requested a review from alexshtin January 31, 2025 21:36
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()))
Copy link
Contributor Author

@stephanos stephanos Jan 31, 2025

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.

Copy link
Contributor

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.

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()))
Copy link
Contributor

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.

@stephanos
Copy link
Contributor Author

Example output after the recent change:

Screenshot 2025-02-05 at 10 58 22 AM

@stephanos stephanos enabled auto-merge (squash) February 5, 2025 19:03
@stephanos stephanos merged commit 0412c86 into temporalio:main Feb 5, 2025
49 checks passed
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