-
-
Notifications
You must be signed in to change notification settings - Fork 390
Open
Labels
Milestone
Description
We've been long waiting to otlp to become more performant and a signal from AWS about unifying in an approach. With the official deprecation of xray (https://aws.amazon.com/blogs/mt/announcing-aws-x-ray-sdks-daemon-end-of-support-and-opentelemetry-migration/), we can move forward.
Idea
@middy/otlputility packages to create logger, tracer, metrics- also init resources (context)
- support treeshaking (no env support)
@middy/otlp-contextmiddleware to inject request context into logs/traces/metrics@middy/otlp-loggermiddleware to logevent,response,error@middy/otlp-metricsmiddleware to add metric for cold start count and/or error count- do people want this?
@middy/otlp-tracermiddleware to trace before -> after/onError (aka approx duration of handler when last in stack)- do people want this?
- sample plugin for tracing middy, it's middleware, and the handler. this approach is more accurate than a middleware
- Defaults:
- resources:
env,process,@opentelemetry/resource-detector-aws - exporters: stdout, fetch (if needed for logs/traces)
- instrumentations: none
- propagators:
@opentelemetry/propagator-aws-xray-lambda
- resources:
- Docs
- How to trace,
fetch,dns,https,pg,redis
- How to trace,
If you have exp in otlp or have a solution you're allowed to share. Please reach out.
Release
- add to v7.x
- deprecate duplicate middleware in v8.x
- input-output-logger
- error-logger
Refs
- https://aws-otel.github.io/docs/getting-started/javascript-sdk
- Use Otel: We need your feedback! OpenTelemetry in Powertools for AWS aws-powertools/powertools-lambda-typescript#665
- Use powertools: https://awslabs.github.io/aws-lambda-powertools-typescript/latest/core/tracer/#patching-aws-sdk-clients
- past discussion: We need your feedback! OpenTelemetry in Powertools for AWS aws-powertools/powertools-lambda-typescript#665
- Instrumenting AWS Lambda: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/aws-lambda.md
- otlp-lambda (monolith): https://github.com/open-telemetry/opentelemetry-lambda/blob/main/nodejs/packages/layer/src/wrapper.ts#L440
- AWS OTLP Endpoints: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-OTLPEndpoint.html