Skip to content

Commit 0f883d9

Browse files
committed
Add tracing-web-console with embedded React dashboard
1 parent 6e31444 commit 0f883d9

82 files changed

Lines changed: 5388 additions & 1617 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
check:
14+
name: Check
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '20'
24+
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@v4
27+
with:
28+
version: 9
29+
30+
- name: Install frontend dependencies
31+
working-directory: tracing-web-console/frontend
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Build frontend
35+
working-directory: tracing-web-console/frontend
36+
run: pnpm build
37+
38+
- name: Setup Rust
39+
uses: dtolnay/rust-toolchain@1.91
40+
with:
41+
components: rustfmt, clippy
42+
43+
- name: Cache cargo registry
44+
uses: actions/cache@v4
45+
with:
46+
path: |
47+
~/.cargo/registry
48+
~/.cargo/git
49+
target
50+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
51+
52+
- name: Check formatting
53+
run: cargo fmt --all -- --check
54+
55+
- name: Clippy
56+
run: cargo clippy --all-targets --all-features -- -D warnings
57+
58+
- name: Build
59+
run: cargo build --all-targets
60+
61+
- name: Run tests
62+
run: cargo test --all-targets
63+
64+
frontend-lint:
65+
name: Frontend Lint
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Checkout repository
69+
uses: actions/checkout@v4
70+
71+
- name: Setup Node.js
72+
uses: actions/setup-node@v4
73+
with:
74+
node-version: '20'
75+
76+
- name: Install pnpm
77+
uses: pnpm/action-setup@v4
78+
with:
79+
version: 9
80+
81+
- name: Install dependencies
82+
working-directory: tracing-web-console/frontend
83+
run: pnpm install --frozen-lockfile
84+
85+
- name: Type check
86+
working-directory: tracing-web-console/frontend
87+
run: pnpm tsc --noEmit
88+
89+
- name: Lint
90+
working-directory: tracing-web-console/frontend
91+
run: pnpm lint

.github/workflows/publish.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Publish to crates.io
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
dry_run:
10+
description: 'Dry run (do not actually publish)'
11+
required: false
12+
default: 'true'
13+
type: boolean
14+
15+
env:
16+
CARGO_TERM_COLOR: always
17+
18+
jobs:
19+
publish:
20+
name: Publish
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
31+
- name: Install pnpm
32+
uses: pnpm/action-setup@v4
33+
with:
34+
version: 9
35+
36+
- name: Install frontend dependencies
37+
working-directory: tracing-web-console/frontend
38+
run: pnpm install --frozen-lockfile
39+
40+
- name: Build frontend
41+
working-directory: tracing-web-console/frontend
42+
run: pnpm build
43+
44+
- name: Setup Rust
45+
uses: dtolnay/rust-toolchain@1.91
46+
47+
- name: Cache cargo registry
48+
uses: actions/cache@v4
49+
with:
50+
path: |
51+
~/.cargo/registry
52+
~/.cargo/git
53+
target
54+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
55+
56+
- name: Verify build
57+
run: cargo build --release -p tracing-web-console
58+
59+
- name: Run tests
60+
run: cargo test --release -p tracing-web-console
61+
62+
- name: Dry run publish
63+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'true'
64+
run: cargo publish --dry-run -p tracing-web-console --allow-dirty
65+
66+
- name: Publish to crates.io
67+
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'false')
68+
env:
69+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
70+
run: cargo publish -p tracing-web-console --allow-dirty

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
"splitTerminals": [
55
{
66
"name": "frontend dev server",
7-
"commands": ["cd tracing-subscriber-axum/frontend", "pnpm dev"]
7+
"commands": ["cd tracing-web-console/frontend", "pnpm dev"]
88
}
99
]
1010
},
1111
{
1212
"splitTerminals": [
13+
{
14+
"name": "claude",
15+
"commands": ["claude"]
16+
},
1317
{
1418
"name": "example server",
1519
"commands": ["cd example-server", "cargo run"]

Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
members = [
3-
"tracing-subscriber-axum",
3+
"tracing-web-console",
44
"example-server",
55
]
66
resolver = "2"
@@ -9,8 +9,8 @@ resolver = "2"
99
version = "0.1.0"
1010
edition = "2021"
1111
authors = ["Your Name <your.email@example.com>"]
12-
license = "MIT OR Apache-2.0"
13-
repository = "https://github.com/yourusername/tracing-subscriber-axum-frontend"
12+
license = "AGPL-3.0"
13+
repository = "https://github.com/firstdorsal/tracing-web-console"
1414

1515
[workspace.dependencies]
1616
# Async runtime

0 commit comments

Comments
 (0)