Skip to content

Commit 76a0ab4

Browse files
committed
fixing for windows
1 parent 1615682 commit 76a0ab4

File tree

7 files changed

+31
-89
lines changed

7 files changed

+31
-89
lines changed

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ sha2 = "0.10"
3232
tracing = "0.1"
3333
tracing-futures = { version = "0.2.5", default-features = false, features = ["tokio", "futures-03", "std"] }
3434
uuid = { version = "1.7", features = ["v4"] } # A library to generate and parse UUIDs.
35+
uname = "0.1.1"
3536

3637
# Non-feature optional dependencies
3738
libflate = { version = "2", optional = true }

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
//!
2727
//! * `compression` - To enable GZIP Compression when sending traces to Apollo Studio.
2828
mod compression;
29-
mod packages;
3029
mod proto;
3130
pub mod register;
3231
mod report_aggregator;

src/packages/mod.rs

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/packages/uname.rs

Lines changed: 0 additions & 84 deletions
This file was deleted.

src/proto.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
#![allow(rustdoc::all)]
22
#![allow(clippy::all)]
33

4+
#[allow(unknown_lints)]
5+
#[allow(unused_attributes)]
6+
#[cfg_attr(rustfmt, rustfmt::skip)]
7+
#[allow(box_pointers)]
8+
#[allow(dead_code)]
9+
#[allow(missing_docs)]
10+
#[allow(non_camel_case_types)]
11+
#[allow(non_snake_case)]
12+
#[allow(non_upper_case_globals)]
13+
#[allow(trivial_casts)]
14+
#[allow(unused_results)]
15+
#[allow(unused_mut)]
416
pub mod reports {
517
include!(concat!(env!("OUT_DIR"), concat!("/proto/reports.rs")));
618
}

src/report_aggregator/mod.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use protobuf::Message;
88
use tokio::time::Instant;
99

1010
use crate::{
11-
packages::uname::Uname,
1211
proto::reports::{Report, ReportHeader, Trace, TracesAndStats},
1312
runtime::{spawn, JoinHandle},
1413
};
@@ -37,9 +36,15 @@ impl ReportAggregator {
3736
let (tx, mut rx) = mpsc::channel::<(String, Trace)>(BUFFER_SLOTS);
3837

3938
let reported_header = ReportHeader {
40-
uname: Uname::new()
39+
uname: uname::uname()
4140
.ok()
42-
.map(|x| x.to_string())
41+
.map(|x| format!("{sysname} {version} {release} {machine} {nodename}",
42+
sysname = x.sysname,
43+
version = x.version,
44+
release = x.release,
45+
machine = x.machine,
46+
nodename = x.nodename
47+
))
4348
.unwrap_or_else(|| "No uname provided".to_string()),
4449
hostname,
4550
graph_ref: format!("{graph_id}@{variant}"),

0 commit comments

Comments
 (0)