Coldstart Processor creating broken traces for cold start and next invocation
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- aws, nodejs
- Lĩnh vực
- cloud, observability
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện kịch bản bốn request với các layer Node.js và collector 0.19.0, sử dụng cấu hình coldstart trong collector.yaml được cung cấp. So sánh các trace thu được và output của collector, bao gồm init span của invocation đầu tiên; hoàn tất khi có bốn trace hoàn chỉnh, khác biệt đến nơi và trace coldstart chứa dữ liệu khởi tạo như mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
I was unable to get the coldstart processor to do what is says that it does on the tin. If i submit 4 requests to a helloworld function behind an api gateway I only end up with 3 traces in my observability platform. Two of these traces will use the same internal spans, have missing spans and appears to be related to the cold start. One trace goes missing. Invocations from coldstart + 3 appear normal.
Steps to reproduce
- Create a hello world Lambda function fronted by either a REST or HTTP api in AWS
- Deploy the api and function with the otel collector and nodejs layers bundled with a custom collector.yaml that enables the coldstart processor. ie.
processors:
coldstart:
resource:
attributes:
- key: deployment.environment.name
value: '${env:ENVIRONMENT_NAME}'
action: upsert
Additional configure the collector.yaml to send to your observability platform of choice.
I had the following env variables set for the function:
// OpenTelemetry configuration
AWS_LAMBDA_EXEC_WRAPPER: '/opt/otel-handler',
OPENTELEMETRY_COLLECTOR_CONFIG_URI: '/var/task/collector.yaml',
OTEL_TRACES_SAMPLER: 'always_on',
OTEL_PROPAGATORS: 'tracecontext,baggage',
OTEL_LAMBDA_DISABLE_AWS_CONTEXT_PROPAGATION: 'true',
OTEL_NODE_ENABLED_INSTRUMENTATIONS: 'aws-sdk,aws-lambda,http,undici',
OTEL_SERVICE_NAME: serviceName,
OPENTELEMETRY_EXTENSION_LOG_LEVEL: 'INFO',
I tried active tracing on, passthrough and off.
I tried the insights layer on and off.
- Manually trigger a http get request to the api/function endpoint four times
- Check traces that arrive in the observability platform
What did you expect to see?
I expected to see 4 traces arrive in my observability platform (grafana cloud). I expected the first trace that would have triggered a cold start to have a trace that includes a span for the init phase and be of a longer duration than the other three.
What did you see instead?
- Only three traces arrived.
-
One trace went missing
-
The first two traces are broken
- trace 1
- trace 2
- trace 3
What version of collector/language SDK version did you use?
- 0.19.0 (collector layer)
- 0.19.0 (nodejs layer)
What language layer did you use?
nodejs
Additional context
I tried a few different things to try and get this to work:
- bundling to commonjs and esm
- using a http or rest api gateway
- removing the batch and decouple processors
- putting the coldstart processor first/last in order of execution
- setting the function active tracing to on, passthrough and off.
- removing the insight lambda layer
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
- Ngôn ngữ chính
- Go
- Star
- 433
- Fork
- 249
- Merge trung bình
- 1 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 39
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của open-telemetry/opentelemetry-lambda
-
enhancement ruby
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
open-telemetry/opentelemetry-lambda#2741 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
processor/cold_start
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
open-telemetry/opentelemetry-lambda#2738 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Fix install-toolsĐang mởgo
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
open-telemetry/opentelemetry-lambda#2736 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Use node-sdk package for layerĐang mởenhancement javascript
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
open-telemetry/opentelemetry-lambda#2744 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement python
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
open-telemetry/opentelemetry-lambda#2742 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của open-telemetry/opentelemetry-lambda
Issue tương tự
-
[bug]: scan-all update-schedule does not auto-convert 5-field cron expressions as documentedCó thể đã có người làm @vishnums2k5 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
goharbor/harbor-cli#1143 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 8 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
--info inline-right:PREFIX leaves the first character of the prefix when the info gets shorterĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
rossoctl/context-guru#1053 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] EphemeralJob matches every pod in the namespace when spec.selector is emptyCó thể đã có người làm @vishnums2k5 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
openkruise/kruise#2656 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày