Giter VIP home page Giter VIP logo

grafana / phlare Goto Github PK

View Code? Open in Web Editor NEW
2.1K 90.0 73.0 76.33 MB

๐Ÿ”ฅ horizontally-scalable, highly-available, multi-tenant continuous profiling aggregation system

Home Page: https://grafana.com/oss/phlare/

License: GNU Affero General Public License v3.0

Makefile 0.74% Go 91.63% Dockerfile 0.14% Shell 0.25% Mustache 0.12% Jsonnet 1.35% JavaScript 0.46% Java 0.21% Python 0.04% Rust 0.19% CSS 0.09% TypeScript 4.66% HTML 0.02% C 0.09%
profiling continuous-profiling grafana kubernetes monitoring performance performance-monitoring prometheus

phlare's Introduction

phlare's People

Contributors

09jvilla avatar aocenas avatar bluesheeptoken avatar conorevans avatar cristiangreco avatar cstyan avatar cuishuang avatar cyriltovena avatar dapirian avatar dependabot[bot] avatar duologic avatar eh-am avatar eve832 avatar glindstedt avatar hi-rustin avatar jdbaldry avatar joey-grafana avatar kolesnikovae avatar korniltsev avatar nlamirault avatar petethepig avatar prati0100 avatar richih avatar rissson avatar robbymilo avatar rperry2174 avatar scottzhlin avatar seamusgrafana avatar simonswine avatar zirain avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phlare's Issues

Zooming in breaks the view

When zooming in chrome the view breaks and the right is hidden

image

I can't click on run queries and I don't fully see the flamegraph

In explore for tempo this is fine though

image

Add top table API

We should add a way to query for top table I suggest for now we do this in computation in the datasource and add it to the frames.

This should produce an array of self/total per symbols including root.

Build a basic UI

The basic UI should show:

  • timeseries of the sum of values by labels set.
  • flamegraph: the merge stackaces as a by default over the timerange

Each point within the timeseries should allow to see a sigle point in time profile as a flamegraph.

Top table visualization

Top tables are an important part of profile visualisation, We should definitively add a way to open a persistent drawer to see the top symbols by ordered by top %self or %total.

Related backend work #172

We should to always keep full visibility if possible of the flamegraph by resizing it this way we can select top table symbols and highlight the flamegraph. In the case resizing the flamegraph is not possible if the screen is too small then replacing the visualisation will be done.

Example from Pyroscope

image

Intern stacktraces labels

Stacktraces labels account for a big part of the in-memory usage whereas currently they are actually every-time the same.

see

image

We should find a way to reuse the pointer instead of creating a new one every time.

Flamegraph colouring is wrong if based on self time

The current colouring is focusing on the total of nodes but not the self making it actually upside down as opposed to what is expected.

image

Expected from pprof

image

In a node there's always 2 values, the total and the self, the total includes the self + all children (self).

What's interesting in pprof is that they actually do that per function, in the example you can see some self of main.fibhandler are small but still in red.

I think it's important to get the coloring right since this is what catches the attention to the user.

https://www.brendangregg.com/blog/2017-07-30/coloring-flamegraphs-code-type.html is a really good read before tackling this issue.

Add license headers

We need a tool to automatically check and apply OSS license for the project, it should be accessible via the Makefile.

Histrogram/Series Panel

We need a way to show the user the variation over time for the current query, this allows them to then drill down to the right range they are interested into.

Backend API PR: #160

This should be on top of the flamegraph and if possible reusing the grafana series panel.

Unlike pyroscope I'd like us to try to avoid bar but instead default to lines like for timeseries in the graph panel and then allow to swap with bar,point,....

image

image

The panel should provide:

  • the ability to have a sense of the value and variation using y axis labeling and may be even a title.
  • the ability to zoom in and out via selection and change the timerange of explore.
  • Select via dropdown labels name to group by (see the API)
  • Handle gracefully if there is too many series returned.
  • Select and highlight a timeseries
  • Add a new label selector based on a selected series in the query

Store Total value for each profiles

It seems cheap to save into the Profile schema the total value for each profiles.

This would make it simple for building histogram. Specially with parquet we could load that column only when needed.

Remove stacktrace samples with values of 0

When reading pprof a lot of stacktrace samples contains values of zero and are forcing us to use more resources on the read/write path.

I suggest we remove those in the distributors before pushing to ingesters.

Flamegraph Node Popup

When hovering over a flamegraph node we should present to the user a popup that contains more details about the current node such as:

  • the full symbol name
  • the total and self amount in the right sample type.
  • The percentage of both
  • A way to copy the symbol name and highlight other node with the same name.

Example from pyroscope:

image

Support Parca API.

The datasource could detect if this is a Fire or Parca datasource in which case it could use a different API to fetch data.

[Epic] Fire Datasource imlementation

Initial implementation of the fire datasource.

  • Implement basic querying support #144 #148
  • Implement autocomplete for the editor for labels/values #155
  • Changing the dataFrame format to remove need for json strings in dataframe #215
  • Support query for visual histogram of profile samples
  • Table view data
  • Streaming query support
  • Visual query builder [TBD]
  • Profile diff query [TBD]

Storing Memory profile more efficiently

The pprof memory profiles is different compare to other profiles as it contains all allocations since the beginning, plus the current in use heap. This means the profiles gets bigger over time and we're currently storing duplicate data.

Instead of storing the whole profile every-time we actually should diff allocations (bytes+count) and store only that. My first reaction was that we should do that in the client and only send the diff. But if the client is restarting or rolling often then it won't be able to send the diff.

So I'm suggesting that:

  • First, we implement a diff on the ingester side using the last seen profile for that label set and only store the diff. (Diff memory profiles #124
    )
  • Clean up periodically samples that are not seen anymore. see comment
  • Then, we also implement a diff on the client side, the client side diff will be contains a specific label when computed (e.g __name__="memory_diff"), when the ingester spot that label he won't compute the diff and store directly the diff.

I think we can leave the client side for later as we're unsure what we will do in the future.

Create a helm chart

the helm chart should only deploy fire as a single binary (target=all) with PVC

Ingester service don't need push

We could actually just implement the Push service and register it on the ingester side.

This will avoid multiple push definitions and make the proto linter happy

Flamegraph font and text

I think we should use a monospace font for the flamegraph. Right now it's Roboto. We could swap it to Roboto Mono ?

Roboto:

image

Roboto Mono

image

May be that means decreasing the font-size too ?

With regards to the text I think we should also include % and total of the node in its respective sample type like pyroscope

image

Add the docker Image and the CI

  • The docker image should default to single binary.
  • Add the necessary Makefile command build and push the image.
  • Hook with drone.grafana.net

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.