"Rollup" fields in OpenTelemetry to sum values from child spans

36 views Asked by At

I'm currently in the process of migrating my Django application monitoring from beeline to OpenTelemetry. One feature of beeline was the add_rollup_field function which can specify a field to be summed in a trace's root span. For example, if we add a db.total_duration rollup field, we can use that to sum all of the db.duration values for a root span.

What would be the best way to implement this in OpenTelemetry? Is there a good way to pass these values to parent spans and eventually to the root span? I've looked into Baggage but that appears to mainly be used to update a context for passing down the call stack, not up.

0

There are 0 answers