12 stable releases

1.2.2 Sep 19, 2024
1.1.6 Sep 17, 2024
1.1.3 Jul 26, 2024
1.1.1 May 21, 2024
1.0.4 Apr 19, 2024

#2156 in Web programming

Download history 469/week @ 2024-07-24 257/week @ 2024-07-31 229/week @ 2024-08-07 167/week @ 2024-08-14 209/week @ 2024-08-21 204/week @ 2024-08-28 390/week @ 2024-09-04 426/week @ 2024-09-11 871/week @ 2024-09-18 316/week @ 2024-09-25 252/week @ 2024-10-02 429/week @ 2024-10-09 487/week @ 2024-10-16 371/week @ 2024-10-23 364/week @ 2024-10-30 271/week @ 2024-11-06

1,546 downloads per month

MIT license

15KB
253 lines

cloud-profiler-rust

version downloads

This library was created based on the google support implementations:

  • cloud-profiler-go
  • cloud-profiler-node
  • etc.

As a result of this being completed by examining those other libraries. This is not officially supported by Google at this point in time.

That being said, it seems to work as long as you don't give away the fact that we are actually a rust binary and not go, per:

https://github.com/statsig-io/cloud-profiler-rust/blob/main/src/lib.rs#L64

Usage

Using this library is extremely straight forward, this is an example from our forward proxy, that uses both a static enablement and dynamic enablement method:

cloud_profiler_rust::maybe_start_profiling(
        "statsig-forward-proxy".to_string(),
        std::env::var("DD_VERSION").unwrap_or("missing_dd_version".to_string()),
        move || {
            force_enable
                || Statsig::check_gate(&statsig_user, "enable_gcp_profiler_for_sfp").unwrap_or(false)
        },
    )
    .await;

Dependencies

~30–45MB
~878K SLoC