Adding coldstart processor to pipeline drops platform.initRuntimeDone span and does not set faas.coldstart on exec span
Describe the bug
Adding coldstart processor to pipeline drops platform.initRuntimeDone span and does not set faas.coldstart on exec span.
With coldstart in the list of processors I lose the platform.initRuntimeDone span. And I don't get faas.coldstart apended to my execution span. If I remove coldstart from processors I get both spans.
Steps to reproduce I'm using the following config for the collector
receivers:
telemetryapi:
otlp:
protocols:
grpc:
endpoint: "localhost:4317"
http:
endpoint: "localhost:4318"
exporters:
debug:
verbosity: detailed
processors:
coldstart:
service:
pipelines:
traces:
receivers: [otlp, telemetryapi]
processors: [coldstart]
exporters: [debug]
What did you expect to see?
I expected to see faas.coldstart on the execution span and for the platform.initRuntimeDone span not to be dropped.
What did you see instead?
Without coldstart:
ResourceSpans #0
Resource SchemaURL:
Resource attributes:
-> faas.invoked_provider: Str(aws)
-> service.name: Str(otel_lambda_hello_world)
-> faas.name: Str(otel_lambda_hello_world)
-> faas.max_memory: Str(128)
-> faas.version: Str($LATEST)
-> faas.invoked_region: Str(eu-west-2)
ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope github.com/open-telemetry/opentelemetry-lambda/collector/receiver/telemetryapi
Span #0
Trace ID : f630a91538b856f05d14f5b868f7e1cc
Parent ID :
ID : 4550e3b670a330d3
Name : platform.initRuntimeDone
Kind : Internal
Start time : 2025-01-09 23:21:10.115 +0000 UTC
End time : 2025-01-09 23:21:11.549 +0000 UTC
Status code : Unset
Status message :
Attributes:
-> faas.coldstart: Bool(true)
ResourceSpans #0
Resource SchemaURL:
Resource attributes:
-> telemetry.sdk.language: Str(python)
-> telemetry.sdk.name: Str(opentelemetry)
-> telemetry.sdk.version: Str(1.28.1)
-> cloud.region: Str(eu-west-2)
-> cloud.provider: Str(aws)
-> faas.name: Str(otel_lambda_hello_world)
-> faas.version: Str($LATEST)
-> faas.instance: Str(2025/01/09/[$LATEST]9951d9d5fe0f4beba22eff18bc328480)
-> service.name: Str(otel_lambda_hello_world)
-> telemetry.auto.version: Str(0.49b1)
ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope opentelemetry.instrumentation.aws_lambda 0.49b1
Span #0
Trace ID : 06b188f39291ea2b7829fe64ce0a25d6
Parent ID :
ID : 2f7f9ca964727317
Name : main.handler
Kind : Server
Start time : 2025-01-09 23:21:11.55128671 +0000 UTC
End time : 2025-01-09 23:21:11.551345334 +0000 UTC
Status code : Unset
Status message :
Attributes:
-> cloud.resource_id: Str(arn:aws:lambda:eu-west-2:REDACTED:function:otel_lambda_hello_world:$LATEST)
-> faas.invocation_id: Str(a1ff9c27-6956-4384-a210-8a0024e386a0)
-> cloud.account.id: Str(REDACTED)
With coldstart:
ResourceSpans #0
Resource SchemaURL:
Resource attributes:
-> telemetry.sdk.language: Str(python)
-> telemetry.sdk.name: Str(opentelemetry)
-> telemetry.sdk.version: Str(1.28.1)
-> cloud.region: Str(eu-west-2)
-> cloud.provider: Str(aws)
-> faas.name: Str(otel_lambda_hello_world)
-> faas.version: Str($LATEST)
-> faas.instance: Str(2025/01/09/[$LATEST]ec0453f29c21427db20c427b258992d2)
-> service.name: Str(otel_lambda_hello_world)
-> telemetry.auto.version: Str(0.49b1)
ScopeSpans #0
ScopeSpans SchemaURL:
InstrumentationScope opentelemetry.instrumentation.aws_lambda 0.49b1
Span #0
Trace ID : 563d35a31df8201c210762c63a96312e
Parent ID :
ID : 79f4578262df0ab0
Name : main.handler
Kind : Server
Start time : 2025-01-09 23:19:51.442849152 +0000 UTC
End time : 2025-01-09 23:19:51.44289955 +0000 UTC
Status code : Unset
Status message :
Attributes:
-> cloud.resource_id: Str(arn:aws:lambda:eu-west-2:REDACTED:function:otel_lambda_hello_world:$LATEST)
-> faas.invocation_id: Str(213145bc-f6d5-408e-b872-c57e249aa209)
-> cloud.account.id: Str(REDACTED)
What version of collector/language SDK version did you use?
Version: arn:aws:lambda:eu-west-2:184161586896:layer:opentelemetry-collector-amd64-0_12_0:1
What language layer did you use?
arn:aws:lambda:eu-west-2:184161586896:layer:opentelemetry-python-0_11_0:1
Additional context Env:
AWS_LAMBDA_EXEC_WRAPPER = "/opt/otel-instrument"
OPENTELEMETRY_COLLECTOR_CONFIG_URI = "/var/task/otel.yaml"