Skip to content

Commit

Permalink
[cherrypick][branch-3.1-cs][Feature][Issue 39849]add datadog java/cpp…
Browse files Browse the repository at this point in the history
… profiling lib (#40652) (#40845)

Signed-off-by: Mingmin Xu <[email protected]>
  • Loading branch information
mingmxu authored Feb 6, 2024
1 parent b90f0e2 commit 9ed79f1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docker/dockerfiles/artifacts/artifact.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,19 @@ COPY . /build/starrocks
WORKDIR /build/starrocks
RUN --mount=type=cache,target=/root/.m2/ STARROCKS_VERSION=${RELEASE_VERSION} BUILD_TYPE=${BUILD_TYPE} MAVEN_OPTS=${MAVEN_OPTS} ./build.sh --be --use-staros --clean -j `nproc`

FROM ubuntu:22.04 as datadog-downloader

RUN apt-get update -y && apt-get install -y --no-install-recommends wget tar xz-utils

# download the latest dd-java-agent
ADD 'https://dtdg.co/latest-java-tracer' /datadog/dd-java-agent.jar

# Get ddprof for BE profiling
RUN imagearch=$(arch | sed 's/aarch64/arm64/; s/x86_64/amd64/') \
&& wget --no-check-certificate "https://github.com/DataDog/ddprof/releases/download/v0.15.3/ddprof-0.15.3-${imagearch}-linux.tar.xz" -O ddprof-linux.tar.xz \
&& tar xvf ddprof-linux.tar.xz && mkdir -p /datadog/ \
&& mv ddprof/bin/ddprof /datadog/ \
&& chmod 755 /datadog/ddprof

FROM busybox:latest
ARG RELEASE_VERSION
Expand All @@ -51,4 +64,7 @@ COPY --from=fe-builder /build/starrocks/output /release/fe_artifacts
COPY --from=be-builder /build/starrocks/output /release/be_artifacts
COPY --from=broker-builder /build/starrocks/fs_brokers/apache_hdfs_broker/output /release/broker_artifacts

COPY --from=datadog-downloader /datadog/dd-java-agent.jar /release/fe_artifacts/fe/datadog/dd-java-agent.jar
COPY --from=datadog-downloader /datadog/ddprof /release/be_artifacts/be/datadog/ddprof

WORKDIR /release

0 comments on commit 9ed79f1

Please sign in to comment.