Skip to content

Commit

Permalink
Integrate prometheus metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiimk committed Sep 13, 2024
1 parent 9c20b91 commit d1aa653
Show file tree
Hide file tree
Showing 25 changed files with 1,158 additions and 77 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!--- - Fixed -->

## [Unreleased]
### Added
- Added first integration of Prometheus metrics starting with Outbox
- Added `--metrics` CLI flag that will dump metrics into a file after command execution
### Changed
- Telemetry improvements:
- Improved data collected around transactional code
Expand Down
164 changes: 163 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ members = [
"src/utils/kamu-cli-puppet",
"src/utils/messaging-outbox",
"src/utils/multiformats",
"src/utils/observability",
"src/utils/random-names",
"src/utils/repo-tools",
"src/utils/time-source",
Expand Down Expand Up @@ -104,6 +105,7 @@ kamu-data-utils = { version = "0.199.3", path = "src/utils/data-utils", default-
kamu-datafusion-cli = { version = "0.199.3", path = "src/utils/datafusion-cli", default-features = false }
messaging-outbox = { version = "0.199.3", path = "src/utils/messaging-outbox", default-features = false }
multiformats = { version = "0.199.3", path = "src/utils/multiformats", default-features = false }
observability = { version = "0.199.3", path = "src/utils/observability", default-features = false }
random-names = { version = "0.199.3", path = "src/utils/random-names", default-features = false }
time-source = { version = "0.199.3", path = "src/utils/time-source", default-features = false }
tracing-perfetto = { version = "0.199.3", path = "src/utils/tracing-perfetto", default-features = false }
Expand Down
34 changes: 6 additions & 28 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,12 @@ skip-tree = []
wildcards = "deny"

# We specify features explicitly to avoid bloat
workspace-default-features = "deny"
features = [
{ name = "opendatafabric", allow = [
"default",
"sqlx",
"sqlx-mysql",
"sqlx-postgres",
"sqlx-sqlite",
] },
{ name = "kamu", allow = [
"default",
"ingest-evm",
"ingest-ftp",
"ingest-mqtt",
"query-extensions-json",
] },
{ name = "kamu-accounts", allow = [
"default",
"sqlx",
] },
{ name = "kamu-datasets", allow = [
"default",
"sqlx",
] },
{ name = "kamu-cli", allow = [
"default",
] },
]
# TODO: https://github.com/EmbarkStudios/cargo-deny/issues/699
# external-default-features = "deny"

# TODO: https://github.com/EmbarkStudios/cargo-deny/issues/700
# workspace-default-features = "deny"


deny = [
### Crates we shouldn't use ####
Expand Down
1 change: 1 addition & 0 deletions resources/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ To regenerate this schema from existing code, use the following command:
* `--no-color` — Disable color output in the terminal
* `-q`, `--quiet` — Suppress all non-essential output
* `--trace` — Record and visualize the command execution as perfetto.dev trace
* `--metrics` — Dump all metrics at the end of command execution

To get help for individual commands use:
kamu <command> -h
Expand Down
4 changes: 3 additions & 1 deletion src/app/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ database-common = { workspace = true }
database-common-macros = { workspace = true }
http-common = { workspace = true }
internal-error = { workspace = true }
observability = { workspace = true, features = ["prometheus"] }
time-source = { workspace = true }

kamu = { workspace = true }
Expand Down Expand Up @@ -139,7 +140,8 @@ serde = { version = "1", features = ["derive"] }
serde_with = "3"
serde_yaml = "0.9"

# Tracing / logging / telemetry
# Tracing / logging / telemetry / metrics
prometheus = { version = "0.13", default-features = false }
tracing = "0.1"
tracing-appender = "0.2"
tracing-perfetto = { workspace = true }
Expand Down
Loading

0 comments on commit d1aa653

Please sign in to comment.