Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/publish-extend-otel-layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ jobs:
OPENTELEMETRY_JS_CONTRIB_PATH: ${{ github.workspace }}/opentelemetry-js-contrib
steps:
- uses: actions/checkout@v4
# Pinned SHA — bump when upstream cx-contrib lands a fix/feature we want.
# Keep in sync with CX_CONTRIB_SHA in ci-scripts/publish-sandbox.sh.
- uses: actions/checkout@v4
with: { repository: coralogix/opentelemetry-js-contrib, ref: coralogix-autoinstrumentation, path: opentelemetry-js-contrib }
with: { repository: coralogix/opentelemetry-js-contrib, ref: 3a9691a699ddd06c3644eec70bf4b50cc4217ba3, path: opentelemetry-js-contrib }
- uses: actions/setup-node@v4
with:
node-version: 22
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ collector/VERSION
opentelemetry-js/
opentelemetry-js-contrib-cx/
import-in-the-middle/
.build-cache/
build-sandbox/

.envrc
mise.toml
21 changes: 20 additions & 1 deletion ci-scripts/publish-sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,40 @@
# Publishes extend-nodejs-wrapper-and-exporter-{arch} to engservicessandbox us-east-1 as a PRIVATE layer.
# Prereqs:
# - AWS_PROFILE set to engservicessandbox (or SSO-logged-in) w/ lambda:PublishLayerVersion
# - coralogix/opentelemetry-js-contrib cloned as sibling at ../opentelemetry-js-contrib (coralogix-autoinstrumentation branch)
# - Run from repo root
#
# The coralogix/opentelemetry-js-contrib fork is auto-cloned to .build-cache/ on first run.
# To override the clone path (e.g. for local dev against a different checkout), set
# OPENTELEMETRY_JS_CONTRIB_PATH before invoking this script.

set -euo pipefail

ARCH="${1:-arm64}"
REGION="us-east-1"
LAYER_NAME="extend-nodejs-wrapper-and-exporter-sandbox-${ARCH}"

# Pinned to a specific commit on coralogix-autoinstrumentation for reproducible builds.
# Bump when upstream cx-contrib lands a fix/feature we want.
CX_CONTRIB_REPO="https://github.com/coralogix/opentelemetry-js-contrib.git"
CX_CONTRIB_SHA="3a9691a699ddd06c3644eec70bf4b50cc4217ba3"
CX_CONTRIB_CACHE="${OPENTELEMETRY_JS_CONTRIB_PATH:-.build-cache/opentelemetry-js-contrib}"

case "$ARCH" in
amd64) AWS_ARCH="x86_64" ;;
arm64) AWS_ARCH="arm64" ;;
*) echo "unsupported arch: $ARCH"; exit 1 ;;
esac

echo "==> resolving cx-contrib fork at $CX_CONTRIB_SHA"
if [ ! -d "$CX_CONTRIB_CACHE/.git" ]; then
mkdir -p "$(dirname "$CX_CONTRIB_CACHE")"
git clone --filter=blob:none "$CX_CONTRIB_REPO" "$CX_CONTRIB_CACHE"
fi
git -C "$CX_CONTRIB_CACHE" fetch --quiet origin "$CX_CONTRIB_SHA" 2>/dev/null || git -C "$CX_CONTRIB_CACHE" fetch --quiet origin
git -C "$CX_CONTRIB_CACHE" checkout --quiet "$CX_CONTRIB_SHA"
export OPENTELEMETRY_JS_CONTRIB_PATH
OPENTELEMETRY_JS_CONTRIB_PATH="$(cd "$CX_CONTRIB_CACHE" && pwd)"

echo "==> building collector ($ARCH)"
make -C collector package-extend GOARCH="$ARCH"

Expand Down
Loading