Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pipeline {
steps {
withGithubNotify(context: "Lint") {
withGoEnv(){
dir("${BASE_DIR}/apm-lambda-extension"){
dir("${BASE_DIR}"){
sh(label: 'lint-prep', script: 'go mod tidy && git diff --exit-code')
sh(label: 'lint-run', script: 'make lint')
sh(label: 'Go vet', script: 'go vet')
Expand All @@ -54,7 +54,7 @@ pipeline {
}
withGithubNotify(context: "NOTICE.txt") {
withGoEnv(){
dir("${BASE_DIR}/apm-lambda-extension"){
dir("${BASE_DIR}"){
sh(label: 'notice', script: '''
make NOTICE.txt
git diff --exit-code --quiet && exit 0 || echo "regenerate NOTICE.txt" && exit 1
Expand Down Expand Up @@ -82,7 +82,7 @@ pipeline {
deleteDir()
unstash 'source'
withGoEnv(){
dir("${BASE_DIR}/apm-lambda-extension"){
dir("${BASE_DIR}"){
cmd(label: 'make build', script: 'make build')
}
}
Expand All @@ -93,7 +93,7 @@ pipeline {
steps {
withGithubNotify(context: "Test-${GO_VERSION}-${PLATFORM}") {
withGoEnv(){
dir("${BASE_DIR}/apm-lambda-extension"){
dir("${BASE_DIR}"){
goTestJUnit(options: '-v ./...', output: 'junit-report.xml')
}
}
Expand Down Expand Up @@ -135,7 +135,7 @@ pipeline {
deleteDir()
unstash 'source'
withGoEnv(){
dir("${BASE_DIR}/apm-lambda-extension"){
dir("${BASE_DIR}"){
cmd(label: 'make dist', script: 'make dist')
}
}
Expand All @@ -146,7 +146,7 @@ pipeline {
steps {
withGithubNotify(context: "Push-Docker-${PLATFORM}") {
withGoEnv(){
dir("${BASE_DIR}/apm-lambda-extension"){
dir("${BASE_DIR}"){
dockerLogin(secret: "${DOCKER_SECRET}", registry: "${DOCKER_REGISTRY}")
cmd(label: 'make push-docker', script: 'make push-docker')
}
Expand All @@ -159,7 +159,7 @@ pipeline {
withGithubNotify(context: "Publish-Layer-${PLATFORM}") {
withGoEnv(){
withAWSEnv(secret: 'secret/observability-team/ci/service-account/apm-aws-lambda', forceInstallation: true, version: '2.4.10') {
dir("${BASE_DIR}/apm-lambda-extension"){
dir("${BASE_DIR}"){
cmd(label: 'make publish-in-all-aws-regions', script: 'make publish-in-all-aws-regions')
cmd(label: 'make create-arn-file', script: 'make create-arn-file')
stash(includes: "*${SUFFIX_ARN_FILE}", name: "arn-${isArm() ? 'arm' : 'amd'}")
Expand All @@ -171,9 +171,9 @@ pipeline {
}
post {
always {
archiveArtifacts(allowEmptyArchive: true, artifacts: "${BASE_DIR}/apm-lambda-extension/.regions")
archiveArtifacts(allowEmptyArchive: true, artifacts: "${BASE_DIR}/apm-lambda-extension/*${SUFFIX_ARN_FILE}")
archiveArtifacts(allowEmptyArchive: true, artifacts: "${BASE_DIR}/apm-lambda-extension/.aws")
archiveArtifacts(allowEmptyArchive: true, artifacts: "${BASE_DIR}/.regions")
archiveArtifacts(allowEmptyArchive: true, artifacts: "${BASE_DIR}/*${SUFFIX_ARN_FILE}")
archiveArtifacts(allowEmptyArchive: true, artifacts: "${BASE_DIR}/.aws")
}
}
}
Expand All @@ -183,7 +183,7 @@ pipeline {
stage('Release Notes') {
steps {
withGhEnv(forceInstallation: true, version: '2.4.0') {
dir("${BASE_DIR}/apm-lambda-extension"){
dir("${BASE_DIR}"){
unstash "arn-arm"
unstash "arn-amd"
unstash "dist-arm"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@
# AWS regions file
.regions
.aws/

bin/
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,19 @@ Ready to use Elastic APM to monitor your Lambda functions? See [Monitoring AWS L

Backport any changes made in the `docs` directory to the branches that you'd like to see the docs show up in. Branch names must follow the `major.minor` naming scheme and match a new or recent Elastic Stack version.

## License

Apache 2.0.

## Getting Help

If you find a bug, please [report an issue](https://github.com/elastic/apm-agent-go/issues).
For any other assistance, please open or add to a topic on the [APM discuss forum](https://discuss.elastic.co/c/apm).

## Contributing

See [contributing](CONTRIBUTING.md) for details about reporting bugs, requesting features, or code contributions.

## Release Procedure

See [release](RELEASE.md) for details.

## License

Apache 2.0.
File renamed without changes.
File renamed without changes.
27 changes: 4 additions & 23 deletions apm-lambda-extension/README.md → TESTING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
[![Build Status](https://apm-ci.elastic.co/buildStatus/icon?job=library%2Fapm-aws-lambda-mbp%2Fmain)](https://apm-ci.elastic.co/job/library/job/apm-aws-lambda-mbp/job/main/)

# Elastic APM AWS Lambda extension

Elastic APM Agents can be used with AWS Lambda to monitor the execution of your AWS Lambda functions.
Currently the Node.js, Python and Java Agents are supported.

The extension listens for data once per function invocation and forwards data to an APM Server.

## Getting Started
Ready to use Elastic APM to monitor your Lambda functions?
See [Monitoring AWS Lambda Functions](https://www.elastic.co/guide/en/apm/guide/current/monitoring-aws-lambda.html) to get started and learn more about available configuration options.

## Contributing

See [contributing](CONTRIBUTING.md) for details about reporting bugs, requesting features, or code contributions.
# APM AWS Lambda extension Testing

## Testing unreleased versions
If you need to test an unreleased version you can compile the package and it's dependencies and make them available as AWS Lambda Layer.
If you need to test an unreleased version you can compile the package and its dependencies and make them available as AWS Lambda Layer.

### Compile package and dependencies

To run an unreleased version of this extension, you will need to ensure that your build architecture matches that of the Lambda execution environment by compiling with `GOOS=linux` and `GOARCH=amd64` if you are not running in a Linux environment.

To build the extension into the `bin/extensions` folder, run the following commands.
To build the extension in the `bin/extensions` folder, run the following commands.

```bash
$ cd apm-lambda-extension
Expand Down Expand Up @@ -55,7 +40,7 @@ aws lambda publish-layer-version \
--zip-file "fileb://extension.zip"
```

The out from the above command will include a `LayverVersionArn` field, which contains the unique string identifier for your layer. The will look something like the following.
The output from the above command will include a `LayerVersionArn` field, which contains the unique string identifier for your layer. The will look something like the following.

`"LayerVersionArn": "arn:aws:lambda:<region>:123456789012:layer:<layerName>:1"`

Expand All @@ -70,7 +55,3 @@ The `Makefile` also provides a `build-and-publish` command which will perform th
AWS_ACCESS_KEY_ID=A...X \
AWS_SECRET_ACCESS_KEY=h...E \
make build-and-publish

## Release Procedure

See [release](RELEASE.md) for details.
1 change: 0 additions & 1 deletion apm-lambda-extension/.gitignore

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package apmproxy_test
import (
"compress/gzip"
"context"
"elastic/apm-lambda-extension/apmproxy"
"github.com/elastic/apm-aws-lambda/apmproxy"
"io"
"net/http"
"net/http/httptest"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package apmproxy_test

import (
"elastic/apm-lambda-extension/apmproxy"
"github.com/elastic/apm-aws-lambda/apmproxy"
"testing"

"github.com/stretchr/testify/require"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"bytes"
"compress/gzip"
"compress/zlib"
"elastic/apm-lambda-extension/apmproxy"
"github.com/elastic/apm-aws-lambda/apmproxy"
"io"
"testing"

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package apmproxy_test

import (
"bytes"
"elastic/apm-lambda-extension/apmproxy"
"github.com/elastic/apm-aws-lambda/apmproxy"
"io"
"net"
"net/http"
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions apm-lambda-extension/app/app.go → app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
package app

import (
"elastic/apm-lambda-extension/apmproxy"
"elastic/apm-lambda-extension/extension"
"elastic/apm-lambda-extension/logger"
"elastic/apm-lambda-extension/logsapi"
"github.com/elastic/apm-aws-lambda/apmproxy"
"github.com/elastic/apm-aws-lambda/extension"
"github.com/elastic/apm-aws-lambda/logger"
"github.com/elastic/apm-aws-lambda/logsapi"
"fmt"
"os"
"strconv"
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions apm-lambda-extension/app/run.go → app/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ package app

import (
"context"
"elastic/apm-lambda-extension/apmproxy"
"elastic/apm-lambda-extension/extension"
"elastic/apm-lambda-extension/logsapi"
"github.com/elastic/apm-aws-lambda/apmproxy"
"github.com/elastic/apm-aws-lambda/extension"
"github.com/elastic/apm-aws-lambda/logsapi"
"fmt"
"sync"
"time"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
package e2eTesting

import (
"elastic/apm-lambda-extension/logger"
"github.com/elastic/apm-aws-lambda/logger"
"flag"
"fmt"
"io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
"path/filepath"
"strings"

"elastic/apm-lambda-extension/apmproxy"
"github.com/elastic/apm-aws-lambda/apmproxy"

"go.uber.org/zap"
)
Expand Down
Loading