diff --git a/build_sketchcollector.sh b/build_sketchcollector.sh index 5257c835..1fb1317b 100755 --- a/build_sketchcollector.sh +++ b/build_sketchcollector.sh @@ -82,6 +82,9 @@ SKETCHCOL_DIR="${PATCH_DIR}/cmd/sketchcollector" if ! grep -qE "^replace[[:space:]]+github\.com/ProjectASAP/sketchlib-go" "${SKETCHCOL_DIR}/go.mod" 2>/dev/null; then echo "replace github.com/ProjectASAP/sketchlib-go => ${ROOT_DIR}/../sketchlib-go" >> "${SKETCHCOL_DIR}/go.mod" fi +if ! grep -qE "^replace[[:space:]]+github\.com/ProjectASAP/asap-precompute-go" "${SKETCHCOL_DIR}/go.mod" 2>/dev/null; then + echo "replace github.com/ProjectASAP/asap-precompute-go => ${ROOT_DIR}/asap-precompute-go" >> "${SKETCHCOL_DIR}/go.mod" +fi cd "${SKETCHCOL_DIR}" GONOSUMCHECK="github.com/ProjectASAP/*" GONOSUMDB="github.com/ProjectASAP/*" go build -o sketchcollector . 2>&1 diff --git a/opentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml b/opentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml index 6039268c..41998b94 100644 --- a/opentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml +++ b/opentelemetry-collector-contrib-patch/cmd/sketchcollector/builder-config.yaml @@ -322,3 +322,12 @@ replaces: # published commit and ApplyDelta / SerializeMsgpack / # NewFromState constructors would not resolve. - github.com/ProjectASAP/sketchlib-go => ../../../../sketchlib-go + # asap-precompute-go is a private module living as a sibling + # subdirectory of this repo (ASAPCollector/asap-precompute-go). + # Same redirect intent as sketchlib-go but a different path: the + # OCB-generated cmd/sketchcollector/go.mod lives 3 dirs deep under + # the ASAPCollector repo root (`./opentelemetry-collector-contrib-patch/cmd/sketchcollector`), + # so ../../../asap-precompute-go resolves to the in-repo subdirectory. + # (sketchlib-go uses one extra `..` because it lives as a sibling + # repo of ASAPCollector, one level up from this repo root.) + - github.com/ProjectASAP/asap-precompute-go => ../../../asap-precompute-go