Commit Graph

164 Commits

Author SHA1 Message Date
Aleksey Kashapov
2cbe19998c
TD-788: Adds metrics collectors for hackney and ranch stats (#30)
* Adds ranch active_connections metric
* Adds collectors test checks
* Adds explicit 'return' clause to label helper func
* Rename collector modules for consistency
* Adds event handler option for RPC events severity mapping
* Adds events severity mapping description
2023-12-19 15:17:08 +03:00
Aleksey Kashapov
5d46291a6b
TD-686: Adopts opentelemetry API (#27)
* Adds otel propagation to legacy thrift transport implementations
* Complete otel propagation in pass-through testcase
* Implements woody event handler for otel spans
2023-10-04 14:44:43 +03:00
renovate[bot]
511e422a59
chore(deps): update actions/checkout action to v3 (#7)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Pavel Popov <tolkonepiu@users.noreply.github.com>
2022-11-24 04:07:13 +07:00
Vality Bot
2e8126d939
🔄 Synced file(s) with valitydev/configurations (#5)
* 🔄 Created local '.github/workflows/basic-linters.yml' from remote 'workflows/base/basic-linters.yml'

* 🔄 Synced local 'LICENSE' with remote 'LICENSE'

* 🔄 Created local '.github/settings.yml' from remote '.github/settings.yml'

* 🔄 Synced local '.github/settings.yml' with remote 'erlang/.github/settings.yml'

Co-authored-by: Pavel Popov <tolkonepiu@users.noreply.github.com>
2022-11-24 04:03:56 +07:00
renovate[bot]
bc6ca1aa36
chore(deps): update valitydev/erlang-workflows action to v1.0.10 (#25)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-11-24 03:58:53 +07:00
Andrew Mayorov
aa8f9d0cd2
Fixup TLS client options after resolving (#24) 2022-10-31 17:30:00 +03:00
Andrew Mayorov
2866b658ea
Allow to set custom codec in client / server (#23)
Which is reponsible for:
* (de)serializing requests / responses
* providing request / response metadata for events

Also permit wider service / args models depending on chosen server / client codecs.

Backport #22.
2022-10-25 14:59:38 +03:00
Andrew Mayorov
0301168d04
Sync w/ valitydev/erlang-templates (#20) 2022-10-03 14:27:41 +03:00
Andrew Mayorov
e3ccc3765b
Drop meaningless deadline redefinition (#19) 2022-09-09 18:48:17 +03:00
Andrew Mayorov
90d386c252
Anticipate nxdomains even after resolving (#18)
Turns out resolving server endpoint and sending request to this endoint
are racy with respect to domain name resolution: for some reason
`gen_tcp` resolves literal IP addresses through general DNS
mechanism. This means that in the event DNS goes down between resolving
step and sending step one could get `{error, nxdomain}` in the second
step.
2022-09-06 11:09:26 +03:00
renovate[bot]
3ddacb9296
chore(deps): add renovate.json (#2)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-02-22 00:53:18 +03:00
Alexey S
0c2e16dfc8
TD-50: Change woody.error-reason missing message to be more readable (#1) 2022-01-21 15:10:58 +03:00
Jarosław Rogov
6f818c57e3
feat: Add deadline opt for woody_client (#156) 2021-11-12 15:45:55 +03:00
Sergey Yelin
2d7efff936
hackney 1.18.0 (#155) 2021-10-01 11:28:53 +03:00
Andrew Mayorov
68b191ed36
ED-266: Bump to rbkmoney/thrift_erlang@c280ff2 (#154) 2021-09-14 13:52:02 +03:00
Sergey Yelin
330bdcf71e
ED-204: Move woody_api_hay to separate repo (#153)
* ED-204: Move woody_api_hay to separate repo

* Move woody_client_metrics to woody_api_hay repo

* proper 1.4.0

* Fix proper
2021-08-11 22:24:08 +03:00
Andrew Mayorov
4fab3f64af
Split severity off formatted event message (#152)
It's usually needed earlier than the message itself. And may even be used
to skip formatting altogether, with `msg_fun()` facility in Erlang
logger.

Simplify event handler interface which should make this module more
usable down the line.

Also use monotonic timestamps when measuring time intervals.
2021-06-22 11:01:27 +03:00
Sergey Yelin
d9fca6da55
Prepare for Erlang 24 (#150)
* Update deps with support for Erlang 24
* Remove generated artefacts from test
* Fix compiler warning
* Format
2021-05-21 13:28:56 +03:00
dinama
f2cd30883d
upgrade: +alpine +rebar +dialyzer +deps (#149) 2021-01-15 15:35:41 +03:00
Alexey
58f56b4624
MSPF-622: add get_addr/2 for woody_server (#148) 2020-11-23 16:50:50 +03:00
Andrew Mayorov
3b76622054
Bump to rbkmoney/thrift_erlang@846a081 (#147) 2020-10-02 14:06:35 +03:00
Andrew Mayorov
feadc0d103
Increase request id length limit up to 64 (#146)
* Increase request id length limit up to 64

According to rbkmoney/coredocs#226.

* Bump joint worker timeout in tests

So they would flap less frequently, hopefully.
2020-08-26 19:02:05 +03:00
Andrew Mayorov
d106ef66bd
Use new performant thrift codec infrastructure (#145)
* Implement woody_client_thrift_v2 over new thrift codec facility, make it default
* Move tracing facilities into woody_trace_h
* Implement woody_server_thrift_v2 over thrift codec facility, make it default
* Bump to rbkmoney/genlib@54920e76
* Enforce tuple-based args representation
* Enable cross tests between impls
* Switch to master rbkmoney/thrift_erlang@4eda678c
2020-08-18 13:01:47 +03:00
Andrew Mayorov
42dbb91b2b
Drop legacy headers support (#144) 2020-08-11 13:49:06 +03:00
Andrew Mayorov
33b6991373
Downgrade hacnkey to 1.15.2 (#143)
Since benoitc/hackney#638 affects us consistently and still needs fixing.
2020-08-04 14:47:06 +03:00
Andrey Fadeev
b563bbb435
Update snowflake to rbkmoney/snowflake@7f379ad5e (#142) 2020-07-27 22:10:57 +03:00
Sergey Yelin
baa3db27da
Switch to Erlang lib pipe (#141)
* Switch to Erlang lib pipe

* fix damsel URL

* Switch to sequential

* Fix URL for cg_mon

* Use parallel pipe

* Fix URL to folsom

* Fix path to plt

* Update build_utils

* Back to sequential

* Add note

* Add named params

* Switch back

* Typo
2020-07-09 15:41:45 +03:00
Andrew Mayorov
a434e55e14
Bump to rbkmoney/thrift_erlang@aa233e2 (#139)
* Bump to rbkmoney/image-build@07d3946f
* Bump hackney to 1.16.0
2020-06-30 15:19:53 +03:00
Andrey Fadeev
dd5eaa73ce
Add eacces POSIX error processing (#138) 2020-06-19 15:22:57 +03:00
Andrey Fadeev
feb52436aa
Update snowflake (#137) 2020-05-26 15:24:35 +03:00
Sergey Yelin
ae8e7a9f6f
Update build_utils (#136) 2020-05-21 17:22:12 +03:00
Andrew Mayorov
7a31f024f7
Remove used memory watermark check (#135)
Even being optional it had considerable negative effect on latency
perceived by client. I guess we need something more elaborated.
2020-05-13 18:43:34 +03:00
Andrew Mayorov
b6ec9887fb
Turn TCP_NODELAY on for client requests by default (#134) 2020-05-13 14:24:52 +03:00
Andrey Fadeev
8543878a55
Update snowflake (#133) 2020-03-31 16:37:41 +03:00
Sergei Shuvatov
8b8c0e2779
MSPF-532: fix check for UTC in RFC 3339 date and time (#132) 2020-02-18 19:35:33 +03:00
Sergei Shuvatov
3ddd842a33
MSPF-532: get rid of rfc3339 lib (#131) 2020-02-17 19:36:29 +03:00
Sergey Yelin
d55dbf551a
HG-534: Fix 'unknown message error' in event handler (#130)
* HG-534: Fix 'unknown message error' in event handler

* Revert "HG-534: Fix 'unknown message error' in event handler"

This reverts commit efd6c51129adeca1369296f360f3e931732f5c76.

* HG-534: Fix unknown message error

* More accurate test

* Fix lint error
2020-02-14 21:56:29 +03:00
Toporkov Igor
ed644d7d70
MSPF-490: Monitor to detect client disconnection (#111)
* Monitor to detect client disconnetion on server side

* Renaming save_woody_state

* Rework monitor to use one per connection

* Changed event type

* wip: stream handler skeleton

* wip: log abnormal termination

* Upgrade cowboy to 2.7.0

* Finish migration to stream_handler

* Upgrade more dependencies

* Fix state type, remove early_error logging

* rename woody_monitor to comply with cowboy naming

* remove redundant monitor pid from state

* Log only socket errors

* wrap put_woody_state

* experimental: monitor for woody_events

* add missing update

* match on handle_event return, don't monitor tracing

* Rework update_woody_state

* Slightly increase min_complexity in linter config

* Make event state transition explicit

* Remove handle_event wraper

* Revert "Slightly increase min_complexity in linter config"

This reverts commit 38301e3b5b66967cb08c0bf7f27a2a8042a40a19.

* match unmetched returns

* Add test

* Erase trailing whitespace

* Refactor test

* Delete mistakenly added file

* Rename function

* Review fixes

* Match supervisor return

Co-Authored-By: Andrew Mayorov <a.mayorov@rbkmoney.com>

Co-authored-by: Andrew Mayorov <encube.ul@gmail.com>
2020-02-05 14:35:43 +03:00
Andrew Mayorov
295b864cf7
Host processes under tc_sup in tests (#129)
To avoid piling ct logs up with error report noise.
2020-02-05 14:14:08 +03:00
Andrew Mayorov
309ac51655
Fix service result event formatting (#128)
* Switch to public dep upstream
2020-02-04 19:44:37 +03:00
ndiezel0
e46a3b6303
Bump how_are_you (#127) 2020-01-30 19:40:57 +03:00
Andrew Mayorov
f2e56d8aff
Make exception formatting heuristics cleaner (#126) 2020-01-27 17:26:39 +03:00
Sergey Yelin
ce178d0232
Remove extra get_formatter_opts/1 (#125)
* Remove extra get_formatter_opts/1

* Change defaults to max length and max printable string length

* Typo
2020-01-14 09:40:50 +03:00
Andrew Mayorov
205982e6c0 Fix max_printable_string_length typo (#124) 2020-01-09 16:34:47 +03:00
Andrew Mayorov
307cd7b860
Make printability test more precise and conservative (#123) 2019-12-31 17:16:23 +03:00
Andrew Mayorov
e615c85d70
Implement binary-first event formatter (#122)
* Add compex term formatting microbenchmark
* Format FP numbers more neatly
* Provide fast-path verbatim term formatter
* Add memory pressure benchmark runner
* Switch to rebar3_bench 0.2.1 package
* Employ assert macros throughout main ct suite
2019-12-31 12:52:56 +03:00
Sergey Yelin
f74bb6854c
Remove whitespaces (#120)
* Remove whitespaces

* Typo
2019-12-12 19:02:16 +03:00
Sergey Yelin
2dc2ed1297
Add naive bench for formatter (#119)
* Add naive bench for formatter

* Review fixes
2019-12-11 19:07:16 +03:00
Sergey Yelin
07f8cee915
AAA-54 Improvements 3 (#118)
* Don't breal unicode

* Monir optimizations

* Strict strings via options

* Do not wrap call

* Add '...' to cuted lines

* Replace whitespace with single space

* Typo

* Typo

* Remove io_lib:format from hot path where possible
2019-12-11 18:09:25 +03:00
Sergey Yelin
6cfda6790f
Aaa 54 improvements 2 (#117)
* Don't breal unicode

* Monir optimizations

* Strict strings via options

* Do not wrap call

* Add '...' to cuted lines

* Replace whitespace with single space

* Typo

* Typo
2019-12-10 17:51:38 +03:00