- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
",t};e.buildCustomizationMenuUi=t;function n(e){let t='
",t}function s(e){let n=e.filter.currentValue||e.filter.defaultValue,t='${e.filter.label}
`,e.filter.options.forEach(s=>{let o=s.id===n;t+=``}),t+="${e.filter.label}
`,t+=`Lambda Web Adapter is in Preview.
The AWS Lambda Web Adapter is a framework that allows developers to run web applications on AWS Lambda.
Datadog supports Lambda Web Adapter for Node.js and Python runtimes, therefore providing you a solution to monitoring your web applications running on AWS Lambda.
The Lambda Web Adapter can run Lambda functions that are packaged as docker images or as Zip files. The following steps are required for instrumenting the Lambda Web Adapter with Datadog for both formats:
This configuration requires Datadog Lambda extension v77+
and Lambda Web Adapter v0.9.1+
. See a sample of the container deployment configuration on Github.
COPY --from=public.ecr.aws/datadog/lambda-extension:77 /opt/. /opt/
COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.9.1 /lambda-adapter /opt/extensions/lambda-adapter
This requires Datadog Lambda extension v77+
and v25+
or later for Lambda Web Adapter. See a sample of the Zip deployment configuration on Github.
for x86
arn:aws:lambda:${AWS::Region}:464622532012:layer:Datadog-Extension:77
arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:25
for ARM
arn:aws:lambda:${AWS::Region}:464622532012:layer:Datadog-Extension-ARM:77
arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:25
Since there is no explicit shutdown system for Lambda, traces must be flushed as soon as possible so they are not lost when the Lambda runtime environment is “frozen”.
The transparent tracing requires the Datadog extension to also proxy requests before the Lambda Web Adapter, so the AWS_LWA_LAMBDA_RUNTIME_API_PROXY
must be set to allow that. The port can be set with any available port.
DD_TRACE_PARTIAL_FLUSH_MIN_SPANS=1
DD_TRACE_PARTIAL_FLUSH_ENABLED=false
AWS_LWA_LAMBDA_RUNTIME_API_PROXY=127.0.0.1:9002
DD_API_KEY=$YOUR_API_KEY
DD_SERVICE=$YOUR_SERVICE_NAME
Since there is no explicit shutdown system for Lambda, traces must be flushed as soon as possible so they are not lost when the Lambda runtime environment is “frozen”.
The transparent tracing requires the Datadog extension to also proxy requests before the Lambda Web Adapter, so the AWS_LWA_LAMBDA_RUNTIME_API_PROXY
must be set to allow that. The port can be set with any available port.
DD_TRACE_PARTIAL_FLUSH_MIN_SPANS=1
DD_TRACE_PARTIAL_FLUSH_ENABLED=false
AWS_LWA_LAMBDA_RUNTIME_API_PROXY=127.0.0.1:9002
AWS_LAMBDA_EXEC_WRAPPER=/opt/bootstrap
DD_API_KEY=$YOUR_API_KEY
DD_SERVICE=$YOUR_SERVICE_NAME
*This step is required only when using Datadog tracing.
Since the Lambda Web Adapter sends readiness check requests once it is loaded, the Datadog extension must not link them to the request that triggered the Lambda function.
The configuration differs depending on the runtime. Assuming the readiness endpoint is the default (GET
at /
):
NodeJs
const tracer = require('dd-trace').init();
tracer.use('http', {
blocklist: ['/']
});
Python
import ddtrace
ddtrace.patch_all()
from ddtrace.trace import tracer, TraceFilter
...
class IgnoreEndpointFilter(TraceFilter):
def __init__(self, pattern, method):
self.pattern = re.compile(pattern)
self.method = method
def process_trace(self, trace):
for span in trace:
url = span.get_tag("http.url")
if (
url is not None
and self.pattern.match(url)
and self.method == span.get_tag("http.method")
):
return None
return trace
tracer.configure(
trace_processors=[IgnoreEndpointFilter(r"http://127.0.0.1:8080/", "GET")]
)
Since the Lambda Web Adapter sends readiness check requests once it is loaded, the Datadog extension must not link them to the request that triggered the Lambda function.
The configuration differs depending on the runtime. Assuming the readiness endpoint is the default (GET
at /
):
NodeJs
const tracer = require('dd-trace').init();
tracer.use('http', {
blocklist: ['/']
});
Python
import ddtrace
ddtrace.patch_all()
from ddtrace.trace import tracer, TraceFilter
...
class IgnoreEndpointFilter(TraceFilter):
def __init__(self, pattern, method):
self.pattern = re.compile(pattern)
self.method = method
def process_trace(self, trace):
for span in trace:
url = span.get_tag("http.url")
if (
url is not None
and self.pattern.match(url)
and self.method == span.get_tag("http.method")
):
return None
return trace
tracer.configure(
trace_processors=[IgnoreEndpointFilter(r"http://127.0.0.1:8080/", "GET")]
)
추가 유용한 문서, 링크 및 기사: