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

Adapt to telemetry span exception event name convention #167

Merged
merged 4 commits into from
Apr 2, 2020

Conversation

binaryseed
Copy link
Contributor

@binaryseed binaryseed commented Apr 2, 2020

The telemetry:span convention specifies that :exception is used in exception cases instead of :stop events... This PR simply corrects the event name for exception cases.

@whatyouhide @keathley @GregMefford @josevalim

Copy link
Owner

@whatyouhide whatyouhide left a comment

Choose a reason for hiding this comment

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

Fixing a typo through GH suggestions, let's see if I can commit those myself :)

lib/redix.ex Outdated Show resolved Hide resolved
test/redix_test.exs Outdated Show resolved Hide resolved
test/redix_test.exs Outdated Show resolved Hide resolved
@whatyouhide whatyouhide merged commit 1a66bbb into whatyouhide:master Apr 2, 2020
@binaryseed
Copy link
Contributor Author

oops, at least I was consistently misspelling it!

@binaryseed binaryseed deleted the telemetry-exception branch April 2, 2020 18:59
@GregMefford
Copy link

Wait... this shouldn’t have been an :exception because it’s not representing an early exit of the process that would have a stacktrace attached; it’s proceeding to completion but returning an error. This is why we decided to call that event :exception instead of :error or :failure, right?

@josevalim
Copy link

Yes, @GregMefford , good catch. We should only use exception if the caller is raising. We should probably add telemetry:span/3 to the lib itself, otherwise we will have mistakes like this popping up. Instead we should have status field for "soft" failures.

@binaryseed
Copy link
Contributor Author

Oh, my bad - I did not realize that. I saw the keys kind and reason being used and thought that :exception was meant to be broader than what you are saying..

@GregMefford Do you think we could sketch out a tiny example of code that would make the distinction between the 2 cases clearer? I didn't really gather that from all the descriptions & conversations we've been having, so it's possible others might make the same mistake.

Sorry for the churn here!!

@whatyouhide
Copy link
Owner

For now, I'm going to revert this. :)

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.

4 participants