Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

Resolves #7778.

Adds annotations to Cause. The annotations are currently a Map[String, String]. One open question is whether we want to add additional data here. For example, in ZLogger we also capture the log spans and the current FiberRef values, which can be used to implement typed log annotations.

The default rendering of Cause is also unchanged, so this data is available for more advanced applications that want to expose it but the stack trace continues to look like a Java stack trace, though we could potentially revisit that.

@adamgfraser adamgfraser requested a review from jdegoes February 11, 2023 01:37
@jdegoes
Copy link
Member

jdegoes commented Feb 13, 2023

Looks fantastic! I would also capture log spans, but not fiber refs. ZIO Logging is going to try to use ordinary annotations for typed logged annotations by pre-rendering to a string.

@adamgfraser
Copy link
Contributor Author

Done!

@jdegoes jdegoes merged commit 33ad58b into zio:series/2.x Feb 14, 2023
@adamgfraser adamgfraser deleted the 7778 branch March 8, 2023 00:51
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.

Is there a way to attach attributes/annotations to Cause?

2 participants