more otel
This commit is contained in:
1 parent
9620e3bfa6
commit
21f04d696b
88 files changed
+23419
-192
No files matched your search
Executable
+18
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
: "${OTEL_URL:?set OTEL_URL, for example https://otel.example.com}"
|
||||
: "${RELEASE:?set RELEASE to the exact VITE_APP_RELEASE used at build time}"
|
||||
|
||||
bundle="${1:?usage: RELEASE=... OTEL_URL=... $0 dist/assets/index-HASH.js}"
|
||||
map="${bundle}.map"
|
||||
test -f "$bundle" || { echo "bundle not found: $bundle" >&2; exit 1; }
|
||||
test -f "$map" || { echo "source map not found: $map" >&2; exit 1; }
|
||||
|
||||
source_path="/${bundle#*/dist/}"
|
||||
curl --fail-with-body --silent --show-error \
|
||||
-X POST "${OTEL_URL%/}/api/sourcemaps" \
|
||||
-F "release=${RELEASE}" \
|
||||
-F "source=${source_path}" \
|
||||
-F "file=@${map};type=application/json"
|
||||
echo "uploaded ${source_path} for ${RELEASE}"
|
||||
Reference in new issue
Block a user