-
Notifications
You must be signed in to change notification settings - Fork 0
Adding Serverless + Golang + AL2 + CodeSee example #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| ./bin/bootstrap | ||
| ./bin/bootstrap.zip | ||
| .DS_Store | ||
|
|
||
| # Logs | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
| ``` | ||
|
|
||
| ## 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 not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.ymlfile.