Skip to content

Commit 89db104

Browse files
Merge pull request #10 from rohas-dev/feat/workbench-enhancement
feat(workbench): enhance telemetry and tracing features
2 parents 2da0c44 + 3e37a0e commit 89db104

48 files changed

Lines changed: 3346 additions & 398 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# C++ runtime (libcmt) to force use of the dynamic runtime (msvcrt).
2+
[target.x86_64-pc-windows-msvc]
3+
rustflags = [
4+
"-C", "link-arg=/NODEFAULTLIB:libcmt",
5+
"-C", "link-arg=/FORCE:MULTIPLE",
6+
]

examples/hello-world/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ coverage/
4949

5050
# Rohas compiled output
5151
.rohas/
52+
src/generated/

examples/hello-world/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Rohas project initialized with python handlers.
1111

1212
2. Start development server:
1313
```bash
14-
rohas dev
14+
rohas dev --workbench
1515
```
1616

1717
3. Validate schema:

examples/hello-world/config/rohas.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ enable_cors = true
1212
type = "memory"
1313
buffer_size = 1000
1414

15+
[telemetry]
16+
# Telemetry adapter type: rocksdb (default), prometheus, influxdb, timescaledb
17+
type = "rocksdb"
18+
# Path to telemetry storage (relative to project root or absolute)
19+
path = ".rohas/telemetry"
20+
# Retention period for traces in days (0 = keep forever)
21+
retention_days = 30
22+
# Maximum number of traces to keep in memory cache
23+
max_cache_size = 1000
24+
# Enable metrics collection
25+
enable_metrics = true
26+
# Enable logs collection
27+
enable_logs = true
28+
# Enable traces collection
29+
enable_traces = true
30+
1531
[workbench]
1632
allowed_origins = []
1733
api_key = "FRmz/+AjTYCUFlBMio479A=="
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
input TimelineTestFastInput {
2+
test: String
3+
}
4+
5+
api TimelineTestFast {
6+
method: GET
7+
path: "/timeline/fast"
8+
response: String
9+
triggers: [FastCompleted]
10+
}
11+
12+
input TimelineTestSlowInput {
13+
test: String
14+
}
15+
16+
api TimelineTestSlow {
17+
method: GET
18+
path: "/timeline/slow"
19+
response: String
20+
triggers: [SlowCompleted, BottleneckDetected]
21+
}
22+
23+
input TimelineTestVerySlowInput {
24+
test: String
25+
}
26+
27+
api TimelineTestVerySlow {
28+
method: GET
29+
path: "/timeline/very-slow"
30+
response: String
31+
triggers: [VerySlowCompleted, MajorBottleneckDetected]
32+
}
33+
34+
input TimelineTestMultiStepInput {
35+
test: String
36+
}
37+
38+
api TimelineTestMultiStep {
39+
method: GET
40+
path: "/timeline/multi-step"
41+
response: String
42+
triggers: [ValidationComplete, ProcessingComplete, ExternalCallComplete, FinalizationComplete]
43+
}
44+
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
cron DailyCleanup {
2-
schedule: "*/2 * * * * *"
2+
schedule: "0 */5 * * * *"
3+
triggers: [CleanupStep1, CleanupStep2]
34
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
event FastCompleted {
2+
payload: Json
3+
handler: [fast_completed]
4+
}
5+
6+
event SlowCompleted {
7+
payload: Json
8+
handler: [slow_completed]
9+
}
10+
11+
event VerySlowCompleted {
12+
payload: Json
13+
handler: [slow_completed]
14+
}
15+
16+
event BottleneckDetected {
17+
payload: Json
18+
handler: [bottleneck_detected]
19+
}
20+
21+
event MajorBottleneckDetected {
22+
payload: Json
23+
handler: [bottleneck_detected]
24+
}
25+
26+
event ValidationComplete {
27+
payload: Json
28+
}
29+
30+
event ProcessingComplete {
31+
payload: Json
32+
}
33+
34+
event ExternalCallComplete {
35+
payload: Json
36+
}
37+
38+
event FinalizationComplete {
39+
payload: Json
40+
}
41+
42+
event CleanupStep1 {
43+
payload: Json
44+
}
45+
46+
event CleanupStep2 {
47+
payload: Json
48+
}
49+
50+
event BottleneckLogged {
51+
payload: Json
52+
}
53+
54+
event WelcomeEmailSent {
55+
payload: Json
56+
}
57+

examples/hello-world/src/generated/__init__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/hello-world/src/generated/api/__init__.py

Whitespace-only changes.

examples/hello-world/src/generated/api/create_user.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)