Commit Graph

95 Commits (af821cf79493d1da6876c84d664fbe048a866d4a)

Author SHA1 Message Date
Kevin Wan 13cdbdc98b
chore: avoid nested WithCodeResponseWriter (#3406) 1 year ago
cong 61e562d0c7
refactor(rest): keep rest log collector context key private (#3407) 1 year ago
Kevin Wan 31b9ba19a2
chore: refactor httpx.TimeoutHandler (#3400) 1 year ago
扶桑花间 916cea858f
1. Fix w. (http. Flusher). Flush() error (#3388) 1 year ago
me-cs 0217044900
update:Use the Milliseconds method of duration to get the number of milliseconds (#3285)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
2 years ago
SleeplessBot a93c24ce84
Add method label for prometheus middleware metrics (#3226)
Co-authored-by: 蓝益尤 <lan.yiyou@intellif.com>
2 years ago
Kevin Wan 9f42eda9ff
fix: timeout handler not implementing http.Flusher (#3225) 2 years ago
Kevin Wan 8ffe4c01d1
chore: use logx.Must instead of log.Fatal (#3189) 2 years ago
Kevin Wan 14caf5c799
chore: simplify tests with logtest (#3184) 2 years ago
Kevin Wan 3da740b7fc
chore: remove unnecessary code (#3161) 2 years ago
chen quan ce4eb6ed61
fix: fixed #2945 (#2953)
Co-authored-by: Kevin Wan <wanjunfeng@gmail.com>
2 years ago
cong 22fad4bb9c
feat(trace): add trace test helpers (#3108) 2 years ago
Kevin Wan 8d0cceb80c
chore: add more tests (#3084) 2 years ago
heyehang e06abf4f6f
fixbug:superfluous response.WriteHeader (#3083) 2 years ago
Kevin Wan 211b9498ef
chore: add more tests (#3016) 2 years ago
yangjinheng dbc8f9faca timeout writer add hijack 2 years ago
yangjinheng 96998ae570 Update timeouthandler.go 2 years ago
Kevin Wan ae87114282
chore: change interface{} to any (#2818)
* chore: change interface{} to any

* chore: update goctl version to 1.5.0

* chore: update goctl deps
2 years ago
Kevin Wan 4d7fa08b0b
feat: support **struct in mapping (#2784)
* feat: support **struct in mapping

* chore: fix test failure
2 years ago
Kevin Wan 367afb544c
feat: support ptr of ptr of ... in mapping (#2779)
* feat: support ptr of ptr of ... in mapping

* feat: support ptr of ptr of time.Duration in mapping

* feat: support ptr of ptr of json.Number in mapping

* chore: improve setting in mapping

* feat: support ptr of ptr encoding.TextUnmarshaler in mapping

* chore: add more tests

* fix: string ptr

* chore: update tests
2 years ago
cong 43b8c7f641
chore(trace): improve rest tracinghandler (#2783) 2 years ago
cong f9619328f2
refactor(rest): use static config for trace ignore paths. (#2773) 2 years ago
Kevin Wan ade6f9ee46
feat: add middlewares config for rest (#2765)
* feat: add middlewares config for rest

* chore: disable logs in tests

* chore: enable verbose in tests
2 years ago
chen quan dc260f196a
refactor: simplify the code (#2763)
* refactor: simplify the code

* fix: fix data race

* refactor: simplify the code

* refactor: simplify the code
2 years ago
chen quan fc9b3ffdc1
refactor: use opentelemetry's standard api to track http status code (#2760) 2 years ago
Kevin Wan 83f88d177f
chore: improve codecov (#2752) 2 years ago
xiang 641ebf1667
feat: trace http.status_code (#2708)
* feat: trace http.status_code

* feat: implements http.Flusher & http.Hijacker for traceResponseWriter

* test: delete notTracingSpans after test

* feat: trace http.status_code

* feat: implements http.Flusher & http.Hijacker for traceResponseWriter

* test: delete notTracingSpans after test

* refactor: update trace handler span message

* fix: code conflict
2 years ago
heyehang a644ec7edd
feature : responses whit context (#2637) 2 years ago
chen quan 97a8b3ade5
fix(rest): fix issues#2628 (#2629) 2 years ago
王哈哈 dac3600b53
Modify comment syntax error (#2572) 2 years ago
Kevin Wan 9cadab2684
chore: refactor (#2545)
* chore: refactor

* chore: refactor
2 years ago
chen quan 7fe2492009
feat(trace): support for disabling tracing of specified `spanName` (#2363) 2 years ago
Kevin Wan 05a5de7c6d
chore: fix lint errors (#2520) 2 years ago
chen quan 111e626a73
refactor: adjust http request slow log format (#2440) 2 years ago
dawn_zhou ae7f1aabdd
feat: mysql and redis metric support (#2355)
* feat: mysql and redis metric support

* feat: mysql and redis metric support

* feat: mysql and redis metric support

Co-authored-by: dawn.zhou <dawn.zhou@yijinin.com>
2 years ago
Kevin Wan d935c83a54
feat: support baggage propagation in httpc (#2375)
* feat: support baggage propagation in httpc

* chore: use go 1.16

* chore: use go 1.16

* chore: use go ^1.16

* chore: remove deprecated
2 years ago
maizige cfda972d50
fix:trace graceful stop,pre loss trace (#2358) 2 years ago
Kevin Wan d9620bb072
chore: remove unused packages (#2312) 2 years ago
Kevin Wan 6d2b9fd904
chore: improve codecov (#1878) 3 years ago
Kevin Wan 69c2bad410
feat: logx with color (#1872)
* feat: logx with color

* chore: update logs

* fix test error

* chore: change colors of http codes

* chore: add comments

* chore: use faith/color instead of ascii code color

* chore: update colors

* chore: update colors

* chore: fix duplicated slowcall text

* chore: remove slowcall colors
3 years ago
Kevin Wan f7a60cdc24
fix: remove deprecated dependencies (#1837)
* fix: remove deprecated dependencies

* backup

* fix test error
3 years ago
Kevin Wan 2cdff97934
feat: use mongodb official driver instead of mgo (#1782)
* wip: backup

* wip: backup

* wip: backup

* backup

* backup

* backup

* add more tests

* fix wrong dependency

* fix lint errors

* remove test due to data race

* add tests

* fix test error

* add mon.Model

* add mon.Model unmarshal

* add monc

* add more tests for monc

* add more tests for monc

* add docs for mon and monc packages

* fix doc errors

* chhore: add comment

* chore: fix test bug

* chore: refine tests

* chore: remove primitive.NewObjectID in test code

* chore: rename test files for typo
3 years ago
Kevin Wan 92b450eb11
fix: ignore timeout on websocket (#1802) 3 years ago
Kevin Wan ab01442d46
add more tests (#1763)
* feat: add goctl docker build scripts

* chore: add more tests
3 years ago
Kevin Wan 3279a7ef0f
feat: add rest/httpc to make http requests governacible (#1638)
* feat: change x-trace-id to traceparent to follow opentelemetry

* feat: add rest/httpc to make http requests governacible

* chore: remove blank lines
3 years ago
Kevin Wan 842656aa90
feat: log 404 requests with traceid (#1554) 3 years ago
Kevin Wan fdc7f64d6f
chore: update unauthorized callback calling order (#1469)
* chore: update unauthorized callback calling order

* chore: add comments
3 years ago
Kevin Wan bf2feee5b7
feat: implement console plain output for debug logs (#1456)
* feat: implement console plain output for debug logs

* chore: rename console encoding to plain

* chore: refactor names
3 years ago
Kevin Wan 468c237189
chore: upgrade dependencies (#1444)
* chore: upgrade dependencies

* ci: upgrade go to 1.15
3 years ago
Kevin Wan ba6a7c9dc8
chore: refactor rest/timeouthandler (#1415) 3 years ago