Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement spans for metrics + profiling #1265

Open
Tracked by #620
roby2014 opened this issue Jun 18, 2024 · 0 comments · May be fixed by #1268
Open
Tracked by #620

Implement spans for metrics + profiling #1265

roby2014 opened this issue Jun 18, 2024 · 0 comments · May be fixed by #1268
Assignees
Labels
A-Core B-Telemetry S-Triage Issues to discuss in the next meetings

Comments

@roby2014
Copy link
Member

roby2014 commented Jun 18, 2024

Problem

Current metric implementation does not support span blocks, which means, we can not have block + scope information of things. This is a problem because we can not, for example, create a flamegraph of our systems / functions / whatever profiling we want to do (as in the image) and see hierarchy, filter levels, etc..

image

Proposed Solution

  • Remove CUBOS_PROFILE. A span will always be profiled.
  • CUBOS_[LEVEL]_SPAN where LEVEL is TRACE DEBUG INFO
  • Metrics will be part of a span
  • Logs should also be part of a span

Example:

static void simulateFrame(int ms)
{
    CUBOS_INFO_SPAN(); // no name provided, will use __FUNCTION__ 

    // ...

    {
        CUBOS_TRACE_SPAN("block");
        CUBOS_METRIC("something", 2.0);
    }

    // ...

    {
        CUBOS_INFO_SPAN("lowlevel");
    }
    
    CUBOS_DEBUG_SPAN("anotherSpan");
}

provides a structure like

simulateFrame (span)
simulateFrame:block (span)
simulateFrame:block:something (metric)
simulateFrame:lowlevel
simulateframe:anotherSpan
@roby2014 roby2014 added A-Core S-Triage Issues to discuss in the next meetings B-Telemetry labels Jun 18, 2024
@roby2014 roby2014 self-assigned this Jun 18, 2024
@roby2014 roby2014 mentioned this issue Jun 18, 2024
4 tasks
@roby2014 roby2014 added this to the 0.3 Standalone Editor milestone Jun 18, 2024
@roby2014 roby2014 linked a pull request Jun 20, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core B-Telemetry S-Triage Issues to discuss in the next meetings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant