-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCargo.toml
More file actions
157 lines (142 loc) · 5.55 KB
/
Cargo.toml
File metadata and controls
157 lines (142 loc) · 5.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[package]
name = "newrelic_agent_control"
description = "New Relic Agent Control"
version = "1.11.0"
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
publish.workspace = true
license-file.workspace = true
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
clap = { workspace = true, features = ["derive"] }
serde = { workspace = true, features = ["derive"] }
thiserror = { workspace = true }
tracing-subscriber = { workspace = true, features = ["env-filter", "chrono"] }
tracing = { workspace = true, features = ["attributes"] }
ctrlc = { version = "3.5.2", features = ["termination"] }
serde_yaml = { workspace = true }
regex = { workspace = true }
futures = { version = "0.3.32" }
tokio = { version = "1.51.0", features = ["rt-multi-thread", "macros", "sync"] }
console-subscriber = { version = "0.5.0", optional = true }
duration-str = "0.21.0"
http = { workspace = true }
reqwest = { workspace = true }
url = { version = "2.5.8", features = ["serde"] }
actix-web = "4.13.0"
serde_json = { workspace = true }
semver = { workspace = true, features = ["serde"] }
chrono = { workspace = true }
base64 = { version = "0.22.1" }
# New Relic dependencies (external repos)
nr-auth = { git = "https://github.com/newrelic/newrelic-auth-rs.git", tag = "0.4.0" }
opamp-client = { git = "https://github.com/newrelic/newrelic-opamp-rs.git", tag = "0.0.36" }
# local dependencies
fs = { path = "../fs" }
wrapper_with_default = { path = "../wrapper_with_default" }
# OnHost subagent dependencies
resource-detection = { path = "../resource-detection" }
# K8S subagent dependencies
kube = { version = "3.1.0", default-features = false, features = [
"config",
"runtime",
"derive",
"ws",
"rustls-tls",
"aws-lc-rs",
] }
k8s-openapi = { version = "0.27.1", features = ["v1_31"] }
either = { version = "1.15.0" }
crossbeam = { version = "0.8.4", features = ["crossbeam-channel"] }
tracing-appender = "0.2.4"
cfg-if = "1.0.4"
# HOST_ID and HOST_NAME attributes are experimental fields and after 0.26.0 are not included by default.
# Check <https://github.com/open-telemetry/opentelemetry-rust/pull/2098> for details.
opentelemetry-semantic-conventions = { version = "0.31.0", features = [
"semconv_experimental",
] }
http-serde = "2.1.1"
config = { version = "0.15.22", features = ["yaml"] }
aws-lc-rs = "1.16.2"
bytes = "1.11.1"
opentelemetry = { version = "0.31.0", features = ["trace"] }
opentelemetry_sdk = { version = "0.31.0", features = ["trace"] }
tracing-opentelemetry = "0.32.1"
opentelemetry-otlp = { version = "0.31.1", features = ["reqwest-rustls"] }
opentelemetry-http = { version = "0.31.0" }
opentelemetry-appender-tracing = { version = "0.31.1", features = [
"experimental_use_tracing_span_context",
] }
async-trait = "0.1.89"
flate2 = "1.1.9"
tar = "0.4.45"
zip = "8.5.1"
oci-client = { version = "0.16.1", features = [
"rustls-tls",
], default-features = false }
rustls-pki-types = { version = "1.14.0", features = ["std"] }
dhat = { version = "0.3.3", optional = true }
[target.'cfg(target_family = "unix")'.dependencies]
nix = { workspace = true, features = ["signal", "user", "hostname"] }
[target.'cfg(target_family = "windows")'.dependencies]
windows = { workspace = true, features = [
"Win32_System_Console",
"Win32_System_Threading",
"Win32_System_JobObjects",
"Win32_Security",
] }
windows-service = "0.8.0"
[target.'cfg(target_os = "windows")'.dependencies]
windows-sys = { workspace = true }
[dev-dependencies]
assert_cmd = { workspace = true }
predicates = { workspace = true }
tower-test = { workspace = true }
tempfile = { workspace = true }
mockall = { workspace = true }
schemars = { workspace = true }
serde_json = { workspace = true }
assert_matches = { workspace = true }
mockall_double = { workspace = true }
tracing-test = { workspace = true }
jsonwebtoken = { workspace = true }
fs = { path = "../fs", features = ["mocks"] }
tokio = { version = "1.51.0", features = ["rt-multi-thread", "macros"] }
fake = { version = "5.1.0", features = ["derive", "http"] }
prost = "0.14.3"
httpmock = { version = "0.8.3", features = ["proxy"] }
serial_test = "3.4.0"
futures = "0.3.32"
rcgen = { version = "0.14.7", features = ["crypto"] }
rstest = { workspace = true }
tokio-stream = { version = "0.1.18", features = ["net"] }
memory-stats = "1.2.0"
[build-dependencies]
glob = "0.3.3"
[[bin]]
name = "newrelic-agent-control-k8s"
path = "src/bin/main_k8s.rs"
# On-host binary
# Due to a GoReleaser limitation, the generated binary here must have the same name as the final
# name we want to use in the generated and packaged assets.
# As our K8s build is more manual and does not have this problem, we can name the on-host binary
# just `newrelic-agent-control` while the K8s one is kept as `newrelic-agent-control-k8s`.
[[bin]]
name = "newrelic-agent-control"
path = "src/bin/main_onhost.rs"
[[bin]]
name = "newrelic-agent-control-k8s-cli"
path = "src/bin/main_agent_control_k8s_cli.rs"
[[bin]] # Same GoReleaser limitations as "newrelic-agent-control" apply here.
name = "newrelic-agent-control-cli"
path = "src/bin/main_agent_control_onhost_cli.rs"
[features]
# feature tokio-console allows debugging tokio tasks using tokio-console
tokio-console = ["tokio/full", "tokio/tracing", "dep:console-subscriber"]
# feature multiple-instances avoids checking if more than one agent-control process is running at a time
multiple-instances = []
# Disable the need to run AC as root. Useful for testing and development.
disable-asroot = []
dhat-heap = ["dep:dhat"] # to perform heap profiling
dhat-ad-hoc = ["dep:dhat"] # to perform ad hoc profiling