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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
./bin/bootstrap
./bin/bootstrap.zip
.DS_Store

# Logs
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ This repo contains various example on how to integrate with CodeSee
`cdk-lambda-layer-example` - Show you example CDK to integrate with CodeSee Lambda Layer

`sst-cdk-lambda-layer-example` - Show you example Serverless Stack + CDK to integrate with CodeSee Lambda Layer

`serverless-al2-example` - Show you example Serverless + Golang + Amazon Linux 2 + CodeSee Lambda Layer
3 changes: 3 additions & 0 deletions serverless-al2-example/Gopkg.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[[constraint]]
name = "github.com/aws/aws-lambda-go"
version = "1.x"
32 changes: 32 additions & 0 deletions serverless-al2-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Serverless + Golang + Amazon Linux 2 (provided.al2) + CodeSee example

Using AL2 runtime + Datadog serverless plugin + CodeSee Layer Configured

## Installation:

```
serverless plugin install --name serverless-plugin-datadog
serverless plugin install --name serverless-go-plugin
go get github.com/DataDog/datadog-lambda-go
```

## Set required environment variables:

Make sure the following environment variables are set in your `serverless.yml` file.

```
DD_APM_DD_URL: http://127.0.0.1:8080
DD_APM_NON_LOCAL_TRAFFIC: true
DD_APM_ENABLED: true
CODESEE_BRIDGE_FORWARD_HOST: https://in-datadog.codesee.io
CODESEE_BRIDGE_TOKEN: <YOUR_CODESEE_TOKEN>
```
Comment on lines +17 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a little more information here?

Should these be set in certain files of the example? Or set via some other method? I feel like I've seen several of these in the code. If they are already set in the code, why are we also listing them here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're telling the user to make sure these are set properly in the serverless.yml, is that right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea I'll add the note: Make sure the following environment variables are set in your serverless.yml file.


## Deploy
```
sls deploy --aws-profile <your-aws-profile> --region us-east-1
```

## More info:

https://docs.codesee.io/docs/lambda-configuration-examples#serverless
Binary file added serverless-al2-example/bin/boostrap
Binary file not shown.
60 changes: 60 additions & 0 deletions serverless-al2-example/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
module aws-golang-simple-http-endpoint

go 1.18

require github.com/aws/aws-lambda-go v1.34.1

require (
github.com/DataDog/datadog-agent/pkg/obfuscate v0.41.1 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.42.0-rc.1 // indirect
github.com/DataDog/datadog-go/v5 v5.2.0 // indirect
github.com/DataDog/datadog-lambda-go v1.9.0 // indirect
github.com/DataDog/go-tuf v0.3.0--fix-localmeta-fork // indirect
github.com/DataDog/sketches-go v1.4.1 // indirect
github.com/Microsoft/go-winio v0.5.2 // indirect
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/aws/aws-sdk-go v1.44.168 // indirect
github.com/aws/aws-sdk-go-v2 v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/config v1.18.5 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.5 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.28 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.21 // indirect
github.com/aws/aws-sdk-go-v2/service/kms v1.19.2 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.11.27 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.17.7 // indirect
github.com/aws/aws-xray-sdk-go v1.8.0 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/golang/glog v1.0.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/compress v1.15.13 // indirect
github.com/philhofer/fwd v1.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
github.com/tinylib/msgp v1.1.6 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasthttp v1.35.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go4.org/intern v0.0.0-20211027215823-ae77deb06f29 // indirect
go4.org/unsafe/assume-no-moving-gc v0.0.0-20220617031537-928513b29760 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/genproto v0.0.0-20210114201628-6edceaf6022f // indirect
google.golang.org/grpc v1.45.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/DataDog/dd-trace-go.v1 v1.48.0 // indirect
inet.af/netaddr v0.0.0-20220617031823-097006376321 // indirect
)
Loading