Skip to content

Commit 0b4737b

Browse files
committed
chore(config): generate datadog config deserializer
1 parent 9c1abde commit 0b4737b

16 files changed

Lines changed: 1890 additions & 45 deletions

File tree

.vale/styles/config/vocabularies/technical/accept.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,4 @@ trivy
240240
Erlang
241241
OTP
242242
respawn(s|ed|ing)?
243+
validator

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ ordered-float = { version = "5", default-features = false }
123123
pastey = { version = "0.2", default-features = false }
124124
pin-project = { version = "1.1", default-features = false }
125125
pin-project-lite = { version = "0.2", default-features = false }
126+
prettyplease = { version = "0.2", default-features = false }
126127
derive-where = { version = "1.6", default-features = false }
127128
proptest = { version = "1.11", default-features = false, features = ["std"] }
128129
prost = { version = "0.14", default-features = false }
@@ -139,11 +140,14 @@ rustls = { version = "0.23", default-features = false, features = [
139140
"std",
140141
"tls12",
141142
] }
143+
schemars = { version = "0.8", default-features = false }
142144
similar-asserts = { version = "2.0", default-features = false }
143145
slab = { version = "0.4.12", default-features = false }
146+
syn = { version = "2", default-features = false, features = ["full", "parsing", "visit-mut"] }
144147
tokio-util = { version = "0.7.18", default-features = false }
145148
tower = { version = "0.5", default-features = false }
146149
tracing-subscriber = { version = "0.3", default-features = false }
150+
typify = { version = "0.7", default-features = false }
147151
url = { version = "2", default-features = false }
148152
ndarray = { version = "0.17", default-features = false }
149153
ndarray-stats = { version = "0.7", default-features = false }

LICENSE-3rdparty.csv

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ derive_more-impl,https://github.com/JelteF/derive_more,MIT,Jelte Fennema <github
9696
digest,https://github.com/RustCrypto/traits,MIT OR Apache-2.0,RustCrypto Developers
9797
displaydoc,https://github.com/yaahc/displaydoc,MIT OR Apache-2.0,Jane Lusby <jlusby@yaah.dev>
9898
document-features,https://github.com/slint-ui/document-features,MIT OR Apache-2.0,Slint Developers <info@slint.dev>
99+
dyn-clone,https://github.com/dtolnay/dyn-clone,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
99100
either,https://github.com/rayon-rs/either,MIT OR Apache-2.0,bluss
100101
enum_dispatch,https://gitlab.com/antonok/enum_dispatch,MIT OR Apache-2.0,Anton Lazarev <https://antonok.com>
101102
equivalent,https://github.com/indexmap-rs/equivalent,Apache-2.0 OR MIT,The equivalent Authors
@@ -315,6 +316,7 @@ redox_syscall,https://gitlab.redox-os.org/redox-os/syscall,MIT,Jeremy Soller <ja
315316
regex,https://github.com/rust-lang/regex,MIT OR Apache-2.0,"The Rust Project Developers, Andrew Gallant <jamslam@gmail.com>"
316317
regex-automata,https://github.com/rust-lang/regex,MIT OR Apache-2.0,"The Rust Project Developers, Andrew Gallant <jamslam@gmail.com>"
317318
regex-syntax,https://github.com/rust-lang/regex,MIT OR Apache-2.0,"The Rust Project Developers, Andrew Gallant <jamslam@gmail.com>"
319+
regress,https://github.com/ridiculousfish/regress,MIT OR Apache-2.0,ridiculousfish <corydoras@ridiculousfish.com>
318320
reqwest,https://github.com/seanmonstar/reqwest,MIT OR Apache-2.0,Sean McArthur <sean@seanmonstar.com>
319321
resolv-conf,https://github.com/hickory-dns/resolv-conf,MIT OR Apache-2.0,The resolv-conf Authors
320322
ring,https://github.com/briansmith/ring,Apache-2.0 AND ISC,The ring Authors
@@ -338,6 +340,8 @@ rustversion,https://github.com/dtolnay/rustversion,MIT OR Apache-2.0,David Tolna
338340
ryu,https://github.com/dtolnay/ryu,Apache-2.0 OR BSL-1.0,David Tolnay <dtolnay@gmail.com>
339341
same-file,https://github.com/BurntSushi/same-file,Unlicense OR MIT,Andrew Gallant <jamslam@gmail.com>
340342
schannel,https://github.com/steffengy/schannel-rs,MIT,"Steven Fackler <sfackler@gmail.com>, Steffen Butzer <steffen.butzer@outlook.com>"
343+
schemars,https://github.com/GREsau/schemars,MIT,Graham Esau <gesau@hotmail.co.uk>
344+
schemars_derive,https://github.com/GREsau/schemars,MIT,Graham Esau <gesau@hotmail.co.uk>
341345
scoped-tls,https://github.com/alexcrichton/scoped-tls,MIT OR Apache-2.0,Alex Crichton <alex@alexcrichton.com>
342346
scopeguard,https://github.com/bluss/scopeguard,MIT OR Apache-2.0,bluss
343347
secrecy,https://github.com/iqlusioninc/crates/tree/main/secrecy,Apache-2.0 OR MIT,Tony Arcieri <tony@iqlusion.io>
@@ -350,6 +354,7 @@ serde-value,https://github.com/arcnmx/serde-value,MIT,arcnmx
350354
serde_bytes,https://github.com/serde-rs/bytes,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
351355
serde_core,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <erick.tryzelaar@gmail.com>, David Tolnay <dtolnay@gmail.com>"
352356
serde_derive,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <erick.tryzelaar@gmail.com>, David Tolnay <dtolnay@gmail.com>"
357+
serde_derive_internals,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <erick.tryzelaar@gmail.com>, David Tolnay <dtolnay@gmail.com>"
353358
serde_html_form,https://github.com/jplatte/serde_html_form,MIT,The serde_html_form Authors
354359
serde_json,https://github.com/serde-rs/json,MIT OR Apache-2.0,"Erick Tryzelaar <erick.tryzelaar@gmail.com>, David Tolnay <dtolnay@gmail.com>"
355360
serde_path_to_error,https://github.com/dtolnay/path-to-error,MIT OR Apache-2.0,David Tolnay <dtolnay@gmail.com>
@@ -439,6 +444,7 @@ try-lock,https://github.com/seanmonstar/try-lock,MIT,Sean McArthur <sean@seanmon
439444
tungstenite,https://github.com/snapview/tungstenite-rs,MIT OR Apache-2.0,"Alexey Galakhov, Daniel Abramov"
440445
twox-hash,https://github.com/shepmaster/twox-hash,MIT,Jake Goulding <jake.goulding@gmail.com>
441446
typenum,https://github.com/paholg/typenum,MIT OR Apache-2.0,"Paho Lurie-Gregg <paho@paholg.com>, Andre Bogus <bogusandre@gmail.com>"
447+
typify-impl,https://github.com/oxidecomputer/typify,Apache-2.0,The typify-impl Authors
442448
ucd-trie,https://github.com/BurntSushi/ucd-generate,MIT OR Apache-2.0,Andrew Gallant <jamslam@gmail.com>
443449
unarray,https://github.com/cameron1024/unarray,MIT OR Apache-2.0,The unarray Authors
444450
uncased,https://github.com/SergioBenitez/uncased,MIT OR Apache-2.0,Sergio Benitez <sb@sergio.bz>

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ check-unused-deps: ## Checks for any imported dependencies that are not used in
547547
check-docs: check-lint-tools
548548
check-docs: ## Checks prose/code documentation against our style guide
549549
@echo "[*] Checking prose/code documentation against our style guide..."
550-
@vale --minAlertLevel=error --glob='!{lib/*/target/*,docs/.vitepress/*}' docs lib bin
550+
@vale --minAlertLevel=error --glob='!{lib/*/target/*,docs/.vitepress/*,*datadog_configuration*}' docs lib bin
551551

552552
.PHONY: sync-docs-config
553553
sync-docs-config: check-lint-tools

bin/agent-data-plane/src/cli/run.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use saluki_components::{
2424
DatadogLogsConfiguration, DatadogMetricsConfiguration, DatadogServiceChecksConfiguration,
2525
DatadogTraceConfiguration,
2626
},
27-
forwarders::{ClusterAgentForwarderConfiguration, DatadogConfiguration, OtlpForwarderConfiguration},
27+
forwarders::{ClusterAgentForwarderConfiguration, DatadogForwarderConfiguration, OtlpForwarderConfiguration},
2828
relays::otlp::OtlpRelayConfiguration,
2929
sources::{ChecksIPCConfiguration, DogStatsDConfiguration, OtlpConfiguration},
3030
transforms::{
@@ -386,8 +386,8 @@ async fn create_topology(
386386
|| dp_config.service_checks_pipeline_required()
387387
|| dp_config.traces_pipeline_required()
388388
{
389-
let dd_forwarder_config =
390-
DatadogConfiguration::from_configuration(config).error_context("Failed to configure Datadog forwarder.")?;
389+
let dd_forwarder_config = DatadogForwarderConfiguration::from_configuration(config)
390+
.error_context("Failed to configure Datadog forwarder.")?;
391391
blueprint.add_forwarder("dd_out", dd_forwarder_config)?;
392392
}
393393

@@ -498,7 +498,7 @@ fn add_mrf_metrics_pipeline_to_blueprint(
498498
let mrf_metrics_config = DatadogMetricsConfiguration::from_configuration(config)
499499
.error_context("Failed to configure Multi-Region Failover Datadog Metrics encoder.")?;
500500

501-
let mrf_forwarder_config = DatadogConfiguration::from_configuration(config)
501+
let mrf_forwarder_config = DatadogForwarderConfiguration::from_configuration(config)
502502
.map(|config| {
503503
config.with_endpoint_override_and_api_key_refresh_config_path(
504504
mrf_dd_url,

0 commit comments

Comments
 (0)