Skip to content
This repository has been archived by the owner on Sep 13, 2022. It is now read-only.

feat: metrics logger #43

Merged
merged 7 commits into from
Dec 4, 2019
Merged

feat: metrics logger #43

merged 7 commits into from
Dec 4, 2019

Conversation

cryptowen
Copy link
Contributor

@cryptowen cryptowen commented Dec 1, 2019

What type of PR is this?

A logger and metrics implementation.

What this PR does / why we need it:

Implement a crate to make log and add metrics easier.

Special notes for your reviewer:

Check README.md for more information.

@cryptowen
Copy link
Contributor Author

usage example: cryptowen@7c04ff3

@cryptowen cryptowen requested a review from a team December 1, 2019 13:30
@yejiayu
Copy link
Contributor

yejiayu commented Dec 1, 2019

So, what is the format of the output?

common/logger/log.yml Show resolved Hide resolved
common/logger/src/lib.rs Show resolved Hide resolved
@cryptowen cryptowen requested a review from a team December 2, 2019 07:27
KaoImin
KaoImin previously approved these changes Dec 2, 2019
common/logger/Cargo.toml Outdated Show resolved Hide resolved
common/logger/log.yml Outdated Show resolved Hide resolved
devtools/chain/config.toml Outdated Show resolved Hide resolved
yejiayu
yejiayu previously approved these changes Dec 3, 2019
@cryptowen cryptowen merged commit d633309 into nervosnetwork:master Dec 4, 2019
KaoImin pushed a commit to KaoImin/muta that referenced this pull request Dec 13, 2019
* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies
KaoImin added a commit to KaoImin/muta that referenced this pull request Dec 13, 2019
refactor: muta consensus

fix

remove cache order root

tmp

feat: metrics logger (nervosnetwork#43)

* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies

feat: sync epoch
yejiayu added a commit that referenced this pull request Dec 26, 2019
* feat: metrics logger (#43)

* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies

* chore: tips for running `make ci` before create PR (#54)

* feat: support consensus tracing (#53)

* feat: support consensus trace

* feat: avoid unsafe unwrap

* feat: check is_err when init_tracer to ensure  tracer init correctly

* feat: panic when init tracer failed

* chore: cargo fmt

* feat: return ProtocolResult for standard when init tracer

* feat: update tracer sdk

* refactor: remove unnecessary code

* chore: upgrade bytes to 0.5 (#57)

Also upgrade prost to pinned git commit, ophelia to 0.2.
All of these are required to upgrade bytes.

* reafctor(consensus): redesign the consensus architecture (#45)

* refactor rpc

* refactor: muta consensus

* fix CI

* chore(ci): reduce travis cache size (#62)

* chore(ci): use sccache and limit its cache size to 2G (#63)

* chore(ci): use sccache and limit its cache size to 2G

Try fix cahce timeout

* fix(ci): disable sccache to install it

* chore(ci): enable sccache

* chore(ci): remove cargo sweep from script.sh

* chore(ci): disable sccache on master (#66)

* fix(consensus): empty block receipts root (#61)

* fix: empty block receipts root

* upgrade rust toolchain version

* chore(ci): enable sccache (#67)

* fix(ci): fail to install sccache after new rust-toolchain (#68)

* feat(consensus): develop aggregate crypto with overlord (#60)

* update ophelia

* feat: aggregated signature

* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (#46)

* feat(protocol/traits): Add traits of binding. (#47)

* feat(core/binding): Implementation of service state. (#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (#49)

* feat(core/binding-macro): Add cycles proc-marco. (#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (#65)

* feat(core/binding-macro): Support for returning a struct. (#70)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* rebase master

* .

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (#72)

Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>
yejiayu added a commit to yejiayu/muta that referenced this pull request Dec 29, 2019
* feat: metrics logger (nervosnetwork#43)

* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies

* chore: tips for running `make ci` before create PR (nervosnetwork#54)

* feat: support consensus tracing (nervosnetwork#53)

* feat: support consensus trace

* feat: avoid unsafe unwrap

* feat: check is_err when init_tracer to ensure  tracer init correctly

* feat: panic when init tracer failed

* chore: cargo fmt

* feat: return ProtocolResult for standard when init tracer

* feat: update tracer sdk

* refactor: remove unnecessary code

* chore: upgrade bytes to 0.5 (nervosnetwork#57)

Also upgrade prost to pinned git commit, ophelia to 0.2.
All of these are required to upgrade bytes.

* reafctor(consensus): redesign the consensus architecture (nervosnetwork#45)

* refactor rpc

* refactor: muta consensus

* fix CI

* chore(ci): reduce travis cache size (nervosnetwork#62)

* chore(ci): use sccache and limit its cache size to 2G (nervosnetwork#63)

* chore(ci): use sccache and limit its cache size to 2G

Try fix cahce timeout

* fix(ci): disable sccache to install it

* chore(ci): enable sccache

* chore(ci): remove cargo sweep from script.sh

* chore(ci): disable sccache on master (nervosnetwork#66)

* fix(consensus): empty block receipts root (nervosnetwork#61)

* fix: empty block receipts root

* upgrade rust toolchain version

* chore(ci): enable sccache (nervosnetwork#67)

* fix(ci): fail to install sccache after new rust-toolchain (nervosnetwork#68)

* feat(consensus): develop aggregate crypto with overlord (nervosnetwork#60)

* update ophelia

* feat: aggregated signature

* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (nervosnetwork#46)

* feat(protocol/traits): Add traits of binding. (nervosnetwork#47)

* feat(core/binding): Implementation of service state. (nervosnetwork#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (nervosnetwork#49)

* feat(core/binding-macro): Add cycles proc-marco. (nervosnetwork#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (nervosnetwork#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (nervosnetwork#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (nervosnetwork#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (nervosnetwork#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (nervosnetwork#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (nervosnetwork#65)

* feat(core/binding-macro): Support for returning a struct. (nervosnetwork#70)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* rebase master

* .

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (nervosnetwork#72)

Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>
yejiayu added a commit that referenced this pull request Dec 30, 2019
* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (#46)

* feat(protocol/traits): Add traits of binding. (#47)

* feat(core/binding): Implementation of service state. (#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (#49)

* feat(core/binding-macro): Add cycles proc-marco. (#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (#65)

* feat(core/binding-macro): Support for returning a struct. (#70)

* [ᚬframework] feat(framework): Service executor. (#71)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* Update protocol/Cargo.toml

Co-Authored-By: Eason Gao <kaoimin@qq.com>

Co-authored-by: Eason Gao <kaoimin@qq.com>

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (#72)

* feat(framework/binding): 1. add iterator for StoreMap and StoreArray \n 2. impl FixedCodec for u8,u32,u64,bool,String

* fix FixedCodecError

* rebase

* fix u64 for overflowing_add

* [ᚬframework] Rebase master (#73)

* feat: metrics logger (#43)

* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies

* chore: tips for running `make ci` before create PR (#54)

* feat: support consensus tracing (#53)

* feat: support consensus trace

* feat: avoid unsafe unwrap

* feat: check is_err when init_tracer to ensure  tracer init correctly

* feat: panic when init tracer failed

* chore: cargo fmt

* feat: return ProtocolResult for standard when init tracer

* feat: update tracer sdk

* refactor: remove unnecessary code

* chore: upgrade bytes to 0.5 (#57)

Also upgrade prost to pinned git commit, ophelia to 0.2.
All of these are required to upgrade bytes.

* reafctor(consensus): redesign the consensus architecture (#45)

* refactor rpc

* refactor: muta consensus

* fix CI

* chore(ci): reduce travis cache size (#62)

* chore(ci): use sccache and limit its cache size to 2G (#63)

* chore(ci): use sccache and limit its cache size to 2G

Try fix cahce timeout

* fix(ci): disable sccache to install it

* chore(ci): enable sccache

* chore(ci): remove cargo sweep from script.sh

* chore(ci): disable sccache on master (#66)

* fix(consensus): empty block receipts root (#61)

* fix: empty block receipts root

* upgrade rust toolchain version

* chore(ci): enable sccache (#67)

* fix(ci): fail to install sccache after new rust-toolchain (#68)

* feat(consensus): develop aggregate crypto with overlord (#60)

* update ophelia

* feat: aggregated signature

* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (#46)

* feat(protocol/traits): Add traits of binding. (#47)

* feat(core/binding): Implementation of service state. (#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (#49)

* feat(core/binding-macro): Add cycles proc-marco. (#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (#65)

* feat(core/binding-macro): Support for returning a struct. (#70)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* rebase master

* .

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (#72)

Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>

* feat(graphql): Modify the API to fit the framework data structure. (#74)

* feat: Extract muta as crate.

* rebase master

Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
yejiayu added a commit that referenced this pull request Dec 30, 2019
* feat: metrics logger (#43)

* add logger config

* add logger.metrics example

* Revert "add logger.metrics example"

This reverts commit 7c04ff3.

* add logger module instruction

* chore: add newline to the end of text file

* refactor: change serde to json crate to manipulate json

* chore: remove patch version in Cargo.toml depencencies

* chore: tips for running `make ci` before create PR (#54)

* feat: support consensus tracing (#53)

* feat: support consensus trace

* feat: avoid unsafe unwrap

* feat: check is_err when init_tracer to ensure  tracer init correctly

* feat: panic when init tracer failed

* chore: cargo fmt

* feat: return ProtocolResult for standard when init tracer

* feat: update tracer sdk

* refactor: remove unnecessary code

* chore: upgrade bytes to 0.5 (#57)

Also upgrade prost to pinned git commit, ophelia to 0.2.
All of these are required to upgrade bytes.

* reafctor(consensus): redesign the consensus architecture (#45)

* refactor rpc

* refactor: muta consensus

* fix CI

* chore(ci): reduce travis cache size (#62)

* chore(ci): use sccache and limit its cache size to 2G (#63)

* chore(ci): use sccache and limit its cache size to 2G

Try fix cahce timeout

* fix(ci): disable sccache to install it

* chore(ci): enable sccache

* chore(ci): remove cargo sweep from script.sh

* chore(ci): disable sccache on master (#66)

* fix(consensus): empty block receipts root (#61)

* fix: empty block receipts root

* upgrade rust toolchain version

* chore(ci): enable sccache (#67)

* fix(ci): fail to install sccache after new rust-toolchain (#68)

* feat(consensus): develop aggregate crypto with overlord (#60)

* update ophelia

* feat: aggregated signature

* refactor(protocol): Adjust the data structure of transactions and receipts.

* feat(protocol/types): Add cycles_price for raw_transaction. (#46)

* feat(protocol/traits): Add traits of binding. (#47)

* feat(core/binding): Implementation of service state. (#48)

* feat(core/binding-macro): Add `read` and `write` proc-macro. (#49)

* feat(core/binding-macro): Add cycles proc-marco. (#52)

* [ᚬframework] feat(core/binding): add default StoreBool, StoreUint64, StoreString (#51)

* feat(core/binding): add DefaultStoreBool, DefaultStoreUint64, DefaultStoreString

* feat(core/binding): adjust tests path

* feat(core/binding): adjust code

* feat(core/binding): fix fmt

* feat(core/binding): change BigEndian to LittleEndian

* [ᚬframework] feat(core/binding): add StoreMap, StoreArray  (#55)

* feat(core/binding): add StoreMap

* feat(core/binding): add StoreArray

* feat(core/binding): fix some issues

* feat(core/binding): add TODO comment

* [ᚬframework] feat(core/binding): add service_sdk, chain_querier, request_context (#58)

* feat(core/binding): finish alloc type and chain querier of sdk

* feat(core/binding): add sdk test

* feat(core/binding): add service sdk and request context

* fix style

* [ᚬframework] feat(core/binding-macro): Add #[service] to automatically implement the service trait. (#56)

* feat(core/binding-macro): Add #[service] to automatically implement the service trait.

* Documents do not run tests.

* split for impl

* fix read/write result

* update cargo.lock

* [ᚬframework] feat(core/binding-macro): Add #[init] attribute. (#64)

* feat(core/binding-macro): Add #[init] attribute.

* fix typo

* fix binding trait

* chore: Add framework dir. (#65)

* feat(core/binding-macro): Support for returning a struct. (#70)

* feat(build-in-services): Add asset service.

* feat(framework): Service executor.

* exec hook

* fix stash

* fix typo

* fix typo

* fix overflow

* fix typo

* rebase master

* .

* [ᚬframework] feat(framework/binding): add Iterator and impl FixedCodec for rust primitive type (#72)

Co-authored-by: Wenchao Hu <me@huwenchao.com>
Co-authored-by: yonghui <homura.dev@gmail.com>
Co-authored-by: zeroqn <zero.forest@outlook.com>
Co-authored-by: Eason Gao <kaoimin@qq.com>
Co-authored-by: zhounan <33241113+mkxbl@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants