Commit 36646d4
authored
feat: unified telemetry system (tracing, metrics, logging, profiling) (#26)
* deps: add OpenTelemetry, Pyroscope, and otelzap dependencies
* feat(telemetry): add TelemetryConfig with dev/prod defaults
* feat(settings): add telemetry settings category
* feat(telemetry): add shared OTel Resource with instance identity
* feat(telemetry): add OTLP exporter factory and no-op exporter
* feat(telemetry): add OTel provider factories (trace, metric, log)
* feat(telemetry): add MapCarrier propagation helpers for Wails bindings
* feat(telemetry): add ZapBackend bridging plugin-sdk Logger to Zap
* feat(telemetry): add Pyroscope profiling with plugin/controller labels
* feat(telemetry): add telemetry Service with init/shutdown lifecycle
* deps: add Grafana Faro and OpenTelemetry JS packages
* feat(telemetry): add TelemetryContext type and factory
* feat(telemetry): add unified frontend Logger with context enrichment
* feat(telemetry): add WailsTransport for Faro signal shipping
* feat(telemetry): add Wails binding instrumentation wrapper with trace propagation
* feat(telemetry): add useLogger and useTelemetryContext React hooks
* feat(telemetry): add console patching and public API module
* feat(telemetry): add Faro SDK initialization with WailsTransport
* feat(telemetry): add frontend OTel TracerProvider setup
* fix(telemetry): use resourceFromAttributes and setGlobalTracerProvider for OTel JS compatibility
* feat: wire telemetry service into app startup and replace CreateLogger
* feat: wire frontend telemetry init into app entry point
* feat(telemetry): add frontend signal ingestion and Wails binding
* feat(telemetry): register omniview application metrics
* test(telemetry): add end-to-end trace and log correlation integration tests
* fix: resolve undefined component in HomepageCard extension point rendering
The kubernetes plugin registers homepage cards with a `component` property,
but the normalization layer only reads `value`. Add fallback to accept both
property names, and fix HomepageCard to use the correct type and property.
* chore: add telemetry dependencies and generated Wails bindings
Adds go.mod deps for pyroscope, otelzap, otel-runtime, and otel/metric.
Includes regenerated Wails models and TelemetryBinding JS/TS stubs.
* fix: address PR review findings (batch 1)
- Use host.arch instead of os.arch for OTel semantic convention
- Add missing ResourceWatchActive assertion in metrics test
- Use os.UserHomeDir() instead of os.Getenv("HOME") for portability
- Don't panic on telemetry init failure, fall back to production logger
- Reset tracing provider to null on shutdown for clean re-init
- Return noop sink instead of throwing when telemetry not initialized
- Don't blindly prepend http:// to Pyroscope endpoint
- Revert unrelated .gitignore change
* fix: address PR review findings (batch 2)
- Derive telemetry settings defaults from DefaultConfig to prevent drift
- Use Options dropdown for LogsShipLevel with validation
- Mark auth_value as Sensitive with Password type
- Add hot-togglable log ship level via AtomicLevel + levelFilterCore
- Suppress spurious zap Sync errors on non-seekable fds
- Add float32/float64/uint/uint64 field conversions in ZapBackend
- Harden tests: exact profile types, global state save/restore,
os.type + host.arch assertions, IsSampled check
- Fix logger merge order so user fields override built-ins
- Run instrumented fn inside span context via context.with
- Add recordException assertion in instrumentation tests
- Make patchConsole idempotent with robust arg serialization
- Surface transport/sink errors in dev mode
- Fix HomepageCard generic typing to eliminate double cast
* fix: address PR review findings (batch 3)
- Make ValidLogLevels unexported; add GetValidLogLevels() safe accessor
- Add require.NotNil(t, m) guard in metrics_test before field access
- Use semconv.OSTypeKey / HostArchKey instead of ad-hoc attribute.String
- Swap global OTel providers to noop before shutting down SDK providers
- Add span lifecycle assertions (setStatus OK, end) in happy-path test
- Export WailsBinding type for external consumers
- Preserve Error stack traces in patchConsole serializeArg
- Use unpatched console ref in WailsTransport to prevent recursion
* fix: address PR review findings (batch 4)
- Consolidate validLogLevels to single canonical slice + derived map
- Make context.with a spyable mock and assert it's called in tests
- Make patchConsole fail-open: sink errors swallowed via try/catch
- Defer patched=true until after all wrappers assigned successfully1 parent 805758b commit 36646d4
52 files changed
Lines changed: 2649 additions & 69 deletions
File tree
- internal
- settings
- telemetry
- packages/omniviewdev-runtime/src/wailsjs/go
- telemetry
- ui
- features
- extensions/homepage
- plugins/core
- telemetry
- pages/home
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
28 | 41 | | |
29 | 42 | | |
30 | 43 | | |
| 44 | + | |
| 45 | + | |
31 | 46 | | |
32 | 47 | | |
33 | 48 | | |
34 | 49 | | |
35 | 50 | | |
36 | | - | |
| 51 | + | |
| 52 | + | |
37 | 53 | | |
38 | 54 | | |
39 | 55 | | |
| |||
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
| 63 | + | |
47 | 64 | | |
| 65 | + | |
48 | 66 | | |
49 | 67 | | |
50 | 68 | | |
51 | 69 | | |
| 70 | + | |
52 | 71 | | |
53 | 72 | | |
54 | 73 | | |
| |||
74 | 93 | | |
75 | 94 | | |
76 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
77 | 100 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
84 | 107 | | |
85 | | - | |
86 | | - | |
| 108 | + | |
| 109 | + | |
87 | 110 | | |
88 | 111 | | |
89 | 112 | | |
| |||
0 commit comments