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

feat: extend call stats with error #36

Merged
merged 11 commits into from
Jul 11, 2023
Merged

feat: extend call stats with error #36

merged 11 commits into from
Jul 11, 2023

Conversation

franklinkim
Copy link
Member

No description provided.

@franklinkim franklinkim changed the title feat: add cause check feat: extend call stats with error Jul 11, 2023
@franklinkim franklinkim marked this pull request as ready for review July 11, 2023 06:12
@franklinkim franklinkim merged commit 1837e9b into main Jul 11, 2023
@franklinkim franklinkim deleted the feature/error-cause branch July 11, 2023 06:14
@@ -3,7 +3,7 @@ module github.com/foomo/gotsrpc/v2/example/basic
go 1.16

require (
github.com/foomo/gotsrpc/v2 v2.0.10
github.com/foomo/gotsrpc/v2 v2.0.0
Copy link
Member

Choose a reason for hiding this comment

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

downgrade of gotsrpc?

@@ -108,6 +109,21 @@ func Reply(response []interface{}, stats *CallStats, r *http.Request, w http.Res
if stats != nil {
stats.ResponseSize = writer.length
stats.Marshalling = time.Since(serializationStart)
if len(response) > 0 {
errResp := response[len(response)-1]
Copy link
Member

Choose a reason for hiding this comment

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

is it safe to assume the last element is always the error?

@@ -11,6 +11,7 @@ import (
"os"
"path"
"path/filepath"
"reflect"
Copy link
Member

Choose a reason for hiding this comment

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

reflection sucks a bit, we should try to get rid of that feature soonish

Copy link
Member

Choose a reason for hiding this comment

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

any idea if there is a performance impact?

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