Skip to content

Commit

Permalink
Merge 173a64e into d9dacc4
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpearce-digital authored Jan 29, 2025
2 parents d9dacc4 + 173a64e commit f867e74
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 20 deletions.
1 change: 1 addition & 0 deletions cmd/build_trigger
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
trigger a build
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.
18 changes: 2 additions & 16 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 @@ -36,9 +22,9 @@ COPY --from=build /app/create-s3-replication-job ./create-s3-replication-job
COPY --link lang ./lang
COPY --link ./docker/adot-collector/ /opt

RUN chmod 755 /opt/config/config.yaml
RUN chmod 755 /opt/collector-config/config.yaml

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

ENTRYPOINT ["./create-s3-replication-job"]
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 f867e74

Please sign in to comment.