Skip to content

Span Property Math #109948

@Maixy

Description

@Maixy

Problem Statement

We occasionally have span properties that we would like to perform some metric math on in the context of a single span, rather than across spans.

For example, if I have a span that has both "points" and "factor" properties, it would be great to be able to perform the math sum(span.points * span.factor)

The current workaround is to use something like sum(span.points) * avg(span.factor), but this of course produces significantly different results from executing the math on each span before combining.

Ex. with 5 spans that have the following values:

points factor
1 1
1 1
1 1
1 1
100 5

sum(span.points * span.factor) produces 504, while sum(span.points) * avg(span.factor) produces 187.2

Solution Brainstorm

No response

Product Area

Unknown

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions