Opentelemetry query
search cancel

Opentelemetry query

book

Article ID: 416679

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

The span for the first call from the ‘test-start’ is not constructed right – it is allocated a new traceId, and the parentSpanId claim is empty. 

The spans for subsequent calls are constructed the way I would expect – the traceId is inherited from the ‘test-start’ traceId, the parentSpanID matches the calling span, and each span has a unique spanID.

 

Cause

Customer was using Otel and noticed when looking at traces from a policy where they used the "Run Assertions for Each item" to loop and route to a hello service on the same Gateway, that the trace was not correct:  the span for the first call from the ‘test-start’ is not constructed right – it is allocated a new traceId, and the parentSpanId is empty. The traceid should be inherited from the 'test-start' traceId, the parentSpandId  should match the calling span, and each span has a unique spanID.

Resolution

We provided a hotfix and also ported fix for context propagation related to "Run Assertions for Each Item". For future cases , the customer can ask for the hotfix when ever needed and we can attach the same in consequent issues.