Merge all profiling-related crates into a single datadog-profiling crate#35
Conversation
This is preparation work for moving everything under the `datadog-profiling` crate.
Now that everything is going to live inside the `datadog-profiling` crate, it still makes sense to keep an internal separation in the codebase.
| [parse] | ||
| parse_deps = true | ||
| include = ["ddcommon", "ddcommon-ffi", "ddprof-exporter", "ddprof-profiles", "ux"] | ||
| include = ["ddcommon", "ddcommon-ffi", "datadog-profiling", "ux"] |
There was a problem hiding this comment.
Thanks, this makes sense.
| let protos = &[concat!( | ||
| env!("CARGO_MANIFEST_DIR"), | ||
| "/src/profile/profile.proto" | ||
| )]; |
There was a problem hiding this comment.
I'm curious: did cargo fmt split these into multiple lines? Doesn't affect PR at all, just curious.
There was a problem hiding this comment.
Yes, it did. I don't particularly like some of its decisions but... ahaha not going to fight that fight xD
morrisonlevi
left a comment
There was a problem hiding this comment.
Looks good to me, but I should probably compile the Rust version of the PHP profiler against it to be sure. I'll do that sometime today. Thanks, Ivo!
|
Why |
Good question. I felt it was a bit more in-line with the rest of the names:
...but if you feel strongly against it, happy to change -- I did choose between both explicitly, and I do prefer singular, but I'm willing to compromise with profiles :) |
|
Thanks everyone for the quick turnaround :) |
…PIs, and adjust Slices (#34) * Fix clippy lints and expose dependencies of API hyper::Uri and chrono::{DateTime, Utc} are used in the public Rust API, so we need to `pub use` them so consumers can use these types and for them to be compatible. * Update for Rust 1.56 * Downgrade ux to 0.1.3 to avoid const new 0.1.4 uses const new, which requires Rust 1.57+ * Fix 3rdparty license paths and clippy lint * Fix license file * Remove unused Exporter APIs and adjust Slices (#35) * Remove unused Exporter APIs and adjust Slices CharSlice -> intended to be valid utf-8 string. ByteSlice -> not intended to be valid utf-8 string (like binary data). * Fix quoting for CMake * Fix exporter example, address CR
What does this PR do?
This PR takes the previously-existing profiling-related crates:
ddprofddprof-exporterddprof-profilesand folds them into a single
datadog-profilingcrate.Note that I did not touch the
ddprof-fficrate yet. To be decided what do do with it.Motivation
This follows from our discussions on reducing the number of crates during PRs and the weekly meeting.
Additional Notes
I kept the existing namespacing, in a way:
ddprof-exporter->datadog_profiling::exporterddprof-profiles->datadog_profiling::profileAlso, this PR will be really hard to rebase and whatnot, so I suggest any extra adjustments be made as a separate, follow-up PR, rather than letting this live for a long time. (I'll still be up to doing any changes, definitely not saying this to avoid doing any further work)
I also went ahead and reserved the
datadog-profilingname on crates.io => https://crates.io/crates/datadog-profiling .How to test the change?
cargo test