Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into prometheus-client-2
  • Loading branch information
emschwartz committed May 23, 2023
commit fb34b115736dde38e09d194a99b952932c09a752
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2

# Lint
# Note: GitHub hosted runners using the latest stable version of Rust have Clippy pre-installed.
- run: cargo clippy --features=metrics,prometheus-exporter
- run: cargo clippy --features=prometheus
- run: cargo clippy --features=prometheus-client
- run: cargo clippy --features=opentelemetry

# Build the packages
- run: cargo build
- run: cargo build --features=custom-objective-percentile,custom-objective-latency
Expand Down
4 changes: 2 additions & 2 deletions autometrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ metrics = { version = "0.21", default-features = false, optional = true }

# Used for prometheus-exporter feature
metrics-exporter-prometheus = { version = "0.12", default-features = false, optional = true }
opentelemetry-prometheus = { version = "0.11", optional = true }
opentelemetry_sdk = { version = "0.18", default-features = false, features = ["metrics"], optional = true }
opentelemetry-prometheus = { version = "0.12.0", optional = true }
opentelemetry_sdk = { version = "0.19", default-features = false, features = ["metrics"], optional = true }
prometheus = { version = "0.13", default-features = false, optional = true }

# Used for prometheus-client feature
Expand Down
30 changes: 15 additions & 15 deletions autometrics/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ pub const BUILD_INFO_DESCRIPTION: &str =
"Autometrics info metric for tracking software version and build details";

// Labels
pub const FUNCTION_KEY: &'static str = "function";
pub const MODULE_KEY: &'static str = "module";
pub const CALLER_KEY: &'static str = "caller";
pub const RESULT_KEY: &'static str = "result";
pub const OK_KEY: &'static str = "ok";
pub const ERROR_KEY: &'static str = "error";
pub const OBJECTIVE_NAME: &'static str = "objective.name";
pub const OBJECTIVE_NAME_PROMETHEUS: &'static str = "objective_name";
pub const OBJECTIVE_PERCENTILE: &'static str = "objective.percentile";
pub const OBJECTIVE_PERCENTILE_PROMETHEUS: &'static str = "objective_percentile";
pub const OBJECTIVE_LATENCY_THRESHOLD: &'static str = "objective.latency.threshold";
pub const OBJECTIVE_LATENCY_THRESHOLD_PROMETHEUS: &'static str = "objective_latency_threshold";
pub const VERSION_KEY: &'static str = "version";
pub const COMMIT_KEY: &'static str = "commit";
pub const BRANCH_KEY: &'static str = "branch";
pub const FUNCTION_KEY: &str = "function";
pub const MODULE_KEY: &str = "module";
pub const CALLER_KEY: &str = "caller";
pub const RESULT_KEY: &str = "result";
pub const OK_KEY: &str = "ok";
pub const ERROR_KEY: &str = "error";
pub const OBJECTIVE_NAME: &str = "objective.name";
pub const OBJECTIVE_NAME_PROMETHEUS: &str = "objective_name";
pub const OBJECTIVE_PERCENTILE: &str = "objective.percentile";
pub const OBJECTIVE_PERCENTILE_PROMETHEUS: &str = "objective_percentile";
pub const OBJECTIVE_LATENCY_THRESHOLD: &str = "objective.latency.threshold";
pub const OBJECTIVE_LATENCY_THRESHOLD_PROMETHEUS: &str = "objective_latency_threshold";
pub const VERSION_KEY: &str = "version";
pub const COMMIT_KEY: &str = "commit";
pub const BRANCH_KEY: &str = "branch";
You are viewing a condensed version of this merge commit. You can view the full changes here.