Layer7 API Management

 View Only

 Optimizing OTEL Traces: retrieve nested assertion trace

Jump to  Best Answer
dirkbecher's profile image
dirkbecher posted May 11, 2025 03:49 PM

Hello everyone,

We've been experimenting with the OTEL SDK on the Layer7 Gateway (version 11.1.0 in our case). It provides valuable insights, but we're seeing a significant number of traces being sent to our observability cluster, which negatively impacts overall gateway performance.

To improve performance, we've applied a minimal OTEL filter. While this helps reduce the load, we're now missing critical routing data. Specifically, our routing assertion is nested inside an "At Least One" assertion, which itself resides within an included policy fragment. Currently, we're not receiving traces for this routing assertion, as collecting traces for all assertions would degrade performance.

Is there a way to adjust the OTEL filter to include this deeply nested routing assertion without having to trace every single assertion?

Thanks!

Ben Urbanski's profile image
Broadcom Employee Ben Urbanski  Best Answer

Hello Dirk,

At this point, we will not create spans for included assertions that are nested in excluded assertions. At a minimum, you would have to include the assertions in which your route assertions could be nested in your filter.

For example, this filter would include route assertions, at least one assertions and include policy fragment assertions:


And would provide this trace (minus all of the other assertions in the API policy or policy fragment):

That said, we'll consider whether there would be any other practical way to include nested assertions with future enhancements.

Regards,

Ben