Skip to content

[FEATURE] pyroscope: migrate profile queries to the Connect API - #763

Open
luweglarz wants to merge 1 commit into
perses:mainfrom
luweglarz:pyroscope-connect-api-migration
Open

[FEATURE] pyroscope: migrate profile queries to the Connect API#763
luweglarz wants to merge 1 commit into
perses:mainfrom
luweglarz:pyroscope-connect-api-migration

Conversation

@luweglarz

@luweglarz luweglarz commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Description

/render is documented as Pyroscope's legacy HTTP API: https://grafana.com/docs/pyroscope/latest/reference-server-api/#querying-profile-data

This PR is to migrates the Pyroscope plugin's profile queries from the legacy GET /pyroscope/render
endpoint to Pyroscope's Connect API that is decoupled in 2 endpoints:

this brings profile querying in line with the rest of the pyroscope-client, which already used Connect for profile types, label names, and label values.

  • The request is now split into two parallel calls instead of one.
  • ProfileData's shape returned to the panel is unchanged, so FlameChartPanel and itssubcomponents needed no changes.
  • Added test coverage for getProfileData itself (previously untested), covering request
    building, the time-range fallback, and response assembly.

Checklist

  • Pull request has a descriptive title and context useful to a reviewer.
  • Pull request title follows the [<catalog_entry>] <commit message> naming convention using one of the
    following catalog_entry values: FEATURE, ENHANCEMENT, BUGFIX, BREAKINGCHANGE, DOC,IGNORE.
  • All commits have DCO signoffs.

@luweglarz
luweglarz requested a review from a team as a code owner July 31, 2026 16:02
@luweglarz
luweglarz requested review from jgbernalp and removed request for a team July 31, 2026 16:02

@Gladorme Gladorme left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice change. Just a issue with series chart time axis

Comment thread pyroscope/src/model/pyroscope-client.ts Outdated
params: T | null,
queryOptions: QueryOptions,
body: Record<string, string | number>
body: object

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
body: object
body: Record<string, unknown>

};
}

export function transformTimeline(series: Series[] | undefined, fallbackStepSeconds: number): ProfileData['timeline'] {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is wrong with timeline. It is not respecting selected time range.

Before:

Image

Now:

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image fixed

@luweglarz
luweglarz force-pushed the pyroscope-connect-api-migration branch 3 times, most recently from 7eae6db to 2b2f16f Compare August 18, 2026 19:23
Signed-off-by: luweglarz <lucas.weglarz@amadeus.com>
@luweglarz
luweglarz force-pushed the pyroscope-connect-api-migration branch from 700df68 to 10e5284 Compare August 18, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants