[FEATURE] TimeSeriesChart: add Exemplars support - #800
Open
julianocosta89 wants to merge 6 commits into
Open
Conversation
julianocosta89
requested review from
a team and
AntoineThebaud
as code owners
September 7, 2026 13:13
julianocosta89
requested review from
Gladorme
and removed request for
a team
September 7, 2026 13:13
This was referenced Sep 7, 2026
julianocosta89
force-pushed
the
exemplars/3445-timeserieschart
branch
from
September 8, 2026 07:30
9b8d214 to
dbcf163
Compare
…t method
Add an optional `exemplars: { enable: boolean }` section to the
PrometheusDatasource spec, exposed in the datasource editor as a
toggle and validated by the CUE schema.
Add a `queryExemplars` method to the Prometheus client hitting
GET /api/v1/query_exemplars with the same query parameters and
authentication handling as the other API calls. The endpoint is also
added to the default proxy allowedEndpoints list.
Related to perses/perses#3445
Signed-off-by: Juliano Costa <juliano.costa@datadoghq.com>
When the selected datasource has exemplars enabled in its spec and the query runs in range mode, fire a query_exemplars request alongside the range query (same PromQL and time range, in parallel) and attach the converted exemplar data to the returned TimeSeriesData. Exemplar timestamps are converted from seconds to ms and values are parsed as numbers. A failing exemplar request never breaks the panel: the error is logged and the query result is returned without exemplars. Related to perses/perses#3445 Signed-off-by: Juliano Costa <juliano.costa@datadoghq.com>
julianocosta89
force-pushed
the
exemplars/3445-timeserieschart
branch
2 times, most recently
from
September 8, 2026 12:08
2d80f3b to
f86d682
Compare
Contributor
|
Please add a screenshot to your PR desc 🙏 |
Exemplars render as diamond scatter series on top of their matching series, inheriting the series color and y axis; only series visible in the legend get markers. Hovering a diamond shows the ExemplarMetadataTooltip from @perses-dev/components (series labels, exemplar labels, value, timestamp) anchored to the chart, and clicking the diamond pins it — clicking it again or elsewhere on the chart unpins it — mirroring the annotation tooltip interaction instead of opening a modal dialog. Signed-off-by: Juliano Costa <juliano.costa@datadoghq.com>
julianocosta89
force-pushed
the
exemplars/3445-timeserieschart
branch
from
September 9, 2026 10:57
f86d682 to
10769bd
Compare
While a tooltip is pinned (line chart or exemplar), the other tooltip type no longer renders in mouse-follow mode on top of it. Clicking a different element type unpins the previous tooltip and pins the new one, so only one tooltip stays pinned at a time; Ctrl/Cmd-click opts into pinning multiple tooltips, consistent with the existing cross-chart behavior. Signed-off-by: Juliano Costa <juliano.costa@datadoghq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part of #3445 (perses/perses#3445). Stacked on #799 — review/merge that one first. Also uses
ExemplarMetadataDialogfrom perses/shared().
Summary
Renders the exemplar data fetched by the Prometheus datasource changes as diamond scatter series on time-series charts, with a metadata dialog on click — Grafana-style, as
discussed in #3445.
Changes
ExemplarMetadataDialogfrom@perses-dev/components(series labels, exemplar labels, value, timestamp) instead of pinning the chart tooltip.prometheus/carried over from the stacked review (redundant type re-exports removed).Out of scope
Trace-linking in the Traces explorer, HeatMapChart rendering (can reuse the shared dialog), hover-tooltip integration — as discussed in #3445.
Testing
deselected series (option captured via a mocked
EChartcomponent since jsdom has no canvas).turbo run type-check/test(30 packages),lint(31),oxfmtclean.Screenshots
See perses/shared#278
Checklist
[<catalog_entry>] <commit message>naming convention using one of thefollowing
catalog_entryvalues:FEATURE,ENHANCEMENT,BUGFIX,BREAKINGCHANGE,DOC,IGNORE.UI Changes