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

Migrate to tracing crate #39

Merged
merged 3 commits into from
Jul 11, 2022

Conversation

akoshelev
Copy link
Collaborator

Overview

Tracing crate has all features we're using currently (print to stderr, verbosity, format) and is required to instrument MPC helpers with telemetry required to understand the performance of it and different protocols we'll be experimenting with.

This change also adds some pretty basic tracing of HTTP requests by using tower-http crate.

stderrlog crate is removed as we no longer need to use it. Besides that, it has a security advisory against it

Crate:     time
Version:   0.1.44
Title:     Potential segfault in the time crate
Date:      2020-11-18
ID:        RUSTSEC-2020-0071
URL:       https://rustsec.org/advisories/RUSTSEC-2020-0071
Solution:  Upgrade to >=0.2.23
Dependency tree:
time 0.1.44
└── chrono 0.4.19
    └── stderrlog 0.5.3
        └── raw-ipa 0.1.0

error: 1 vulnerability found!

Testing

terminal window 1

 cargo run --features self-signed-certs --bin helper -- -s https -p 3000 -vvv                                                                                                                                                           helper-service 6d5c2f5
    Finished dev [unoptimized + debuginfo] target(s) in 0.31s
     Running `target/debug/helper -s https -p 3000 -vvv`
 INFO raw_ipa::cli::verbosity: Logging setup at level debug
 INFO helper: listening to https://127.0.0.1:3000
DEBUG rustls::server::hs: decided upon suite TLS13_AES_256_GCM_SHA384
DEBUG hyper::proto::h1::io: parsed 5 headers
DEBUG hyper::proto::h1::conn: incoming body is empty
DEBUG request{method=GET uri=/echo?foo=bar version=HTTP/1.1}: tower_http::trace::on_request: started processing request
DEBUG request{method=GET uri=/echo?foo=bar version=HTTP/1.1}: tower_http::trace::on_response: finished processing request latency=0 ms status=200
DEBUG hyper::proto::h1::io: flushed 270 bytes
DEBUG hyper::proto::h1::conn: read eof
DEBUG rustls::conn: Sending warning alert CloseNotify

terminal window 2

wget -q -nv "https://127.0.0.1:3000/echo?foo=bar" --no-check-certificate -O -

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
src/cli/verbosity.rs Outdated Show resolved Hide resolved
src/cli/verbosity.rs Outdated Show resolved Hide resolved
src/cli/verbosity.rs Outdated Show resolved Hide resolved
Tracing is a superset of features we're using currently (print to stderr, verbosity, format) and is required to instrument MPC helpers with telemetry required to understand the performance of it and different protocols we'll be experimenting with.

This change also adds some pretty basic tracing of HTTP requests by using `tower-http` crate.

`stderrlog` crate is removed as we no longer need to use it. Besides that, it has a security advisory against it

```
Crate:     time
Version:   0.1.44
Title:     Potential segfault in the time crate
Date:      2020-11-18
ID:        RUSTSEC-2020-0071
URL:       https://rustsec.org/advisories/RUSTSEC-2020-0071
Solution:  Upgrade to >=0.2.23
Dependency tree:
time 0.1.44
└── chrono 0.4.19
    └── stderrlog 0.5.3
        └── raw-ipa 0.1.0

error: 1 vulnerability found!
```
@thurstonsand
Copy link

LGTM

@martinthomson martinthomson merged commit 31a8d4e into private-attribution:main Jul 11, 2022
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.

3 participants