-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat(FlameGraph): Add missing export menu #132
Conversation
…be set on the timeseries data
@@ -0,0 +1,28 @@ | |||
import { Field, Message } from 'protobufjs/light'; | |||
|
|||
export class PprofRequestWithoutMaxNodes extends Message<PprofRequestWithoutMaxNodes> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just renamed it to prevent runtime errors (protobufjs/protobuf.js#1408). This class will be removed very soon because it was used for the legacy comparison pages.
# Conflicts: # src/pages/ProfilesExplorerView/components/SceneAiPanel/infrastructure/useFetchDotProfiles.ts # src/pages/ProfilesExplorerView/components/SceneExploreServiceFlameGraph/SceneFlameGraph.tsx
@@ -14,6 +15,8 @@ export function useExportMenu({ profile, enableFlameGraphDotComExport }: ExportD | |||
const [timeRange] = useTimeRangeFromUrl(); | |||
|
|||
const downloadPng = () => { | |||
reportInteraction('g_pyroscope_export_profile', { format: 'png' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding missing tracking here as well.
I just gave it a quick test: PNG ✅
JSON ✅
PPROF ✅
flamegraph.com ✅
Unsure if the minor PPROF issue I encountered is due to something we are doing or something flamegraph.com is missing but I am leaning towards the latter because |
✨ Description
Related issue(s): solves #104, is blocked by #129
📖 Summary of the changes
Most of the code already existed, this PR just uses it in a new
SceneExportMenu
class.Note that, because the Scenes app uses data frames, but the JSON and the flamegraph.com exports require the Flamebearer format, we have to fetch the Flamebearer profile before being able to proceed to the export.
Ideally, in the near future, we should just convert the data frames to the Flamebearer format without any request to the API.
🧪 How to test?
Manually, by exporting to the 4 different formats and verifying that the data is correct.
For JSON and PPROF, this can be done by uploading them in the AdHoc view (http://localhost:3000/a/grafana-pyroscope-app/ad-hoc) and verify that they match.
Again, very soon, we should automate by adding E2E tests.