Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
weblate committed Jan 30, 2025
2 parents 4d80a83 + 7b70e77 commit 9a680b1
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/detect_changes_to_app_job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
outputs:
changes_detected:
description: "Boolean value for changes detected in /cmd, /cypress, /internal, /web, /lang /lambda docker/event-received docker/mlpa or docker/mock-pay"
description: "Boolean value for changes detected in /cmd, /cypress, /internal, /web, /lang /lambda docker/event-received docker/adot-collector docker/mlpa or docker/mock-pay"
value: ${{ jobs.compare_changes.outputs.changes_detected }}

jobs:
Expand All @@ -23,12 +23,12 @@ jobs:
echo "Build status of ${{github.event.before}}: $BEFORE_STATUS"
if [[ "$BEFORE_STATUS" == "success" ]]; then
echo "Checking against ${{github.event.before}}"
(git diff --quiet ${{github.event.before}} ${{github.event.after}} -- cmd cypress internal lang web lambda docker/event-received docker/mlpa docker/mock-pay package.json yarn.lock go.mod && \
(git diff --quiet ${{github.event.before}} ${{github.event.after}} -- cmd cypress internal lang web lambda docker/event-received docker/adot-collector docker/mlpa docker/mock-pay package.json yarn.lock go.mod && \
echo "changes=${{ false }}" || \
echo "changes=${{ true }}") | tee -a "${GITHUB_OUTPUT}"
else
echo "Checking against origin/main"
(git diff --quiet HEAD origin/main -- cmd cypress internal lang web lambda docker/event-received docker/mlpa docker/mock-pay package.json yarn.lock go.mod && \
(git diff --quiet HEAD origin/main -- cmd cypress internal lang web lambda docker/event-received docker/adot-collector docker/mlpa docker/mock-pay package.json yarn.lock go.mod && \
echo "changes=${{ false }}" || \
echo "changes=${{ true }}") | tee -a "${GITHUB_OUTPUT}"
fi
Expand All @@ -44,7 +44,7 @@ jobs:
steps:
- name: Previous build on this branch will be deployed
run: |
echo '### No Changes Detected in /cmd, /cypress, /internal, /web, /lang /lambda docker/event-received docker/mlpa or docker/mock-pay since the previous build!' >> $GITHUB_STEP_SUMMARY
echo '### No Changes Detected in /cmd, /cypress, /internal, /web, /lang /lambda docker/event-received docker/adot-collector docker/mlpa or docker/mock-pay since the previous build!' >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY # this is a blank line
echo "The previous build will be deployed and the following jobs will be skipped" >> $GITHUB_STEP_SUMMARY
echo "- Create Tags" >> $GITHUB_STEP_SUMMARY
Expand Down
4 changes: 2 additions & 2 deletions docker/adot-collector/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ receivers:
endpoint: "localhost:4318"

exporters:
logging:
debug:
awsxray:

service:
Expand All @@ -17,7 +17,7 @@ service:
exporters: [awsxray]
metrics:
receivers: [otlp]
exporters: [logging]
exporters: [debug]
telemetry:
metrics:
address: localhost:8888
Binary file modified docker/adot-collector/extensions/collector
Binary file not shown.
16 changes: 1 addition & 15 deletions docker/create-s3-replication-job/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@ COPY --link internal ./internal

RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} CGO_ENABLED=0 go build -o create-s3-replication-job ./cmd/create-s3-replication-job

FROM public.ecr.aws/lambda/provided:al2023.2024.10.14.12 AS dev

WORKDIR /app

COPY --from=build /app/create-s3-replication-job /var/task/create-s3-replication-job
COPY --link lang ./lang
COPY --link ./docker/adot-collector/ /opt
COPY --link docker/aws-lambda-rie ./aws-lambda-rie

ENV AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler
ENV OPENTELEMETRY_COLLECTOR_CONFIG_FILE="/opt/config/config.yaml"

ENTRYPOINT ["./create-s3-replication-job"]

FROM public.ecr.aws/lambda/provided:al2023.2024.10.14.12 AS production

WORKDIR /app
Expand All @@ -39,6 +25,6 @@ COPY --link ./docker/adot-collector/ /opt
RUN chmod 755 /opt/config/config.yaml

ENV AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler
ENV OPENTELEMETRY_COLLECTOR_CONFIG_FILE="/opt/config/config.yaml"
ENV OPENTELEMETRY_COLLECTOR_CONFIG_URI="/opt/config/config.yaml"

ENTRYPOINT ["./create-s3-replication-job"]
4 changes: 2 additions & 2 deletions docker/event-received/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY --link ./docker/adot-collector/ /opt
COPY --link docker/aws-lambda-rie ./aws-lambda-rie

ENV AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler
ENV OPENTELEMETRY_COLLECTOR_CONFIG_FILE="/opt/config/config.yaml"
ENV OPENTELEMETRY_COLLECTOR_CONFIG_URI="/opt/config/config.yaml"

ENTRYPOINT ["./event-received"]

Expand All @@ -39,6 +39,6 @@ COPY --link ./docker/adot-collector/ /opt
RUN chmod 755 /opt/config/config.yaml

ENV AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler
ENV OPENTELEMETRY_COLLECTOR_CONFIG_FILE="/opt/config/config.yaml"
ENV OPENTELEMETRY_COLLECTOR_CONFIG_URI="/opt/config/config.yaml"

ENTRYPOINT ["./event-received"]
4 changes: 2 additions & 2 deletions docker/schedule-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ COPY --link ./docker/adot-collector/ /opt
COPY --link docker/aws-lambda-rie ./aws-lambda-rie

ENV AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler
ENV OPENTELEMETRY_COLLECTOR_CONFIG_FILE="/opt/config/config.yaml"
ENV OPENTELEMETRY_COLLECTOR_CONFIG_URI="/opt/config/config.yaml"

ENTRYPOINT ["./schedule-runner"]

Expand All @@ -39,6 +39,6 @@ COPY --link ./docker/adot-collector/ /opt
RUN chmod 755 /opt/config/config.yaml

ENV AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler
ENV OPENTELEMETRY_COLLECTOR_CONFIG_FILE="/opt/config/config.yaml"
ENV OPENTELEMETRY_COLLECTOR_CONFIG_URI="/opt/config/config.yaml"

ENTRYPOINT ["./schedule-runner"]
12 changes: 10 additions & 2 deletions docs/runbooks/adding-otel-collector-to-lambdas.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@ The following instructions fetch the URL for the Lambda layer from the official

The URL is used to download the layer zip which is then unzipped to retrieve the ADOT Collector binary.

versions of the arn;

- aws-otel-collector-amd64-ver-0-102-1:1
- aws-otel-collector-arm64-ver-0-102-1:1
- aws-otel-collector-amd64-ver-0-115-0:2
- aws-otel-collector-arm64-ver-0-115-0:2

```sh
export VERSION=0-112-0
URL=$(aws-vault exec management-operator -- aws lambda get-layer-version-by-arn --arn arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-collector-amd64-ver-${VERSION}:1 --query Content.Location --output text)
export VERSION=amd64-ver-0-115-0:2
URL=$(aws-vault exec management-operator -- aws lambda get-layer-version-by-arn --arn arn:aws:lambda:eu-west-1:901920570463:layer:aws-otel-collector-${VERSION} --query Content.Location --output text)
curl $URL -o aws-otel-collector-amd64-ver-${VERSION}.zip
unzip aws-otel-collector-amd64-ver-${VERSION}.zip
rm aws-otel-collector-amd64-ver-${VERSION}.zip
```

```sh
Expand Down

0 comments on commit 9a680b1

Please sign in to comment.