Added cartservice instrumentation

This commit is contained in:
Owais Lone 2020-09-11 03:32:35 +05:30
parent b25f2a2b33
commit 047b3d1010
No known key found for this signature in database
GPG key ID: 25D09F9BACE35052
3 changed files with 19 additions and 1 deletions

View file

@ -40,6 +40,12 @@ spec:
value: "7070"
- name: LISTEN_ADDR
value: "0.0.0.0"
- name: SIGNALFX_ENDPOINT_URL
value: "$(NODE_IP):9411/api/v2/span"
- name: SIGNALFX_SERVICE_NAME
value: "cartservice"
- name: SIGNALFX_SERVER_TIMING_CONTEXT
value: "true"
resources:
requests:
cpu: 200m

View file

@ -1,4 +1,9 @@
FROM microsoft/dotnet:2.1-sdk-alpine as builder
RUN apk --update add curl tar
RUN curl -L https://github.com/signalfx/signalfx-dotnet-tracing/releases/download/v0.1.2/signalfx-dotnet-tracing-0.1.2-musl.tar.gz -o signalfx-dotnet-tracing-musl.tar.gz
RUN tar -xf signalfx-dotnet-tracing-musl.tar.gz -C /
WORKDIR /app
COPY . .
RUN dotnet restore && \
@ -23,6 +28,9 @@ RUN apk add --no-cache \
libstdc++ \
libintl \
icu
WORKDIR /app
COPY --from=builder /cartservice .
ENTRYPOINT ["./cartservice", "start"]
COPY --from=builder /app/start .
COPY --from=builder /opt/signalfx-dotnet-tracing/* /opt/signalfx-dotnet-tracing/
ENTRYPOINT ["./start"]

4
src/cartservice/start Executable file
View file

@ -0,0 +1,4 @@
#! /bin/sh
source /opt/signalfx-dotnet-tracing/defaults.env
./cartservice start