You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 11, 2025. It is now read-only.
* Create codeql-analysis.yml (DataDog#100)
* Create codeql-analysis.yml
* Update codeql-analysis.yml
* Update run_integration_tests.sh
* Do not show error messages even if neither DD_API_KEY nor DD_KMS_API_KEY is set when Lambda Extension is running (DataDog#102)
* Bump version to 1.4.0
* Bump go + fasthttp + lint (DataDog#104)
* Consolidate serverless configurations into one place (DataDog#105)
* Update README.md
* Update README.md
* Bump dd-trace-go to latest version to address some vulnerabilities (DataDog#109)
* Bump dd-trace-go to latest version to address some vulnaribilities
* update go.sum with `go mod tidy`
* Bump version to 1.6.0
* bump codeql (DataDog#112)
* Bump dd-trace-go to v1.41 (DataDog#115)
* Bump version to 1.7.0
* [SLS-2330] Add support for universal instrumentation with the extension (DataDog#116)
add option to use universal instrumentation
* [EEP-444] include error in failed metric send log (DataDog#118)
Co-authored-by: Corey Griffin <[email protected]>
* [SLS-2492] Upgrade aws sdk v2 (DataDog#113)
upgrade sdk
* Bump version to 1.8.0
* Use new account in integration tests (DataDog#119)
* set the architecture explicitely (DataDog#122)
* mask init runtime logs (DataDog#123)
* Update libs (DataDog#121)
* bump go 1.18 (DataDog#125)
* Retry sending trace payloads on failure. (DataDog#128)
* Bump version to 1.9.0
* Update DD Trace to v1.51.0(DataDog#133)
* Bump go version to 1.20 (DataDog#140)
Bump go version to 1.20
* Upgrade version of dd-trace-go to v1.54.1 (DataDog#141)
* Bump version to 1.10.0
* Propagate trace context from SQS events (DataDog#142)
* Default parent id to be trace id if not found elsewhere.
* Look for trace context in context object as well as headers.
* Apply trace context before starting the function execution span.
* Update signature in tests.
* Add spanid of execution span to context.
* Do not ignore priority "-128".
* Test that default parent id set to trace id.
* Test span id added to context.
* Test uses trace context from context object.
* Bump version to 1.11.0
* feat: automate AppSec enablement setup (e.g: `AWS_LAMBDA_RUNTIME_API`) (DataDog#143)
* feat: honor AWS_LAMBDA_EXEC_WRAPPER when AWS Lambda does not
In order to simplify onboarding & make it more uniform across languages,
inspect the value of the `AWS_LAMBDA_EXEC_WRAPPER` environment variable
and apply select environment variable changes it perofrms upon
decorating a handler.
This is necessary/useful because that environment variable is not
honored by custom runtimes (`provided`, `provided.al2`) as well as the
`go1.x` runtime (which is a glorified provided runtime). The datadog
Lambda wrapper starts a proxy to inject ASM functionality directly on
the Lambda runtime API instead of having to manually instrument each and
every lambda handler/application, and modifies `AWS_LAMBDA_RUNTIME_API`
to instruct Lambda language runtime client libraries to go through it
instead of directly interacting with the Lambda control plane.
APPSEC-11534
* pivot to a different, cheaper strategy
* typo fix
* PR feedback
* minor fixups
* add warning in go1.x runtime if lambda.norpc build tag was not enabled
* Bump version to 1.12.0
* Re-add configs after upstream rebase
* Bump packages
* Remove deprecated `io/ioutil` calls
---------
Co-authored-by: Tian Chu <[email protected]>
Co-authored-by: Soshi Katsuta <[email protected]>
Co-authored-by: Maxime David <[email protected]>
Co-authored-by: kimi <[email protected]>
Co-authored-by: Kimi Wu <[email protected]>
Co-authored-by: Dylan Yang <[email protected]>
Co-authored-by: Corey Griffin <[email protected]>
Co-authored-by: Corey Griffin <[email protected]>
Co-authored-by: Marcin Rabenda <[email protected]>
Co-authored-by: Rey Abolofia <[email protected]>
Co-authored-by: Rey Abolofia <[email protected]>
Co-authored-by: Andrew Rodriguez <[email protected]>
Co-authored-by: Ivan Topolcic <[email protected]>
Co-authored-by: Romain Marcadier <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+3-96
Original file line number
Diff line number
Diff line change
@@ -10,104 +10,11 @@ Datadog Lambda Library for Go enables enhanced Lambda metrics, distributed traci
10
10
11
11
## Installation
12
12
13
-
Follow the installation instructions[here](https://docs.datadoghq.com/serverless/installation/go/).
13
+
Follow the [installation instructions](https://docs.datadoghq.com/serverless/installation/go/), and view your function's enhanced metrics, traces and logs in Datadog.
14
14
15
-
## Enhanced Metrics
15
+
## Configurations
16
16
17
-
Once [installed](#installation), you should be able to view enhanced metrics for your Lambda function in Datadog.
18
-
19
-
Check out the official documentation on [Datadog Lambda enhanced metrics](https://docs.datadoghq.com/integrations/amazon_lambda/?tab=go#real-time-enhanced-lambda-metrics).
20
-
21
-
## Custom Metrics
22
-
23
-
Once [installed](#installation), you should be able to submit custom metrics from your Lambda function.
24
-
25
-
Check out the instructions for [submitting custom metrics from AWS Lambda functions](https://docs.datadoghq.com/integrations/amazon_lambda/?tab=go#custom-metrics).
26
-
27
-
## Tracing
28
-
29
-
Set the `DD_TRACE_ENABLED` environment variable to `true` to enable Datadog tracing. When Datadog tracing is enabled, the library will inject a span representing the Lambda's execution into the context object. You can then use the included `dd-trace-go` package to create additional spans from the context or pass the context to other services. For more information, see the [dd-trace-go documentation](https://godoc.org/gopkg.in/DataDog/dd-trace-go.v1/ddtrace).
If you are also using AWS X-Ray to trace your Lambda functions, you can set the `DD_MERGE_XRAY_TRACES` environment variable to `true`, and Datadog will merge your Datadog and X-Ray traces into a single, unified trace.
61
-
62
-
### Trace Context Extraction
63
-
64
-
To link your distributed traces, datadog-lambda-go looks for the `x-datadog-trace-id`, `x-datadog-parent-id` and `x-datadog-sampling-priority` trace `headers` in the Lambda event payload.
65
-
If the headers are found it will set the parent trace to the trace context extracted from the headers.
66
-
67
-
It is possible to configure your own trace context extractor function if the default extractor does not support your event.
68
-
69
-
```go
70
-
myExtractorFunc:=func(ctx context.Context, ev json.RawMessage) map[string]string {
71
-
// extract x-datadog-trace-id, x-datadog-parent-id and x-datadog-sampling-priority.
72
-
}
73
-
74
-
cfg:= &ddlambda.Config{
75
-
TraceContextExtractor: myExtractorFunc,
76
-
}
77
-
ddlambda.WrapFunction(handler, cfg)
78
-
```
79
-
80
-
A more complete example can be found in the `ddlambda_example_test.go` file.
81
-
82
-
## Environment Variables
83
-
84
-
### DD_FLUSH_TO_LOG
85
-
86
-
Set to `true` (recommended) to send custom metrics asynchronously (with no added latency to your Lambda function executions) through CloudWatch Logs with the help of [Datadog Forwarder](https://github.com/DataDog/datadog-serverless-functions/tree/master/aws/logs_monitoring). Defaults to `false`. If set to `false`, you also need to set `DD_API_KEY` and `DD_SITE`.
87
-
88
-
### DD_API_KEY
89
-
90
-
If `DD_FLUSH_TO_LOG` is set to `false` (not recommended), the Datadog API Key must be defined.
91
-
92
-
### DD_SITE
93
-
94
-
If `DD_FLUSH_TO_LOG` is set to `false` (not recommended), you must set `DD_SITE`. Possible values are `datadoghq.com`, `datadoghq.eu`, `us3.datadoghq.com`, `us5.datadoghq.com`, and `ddog-gov.com`. The default is `datadoghq.com`.
95
-
96
-
### DD_LOG_LEVEL
97
-
98
-
Set to `debug` enable debug logs from the Datadog Lambda Library. Defaults to `info`.
99
-
100
-
### DD_ENHANCED_METRICS
101
-
102
-
Generate enhanced Datadog Lambda integration metrics, such as, `aws.lambda.enhanced.invocations` and `aws.lambda.enhanced.errors`. Defaults to `true`.
103
-
104
-
### DD_TRACE_ENABLED
105
-
106
-
Initialize the Datadog tracer when set to `true`. Defaults to `false`.
107
-
108
-
### DD_MERGE_XRAY_TRACES
109
-
110
-
If you are using both X-Ray and Datadog tracing, set this to `true` to merge the X-Ray and Datadog traces. Defaults to `false`.
17
+
See the [advanced configuration options](https://docs.datadoghq.com/serverless/configuration) to tag your telemetry, capture request/response payloads, filter or scrub sensitive information from logs or traces, and more.
0 commit comments