Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #5

Merged
merged 3 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
341 changes: 195 additions & 146 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
resolver = "2"

exclude = [
"examples/http_api"
"examples/http_api",
"examples/rmq-consumer"
]

members = [
Expand All @@ -22,13 +23,13 @@ members = [
"secrets_manager",
"sql_pool",
"traces",
"auth",
"auth"
]

[workspace.dependencies]
thiserror = { version = "1.0.59" }
serde = { version = "1.0.198" }
serde_json = { version = "1.0.116" }
thiserror = { version = "1.0.60" }
serde = { version = "1.0.202" }
serde_json = { version = "1.0.117" }
tokio = { version = "1.37.0" }
async-trait = { version = "0.1.80" }
tracing = { version = "0.1.40" }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ logging = { git = "ssh://git@github.com/tointernet/ruskit.git", rev = "v1.25.0"

# Documentation

For detailed documentation and usage examples, please visit our [ruskit example repository](https://github.com/ralvescosta/ruskit_examples)
For detailed documentation and usage examples, please visit [ruskit examples](https://github.com/tointernet/ruskit/tree/main/examples)

# License

Expand Down
8 changes: 4 additions & 4 deletions examples/http_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ migrator = {git = "ssh://git@github.com/tointernet/ruskit.git", rev = "v0.3.0",
health-readiness = {git = "ssh://git@github.com/tointernet/ruskit.git", rev = "v0.3.0"}

actix-web = { version = "4.5.1" }
serde = { version = "1.0.200" }
serde_json = { version = "1.0.116" }
serde = { version = "1.0.202" }
serde_json = { version = "1.0.117" }
opentelemetry = { version = "0.22" }
async-trait = { version = "0.1.77" }
async-trait = { version = "0.1.80" }
tracing = { version = "0.1.40" }
tokio = { version = "1.37.0", features = ["default", "rt-multi-thread", "macros", "signal"]}
utoipa = { version = "4.2.0" }
utoipa = { version = "4.2.3" }
validator = { version = "0.18.1" }
3 changes: 3 additions & 0 deletions examples/http_api/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# HTTP API Example

This is a simple HTTP Server example built using the Ruskit library, the main features of this example are:

- Swagger
- Auth0 Support
- Opentelemetry Trace with OTLP
- Opentelemetry Metrics with OTLP
2 changes: 2 additions & 0 deletions examples/rmq-consumer-prom/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[net]
git-fetch-with-cli = true
12 changes: 12 additions & 0 deletions examples/rmq-consumer-prom/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
target/*.json
target/*.TAG
target/debug/.fingerprint
target/debug/build
target/debug/deps
target/debug/examples
target/debug/incremental
target/release/.fingerprint
target/release/build
target/release/deps
target/release/examples
target/release/incremental
29 changes: 29 additions & 0 deletions examples/rmq-consumer-prom/.env.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
RUST_ENV=local
LOG_LEVEL=debug
APP_NAME=rmq-consumer-prom

ENABLE_HEALTH_READINESS=true
HEALTH_READINESS_PORT=8888

SECRET_MANAGER=NONE

RABBITMQ_HOST=rmq
RABBITMQ_PORT=5672
RABBITMQ_USER=guest
RABBITMQ_PASSWORD=guest

#OTLP Configs
ENABLE_TRACES=false
TRACE_SERVICE_TYPE=AMQP
TRACE_HOST=localhost
TRACE_KEY=key
TRACE_EXPORT_TIMEOUT=60
TRACE_EXPORT_RATE_BASE=0.7

ENABLE_METRICS=true
METRIC_SERVICE_TYPE=AMQP
METRIC_EXPORTER=prometheus
METRIC_HOST=localhost
METRIC_KEY=key
METRIC_EXPORT_TIMEOUT=60
METRIC_EXPORT_RATE_BASE=0.7
27 changes: 27 additions & 0 deletions examples/rmq-consumer-prom/.env.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
RUST_ENV=prod
LOG_LEVEL=debug

ENABLE_HEALTH_READINESS=true
HEALTH_READINESS_PORT=8888

SECRET_MANAGER=NONE

RABBITMQ_HOST=rmq
RABBITMQ_PORT=5672
RABBITMQ_USER=guest
RABBITMQ_PASSWORD=guest

#OTLP Configs
ENABLE_TRACES=false
TRACE_SERVICE_TYPE=AMQP
TRACE_HOST=localhost
TRACE_KEY=key
TRACE_EXPORT_TIMEOUT=60
TRACE_EXPORT_RATE_BASE=0.7

ENABLE_METRICS=true
METRIC_SERVICE_TYPE=AMQP
METRIC_HOST=localhost
METRIC_KEY=key
METRIC_EXPORT_TIMEOUT=60
METRIC_EXPORT_RATE_BASE=0.7
27 changes: 27 additions & 0 deletions examples/rmq-consumer-prom/.env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
RUST_ENV=staging
LOG_LEVEL=debug

ENABLE_HEALTH_READINESS=true
HEALTH_READINESS_PORT=8888

SECRET_MANAGER=NONE

RABBITMQ_HOST=rmq
RABBITMQ_PORT=5672
RABBITMQ_USER=guest
RABBITMQ_PASSWORD=guest

#OTLP Configs
ENABLE_TRACES=false
TRACE_SERVICE_TYPE=AMQP
TRACE_HOST=localhost
TRACE_KEY=key
TRACE_EXPORT_TIMEOUT=60
TRACE_EXPORT_RATE_BASE=0.7

ENABLE_METRICS=true
METRIC_SERVICE_TYPE=AMQP
METRIC_HOST=localhost
METRIC_KEY=key
METRIC_EXPORT_TIMEOUT=60
METRIC_EXPORT_RATE_BASE=0.7
Loading
Loading