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
We are having a setup where a request comes in to a Kong route, which in turn executes four plugins in this exact order (screenshot from NewRelic also attached)
openid-connect
rate-limiting-advanced
opentelemetry
aws-lambda
After the last plugin is executed, an AWS Golang Lambda is invoked using the Event type (instead of RequestResponse) and the aws_gateway_compatible property set to true. Everything works as expected except for OTEL. We are trying to create a trace inside the invoked lambda which will have as parent our Kong Gateway. However, as you can see in the attached NewRelic screenshot, although they appear in the same trace, they are parallel to each other and the lambda has a missing parent (which should be the Kong span from above).
Initially, the OTEL plugin was being executed after the aws-lambda plugin, which caused the w3c headers (traceparent and tracestate) to not be injected in the request headers. We changed the execution order so that the OTEL plugin is executed first, which seems to work to some extent, meaning that now we get a traceparent w3c header injected in the headers (but no tracestate header). However, it seems that it is generated incorrectly, as it points to nothing when trying to search by it in NewRelic.
Our assumption is that maybe there is something going on in the header_filter lifecycle step, where the traceparent is being replaced? But we are not sure. Therefore we wanted to check with you whether this behavior is normal or whether you have experienced it before.
It is also important to note that we are manually instrumenting our Golang Lambda. But it should not be that relevant to this use case as the traceparent is generated by the OTEL plugin, and it seems to be incorrectly generated.
I am also attaching our configuration for the OTEL and aws-lambda plugins.
The OTEL plugin should generate a correct traceparent that points to Kong, so that the span of the invoked AWS Lambda would not have a missing parent anymore.
Steps To Reproduce
Configure an OTEL plugin that injects w3c headers.
Configure an aws-lambda plugin using the Event type.
Make sure that in the access lifecycle step the aws-lambda is executed AFTER the OTEL plugin.
Set up OTEL tracing in the invoked lambda.
Extract the w3c headers in the lambda.
Create a span in the lambda that needs to have as parent Kong (meaning that it needs to point or be linked to the traceparent from the w3c headers)
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Kong version (
$ kong version
)3.7
Current Behavior
We are having a setup where a request comes in to a Kong route, which in turn executes four plugins in this exact order (screenshot from NewRelic also attached)
openid-connect
rate-limiting-advanced
opentelemetry
aws-lambda
After the last plugin is executed, an AWS Golang Lambda is invoked using the
Event
type (instead ofRequestResponse
) and theaws_gateway_compatible
property set totrue
. Everything works as expected except for OTEL. We are trying to create a trace inside the invoked lambda which will have as parent our Kong Gateway. However, as you can see in the attached NewRelic screenshot, although they appear in the same trace, they are parallel to each other and the lambda has a missing parent (which should be the Kong span from above).Initially, the OTEL plugin was being executed after the
aws-lambda
plugin, which caused thew3c
headers (traceparent
andtracestate
) to not be injected in the request headers. We changed the execution order so that the OTEL plugin is executed first, which seems to work to some extent, meaning that now we get atraceparent
w3c header injected in the headers (but notracestate
header). However, it seems that it is generated incorrectly, as it points to nothing when trying to search by it in NewRelic.Our assumption is that maybe there is something going on in the
header_filter
lifecycle step, where thetraceparent
is being replaced? But we are not sure. Therefore we wanted to check with you whether this behavior is normal or whether you have experienced it before.It is also important to note that we are manually instrumenting our Golang Lambda. But it should not be that relevant to this use case as the
traceparent
is generated by the OTEL plugin, and it seems to be incorrectly generated.I am also attaching our configuration for the OTEL and aws-lambda plugins.
otel
pluginaws-lambda
pluginExpected Behavior
The OTEL plugin should generate a correct
traceparent
that points to Kong, so that the span of the invoked AWS Lambda would not have a missing parent anymore.Steps To Reproduce
w3c
headers.aws-lambda
plugin using theEvent
type.access
lifecycle step theaws-lambda
is executed AFTER the OTEL plugin.w3c
headers in the lambda.traceparent
from thew3c
headers)Anything else?
No response
The text was updated successfully, but these errors were encountered: