Skip to content

Commit 72bb83d

Browse files
committed
perf: Speed-up how the telemetry is collected
1 parent 109c0a3 commit 72bb83d

20 files changed

Lines changed: 454 additions & 345 deletions

File tree

.github/workflows/build.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
runs-on: ubuntu-latest
3131
needs: [version]
3232
env:
33+
OTEL_ENDPOINT: ${{ secrets.OTEL_ENDPOINT }}
3334
VITE_MUI_LICENSE: ${{ secrets.VITE_MUI_LICENSE }}
3435
steps:
3536
- name: Code checkout
@@ -57,7 +58,9 @@ jobs:
5758
5859
- name: Build Linux binaries
5960
run: |
60-
node scripts/replace.mjs internal/shared/telemetry.go "<version>=>${{ needs.version.outputs.VERSION }}"
61+
node scripts/replace.mjs internal/shared/constants.go "<version>=>${{ needs.version.outputs.VERSION }}"
62+
node scripts/replace.mjs internal/shared/constants.go "<otel>=>$OTEL_ENDPOINT"
63+
node scripts/replace.mjs internal/shared/constants.go "EnvDevelopment=>EnvProduction"
6164
task package oses=linux archs=amd64
6265
6366
- name: Save artifacts
@@ -70,6 +73,7 @@ jobs:
7073
runs-on: ubuntu-24.04-arm
7174
needs: [version]
7275
env:
76+
OTEL_ENDPOINT: ${{ secrets.OTEL_ENDPOINT }}
7377
VITE_MUI_LICENSE: ${{ secrets.VITE_MUI_LICENSE }}
7478
steps:
7579
- name: Code checkout
@@ -97,7 +101,9 @@ jobs:
97101
98102
- name: Build Linux binaries
99103
run: |
100-
node scripts/replace.mjs internal/shared/telemetry.go "<version>=>${{ needs.version.outputs.VERSION }}"
104+
node scripts/replace.mjs internal/shared/constants.go "<version>=>${{ needs.version.outputs.VERSION }}"
105+
node scripts/replace.mjs internal/shared/constants.go "<otel>=>$OTEL_ENDPOINT"
106+
node scripts/replace.mjs internal/shared/constants.go "EnvDevelopment=>EnvProduction"
101107
task package oses=linux archs=arm64
102108
103109
- name: Save artifacts
@@ -110,6 +116,7 @@ jobs:
110116
runs-on: macos-latest
111117
needs: [version]
112118
env:
119+
OTEL_ENDPOINT: ${{ secrets.OTEL_ENDPOINT }}
113120
VITE_MUI_LICENSE: ${{ secrets.VITE_MUI_LICENSE }}
114121
steps:
115122
- name: Code checkout
@@ -132,7 +139,9 @@ jobs:
132139
133140
- name: Build MacOS binaries
134141
run: |
135-
node scripts/replace.mjs internal/shared/telemetry.go "<version>=>${{ needs.version.outputs.VERSION }}"
142+
node scripts/replace.mjs internal/shared/constants.go "<version>=>${{ needs.version.outputs.VERSION }}"
143+
node scripts/replace.mjs internal/shared/constants.go "<otel>=>$OTEL_ENDPOINT"
144+
node scripts/replace.mjs internal/shared/constants.go "EnvDevelopment=>EnvProduction"
136145
task package oses=darwin archs='amd64 arm64'
137146
138147
- name: Save artifacts
@@ -145,6 +154,7 @@ jobs:
145154
runs-on: windows-latest
146155
needs: [version]
147156
env:
157+
OTEL_ENDPOINT: ${{ secrets.OTEL_ENDPOINT }}
148158
VITE_MUI_LICENSE: ${{ secrets.VITE_MUI_LICENSE }}
149159
steps:
150160
- name: Code checkout
@@ -170,7 +180,9 @@ jobs:
170180
171181
- name: Build Windows binaries
172182
run: |
173-
node scripts/replace.mjs internal/shared/telemetry.go "<version>=>${{ needs.version.outputs.VERSION }}"
183+
node scripts/replace.mjs internal/shared/constants.go "<version>=>${{ needs.version.outputs.VERSION }}"
184+
node scripts/replace.mjs internal/shared/constants.go "<otel>=>$OTEL_ENDPOINT"
185+
node scripts/replace.mjs internal/shared/constants.go "EnvDevelopment=>EnvProduction"
174186
task package oses=windows archs=amd64
175187
176188
- name: Save artifacts
@@ -183,6 +195,7 @@ jobs:
183195
runs-on: windows-11-arm
184196
needs: [version]
185197
env:
198+
OTEL_ENDPOINT: ${{ secrets.OTEL_ENDPOINT }}
186199
VITE_MUI_LICENSE: ${{ secrets.VITE_MUI_LICENSE }}
187200
steps:
188201
- name: Code checkout
@@ -222,7 +235,9 @@ jobs:
222235
CC: aarch64-w64-mingw32-gcc
223236
CXX: aarch64-w64-mingw32-g++
224237
run: |
225-
node scripts/replace.mjs internal/shared/telemetry.go "<version>=>${{ needs.version.outputs.VERSION }}"
238+
node scripts/replace.mjs internal/shared/constants.go "<version>=>${{ needs.version.outputs.VERSION }}"
239+
node scripts/replace.mjs internal/shared/constants.go "<otel>=>$OTEL_ENDPOINT"
240+
node scripts/replace.mjs internal/shared/constants.go "EnvDevelopment=>EnvProduction"
226241
task package oses=windows archs=arm64
227242
228243
- name: Save artifacts

.junie/guidelines.md

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

cmd/cli/go.mod

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ require (
66
github.com/charmbracelet/bubbles v0.21.0
77
github.com/charmbracelet/bubbletea v1.3.10
88
github.com/charmbracelet/lipgloss v1.1.0
9-
github.com/google/uuid v1.6.0
109
github.com/samber/lo v1.52.0
1110
github.com/sirupsen/logrus v1.9.3
1211
github.com/urfave/cli/v2 v2.27.7
13-
github.com/vegidio/go-sak v0.0.0-20251125122114-8b01823c4a11
12+
github.com/vegidio/go-sak v0.0.0-20251227164806-4e3fbf448e91
1413
github.com/vegidio/umd v0.0.0-20250918022752-c66c1259c887
1514
)
1615

@@ -22,24 +21,30 @@ require (
2221
github.com/andybalholm/cascadia v1.3.3 // indirect
2322
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
2423
github.com/browserutils/kooky v0.2.4 // indirect
24+
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
25+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
2526
github.com/charmbracelet/colorprofile v0.3.2 // indirect
2627
github.com/charmbracelet/harmonica v0.2.0 // indirect
2728
github.com/charmbracelet/x/ansi v0.10.1 // indirect
2829
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
2930
github.com/charmbracelet/x/term v0.2.1 // indirect
3031
github.com/cpuguy83/go-md2man/v2 v2.0.7 // indirect
3132
github.com/davecgh/go-spew v1.1.1 // indirect
33+
github.com/denisbrodbeck/machineid v1.0.1 // indirect
3234
github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect
3335
github.com/go-ini/ini v1.67.0 // indirect
36+
github.com/go-logr/logr v1.4.3 // indirect
37+
github.com/go-logr/stdr v1.2.2 // indirect
3438
github.com/go-resty/resty/v2 v2.16.5 // indirect
3539
github.com/go-sqlite/sqlite3 v0.0.0-20180313105335-53dd8e640ee7 // indirect
3640
github.com/godbus/dbus/v5 v5.1.0 // indirect
3741
github.com/gonuts/binary v0.2.0 // indirect
3842
github.com/google/go-github/v74 v74.0.0 // indirect
3943
github.com/google/go-querystring v1.1.0 // indirect
44+
github.com/google/uuid v1.6.0 // indirect
45+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.3 // indirect
4046
github.com/keybase/go-keychain v0.0.1 // indirect
4147
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
42-
github.com/kr/pretty v0.3.1 // indirect
4348
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
4449
github.com/mattn/go-isatty v0.0.20 // indirect
4550
github.com/mattn/go-localereader v0.0.1 // indirect
@@ -48,19 +53,30 @@ require (
4853
github.com/muesli/cancelreader v0.2.2 // indirect
4954
github.com/muesli/termenv v0.16.0 // indirect
5055
github.com/rivo/uniseg v0.4.7 // indirect
51-
github.com/rogpeppe/go-internal v1.13.1 // indirect
5256
github.com/russross/blackfriday/v2 v2.1.0 // indirect
5357
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
5458
github.com/xrash/smetrics v0.0.0-20250705151800-55b8f293f342 // indirect
5559
github.com/zalando/go-keyring v0.2.6 // indirect
5660
github.com/zeebo/assert v1.3.0 // indirect
5761
github.com/zeebo/blake3 v0.2.4 // indirect
58-
golang.org/x/crypto v0.44.0 // indirect
59-
golang.org/x/mod v0.29.0 // indirect
60-
golang.org/x/net v0.47.0 // indirect
61-
golang.org/x/sys v0.38.0 // indirect
62-
golang.org/x/text v0.31.0 // indirect
62+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
63+
go.opentelemetry.io/otel v1.39.0 // indirect
64+
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp v0.15.0 // indirect
65+
go.opentelemetry.io/otel/log v0.15.0 // indirect
66+
go.opentelemetry.io/otel/metric v1.39.0 // indirect
67+
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
68+
go.opentelemetry.io/otel/sdk/log v0.15.0 // indirect
69+
go.opentelemetry.io/otel/trace v1.39.0 // indirect
70+
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
71+
golang.org/x/crypto v0.46.0 // indirect
72+
golang.org/x/mod v0.30.0 // indirect
73+
golang.org/x/net v0.48.0 // indirect
74+
golang.org/x/sys v0.39.0 // indirect
75+
golang.org/x/text v0.32.0 // indirect
6376
golang.org/x/time v0.11.0 // indirect
64-
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
77+
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
78+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
79+
google.golang.org/grpc v1.77.0 // indirect
80+
google.golang.org/protobuf v1.36.10 // indirect
6581
www.velocidex.com/golang/go-ese v0.2.0 // indirect
6682
)

0 commit comments

Comments
 (0)