-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.rr.yaml.example
More file actions
83 lines (64 loc) · 2.54 KB
/
.rr.yaml.example
File metadata and controls
83 lines (64 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Enhanced HTTP Metrics Configuration Example
# HTTP server configuration
http:
address: 127.0.0.1:8080
max_request_size: 256
pool:
num_workers: 10
max_jobs: 100
# Enhanced HTTP metrics configuration
http_metrics:
# Enable enhanced metrics collection (default: true)
enabled: true
# Endpoint pattern matching - groups similar URLs to prevent cardinality explosion
endpoint_patterns:
# Enable endpoint grouping (default: true)
enabled: true
# Maximum number of unique endpoint patterns (default: 100)
# Protects against cardinality explosion
max_patterns: 100
# LRU cache size for pattern matching results (default: 10000)
# Improves performance by caching regex matching results
cache_size: 10000
# Pattern matching rules
# Each rule maps URL patterns to a common label
rules:
# API resources with IDs
- pattern: "^/api/users/[0-9]+$"
name: "/api/users/:id"
- pattern: "^/api/users/[0-9]+/posts/[0-9]+$"
name: "/api/users/:id/posts/:id"
- pattern: "^/api/orders/[0-9]+$"
name: "/api/orders/:id"
- pattern: "^/api/products/[0-9]+$"
name: "/api/products/:id"
# API with UUIDs
- pattern: "^/api/sessions/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
name: "/api/sessions/:uuid"
# Static assets
- pattern: "^/static/.*\\.(css|js|png|jpg|gif|svg)$"
name: "/static/:file"
# Admin panel
- pattern: "^/admin/.*"
name: "/admin/:path"
# Request/Response body size tracking (default: true)
# Helps identify bandwidth bottlenecks and payload optimization opportunities
collect_sizes: true
# Queue time vs processing time breakdown (default: true)
# Critical for identifying worker pool saturation vs slow application logic
collect_queue_time: true
# Worker pool health metrics (default: false)
# Note: Currently requires HTTP plugin integration - coming soon
collect_worker_info: false
# Histogram buckets for duration metrics (in seconds)
# Customize based on your application's typical response times
duration_buckets: [0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1.0, 5.0, 10.0]
# Histogram buckets for size metrics (in bytes)
# Customize based on your application's typical payload sizes
size_buckets: [1024, 10240, 102400, 1048576, 10485760] # 1KB, 10KB, 100KB, 1MB, 10MB
# Metrics server configuration
server:
command: "php worker.php"
# Prometheus metrics endpoint
metrics:
address: 127.0.0.1:2112