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

Adding wasSuccessful param to TransactionObservabilityManager #155

Merged

Conversation

CarlosGamero
Copy link
Contributor

@CarlosGamero CarlosGamero commented Aug 29, 2024

For some transaction observability tools, might be beneficial to know if a transaction was successful or not, improving API to support it

Checklist

  • Apply one of following labels; major, minor, patch or skip-release
  • I've updated the documentation, or no changes were necessary
  • I've updated the tests, or no changes were necessary

@CarlosGamero CarlosGamero self-assigned this Aug 29, 2024
@@ -23,6 +23,7 @@ export type TransactionObservabilityManager = {
/**
* Ends the transaction
* @param uniqueTransactionKey - used for identifying specific ongoing transaction. Must be reasonably unique to reduce possibility of collisions
* @param wasSuccessful - indicates if the transaction was successful or not
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we default to true?

Copy link
Contributor Author

@CarlosGamero CarlosGamero Aug 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The advantage of the optional value is that it lets different implementations define what means "default value" instead of forcing them to have true.

But I am not really sure if it has more const (or more important ones) than pros, so please feel free to disagree and I will change it, no strong opinion from my side

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair point, it should be handled on an implementation side

@CarlosGamero CarlosGamero merged commit 56097fd into main Aug 29, 2024
5 checks passed
@CarlosGamero CarlosGamero deleted the feat/transaction_bbservability_manager_stop_new_param branch August 29, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants