Skip to content

Commit

Permalink
more metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
j-white committed May 7, 2024
1 parent 62e38c9 commit b741a20
Show file tree
Hide file tree
Showing 11 changed files with 590 additions and 1,400 deletions.
194 changes: 175 additions & 19 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ getrandom = { version = "0.2.14", features = ["js"] }
serde_json = "1.0.116"
opentelemetry-http = { version="0.11.1" }
opentelemetry-otlp = { version="0.15.0", features = ["metrics", "http-proto"], default-features = false }
http = { version = "0.2.12"}
tokio = { version = "1.37.0"}
prometheus = "0.13.4"
iso8601 = "0.6.1"
web-time = "1.1.0"
chrono = "0.4.38"

[profile.release]
opt-level = "s" # optimize for size in release builds
Expand Down
5 changes: 4 additions & 1 deletion features/o11y.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ Feature: OpenTelemetry metrics
Given Worker is configured to send metrics to a mock OpenTelemetry collector
When Worker is triggered
Then Worker metrics are published
And Meter name should include "cloudflare_worker_requests"
And Metric name should include "cloudflare_worker_requests"
And Metric name should include "cloudflare_worker_errors"
And Metric name should include "cloudflare_worker_cpu_time"
And Metric name should include "cloudflare_worker_duration"
1 change: 1 addition & 0 deletions features/step_definitions/mf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export class MiniflareDriver {
METRICS_URL: self.config.metricsUrl,
CLOUDFLARE_API_URL: self.config.cloudflareApiUrl,
CLOUDFLARE_API_KEY: "fake-key",
CLOUDFLARE_ACCOUNT_ID: "1234",
},
modulesRules: [
{ type: "CompiledWasm", include: ["**/*.wasm"], fallthrough: true },
Expand Down
Loading

0 comments on commit b741a20

Please sign in to comment.