The list variable defaultValue was an inline string | []string oneOf,
which downstream codegen can't canonicalize: tfplugingen-openapi rejects
the inline scalar-or-array multi-type, and oapi-codegen has no named type
to attach the union's Marshal/UnmarshalJSON to.
Shape the vendored variable.DefaultValue as the named VariableDefaultValue
oneOf via a reflector InterceptSchema hook and let defaultValue $ref it,
instead of overriding the property inline. Regenerate the OpenAPI spec and
frontend client accordingly.
* chore: baseline setup
* chore: endpoint detail update
* chore: added logic for hosts v3 api
* fix: bug fix
* chore: disk usage
* chore: added validate function
* chore: added some unit tests
* chore: return status as a string
* chore: yarn generate api
* chore: removed isSendingK8sAgentsMetricsCode
* chore: moved funcs
* chore: added validation on order by
* chore: added pods list logic
* chore: updated openapi yml
* chore: updated spec
* chore: pods api meta start time
* chore: nil pointer check
* chore: nil pointer dereference fix in req.Filter
* chore: added temporalities of metrics
* chore: added pods metrics temporality
* chore: unified composite key function
* chore: code improvements
* chore: added pods list api updates
* chore: hostStatusNone added for clarity that this field can be left empty as well in payload
* chore: yarn generate api
* chore: return errors from getMetadata and lint fix
* chore: return errors from getMetadata and lint fix
* chore: added hostName logic
* chore: modified getMetadata query
* chore: add type for response and files rearrange
* chore: warnings added passing from queryResponse warning to host lists response struct
* chore: added better metrics existence check
* chore: added a TODO remark
* chore: added required metrics check
* chore: distributed samples table to local table change for get metadata
* chore: frontend fix
* chore: endpoint correction
* chore: endpoint modification openapi
* chore: escape backtick to prevent sql injection
* chore: rearrage
* chore: improvements
* chore: validate order by to validate function
* chore: improved description
* chore: added TODOs and made filterByStatus a part of filter struct
* chore: ignore empty string hosts in get active hosts
* feat(infra-monitoring): v2 hosts list - return counts of active & inactive hosts for custom group by attributes (#10956)
* chore: add functionality for showing active and inactive counts in custom group by
* chore: bug fix
* chore: added subquery for active and total count
* chore: ignore empty string hosts in get active hosts
* fix: sinceUnixMilli for determining active hosts compute once per request
* chore: refactor code
* chore: rename HostsList -> ListHosts
* chore: rearrangement
* chore: inframonitoring types renaming
* chore: added types package
* chore: file structure further breakdown for clarity
* chore: comments correction
* chore: removed temporalities
* chore: pods code restructuring
* chore: comments resolve
* chore: added json tag required: true
* chore: removed pod metric temporalities
* chore: removed internal server error
* chore: added status unauthorized
* chore: remove a defensive nil map check, the function ensure non-nil map when err nil
* chore: cleanup and rename
* chore: make sort stable in case of tiebreaker by comparing composite group by keys
* chore: added types and constants
* chore: added specs for all component types
* chore: added attrs presence check function
* chore: added onboarding splits
* chore: regen api client for inframonitoring
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: added required tags
* chore: added support for pod phase unknown
* chore: removed pods - order by phase
* chore: improved api description to document -1 as no data in numeric fields
* fix: rebase fixes
* chore: added onboarding api
* chore: renamed method
* chore: get onboarding spec
* chore: simplify
* chore: readability improvement
* chore: added a note from otel
* chore: added a note from otel
* feat(infra-monitoring): v2 pods list apis - phase counts when custom grouping (#11088)
* chore: added phase counts feature
* chore: added queries for pod phase counts in custom group by
* chore: added unknown phase count
* fix: isPodUIDInGroupBy in buildPodRecords
* chore: 3 cte --> 2 cte
* chore: pod phase with local table of time series as counts
* chore: comment correction
* chore: corrected comment
* chore: value column for samples table added
* chore: removed query G for phase counts
* chore: rename variable
* chore: added PodPhaseNum constants to types
* chore: updated comment
* chore: onboarding specs updated to match v2 infra-monitoring apis
* chore: integration tests added
* chore: documentation future links added
* chore: added new metrics existence function + modified return types
* chore: not required parameter removal
* chore: reformatted integration tests
* chore: renamed onboarding -> checks
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
* docs(deploy): restructure migration guide and add Docker Swarm
* docs(deploy): title migration guide for both install script and deploy
* docs: fix the signoz docs troubleshooting guide url
* docs(deploy): point troubleshooting at Slack and Foundry issues
* fix: enable opamp for llmpricing
* fix: test files
* chore: cleanups
* fix: don't deploy to opamp if ff is disabled
* fix: enable spanmapper behild feature flag
* chore: metric_name required checks removed
* refactor(inframonitoring): drop required-metrics test, add test hosts_warnings
* chore: updated integration tests for pods
* chore: updated integration tests for volumes
* chore: updated integration tests for nodes
* chore: updated integration tests for clusters and deployments
* chore: updated statefulsets integration tests
* chore: updated integration tests for jobs and daemonsets
* chore: removed unwanted provisional comments
* test(inframonitoring): dedupe metric-availability warning fixtures, reuse existing datasets
* test(inframonitoring): isolate hosts metric-key-pair warning fixture
Scenario-2 shared host acc-h1 + the accuracy fixture with
test_hosts_value_accuracy, causing a deterministic CI failure (empty
warnings). Restore the dedicated kp-h1 fixture + deployment.environment
groupBy so the warning assertion never depends on data shared with
another test.
* chore: removed unimportant tests for same thing
* test(inframonitoring): drop obsolete metric-key-pair warning scenario
PR #11835 removed the "key X not found on metric" warning from the metric
statement builder (lexer-derived check can't tell a key from a value, so
$variables got false-flagged). The metric_key_pair_not_seen scenario asserted
that now-removed warning, so it fails deterministically after merging main.
Remove the scenario and its orphaned fixture; never-seen-metric coverage
("never been received", still emitted) stays.
* chore: metricName to post body for POST /api/v2/metrics/{metric_name}/metadata
* chore: metricName to query param for GET /api/v2/metrics/{metric_name}/metadata
* chore: added metricName in api get metric attributes
* chore: highlights api modified
* chore: alerts api modified
* chore: dashboards api modified
* chore: description added for metric_name query params
* feat(metrics-explorer): integrate metricName query/body API change in frontend (#11818)
* feat(metrics-explorer): integrate metricName query/body API change in frontend
The metrics-explorer endpoints moved metric_name off the URL path: the
five GETs (attributes, metadata, highlights, alerts, dashboards) now take
a required `metricName` query param, and POST /metadata reads metricName
from the request body.
- Regenerate the orval client from the updated openapi spec, so the GET
helpers build `/api/v2/metrics/<op>?metricName=...` (URL-encoded, so
slashed cloud metric names work) and updateMetricMetadata posts to
`/api/v2/metrics/metadata` with metricName in the body.
- Collapse the useGetMetricAttributes call to the single merged params
object (metricName + start/end).
- Drop the now-removed pathParams wrapper from both updateMetricMetadata
call sites; the payload builders already include metricName in the body.
- Update the Metadata test to assert metricName inside the request body.
* revert(metrics-explorer): drop slashed-metric-name band-aid guards
These two defensive guards were added as temporary workarounds for the
metric_name-with-slash bug (SigNoz/signoz#11527, #11528), which returned
200 + HTML instead of JSON. The root cause is fixed by moving metricName
to a query/body param, so the band-aids are no longer needed and revert
to the original intended code.
- MetricDetails.tsx: `!metricMetadataResponse?.data` -> `!metricMetadataResponse`
- AllAttributes.tsx: `?.data?.attributes` -> `?.data.attributes`
* chore: added description for metricName query params
---------
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
* feat(dashboard-v2): json editor drawer to edit dashboard as raw JSON
Right-side drawer with a Monaco JSON editor (reusing the import-JSON theme),
a Format/Copy/Download/Reset toolbar, live JSON validation, and Apply via the
full-document updateDashboardV2 endpoint. Cmd/Ctrl+Enter applies; Esc closes.
* feat(dashboard-v2): grouped actions menu with clone, new section & edit-as-JSON
Regroup the actions dropdown into labelled Dashboard/Data/Layout groups, add
Clone dashboard (cloneDashboardV2 + navigate) and New section (useAddSection),
and surface an Edit as JSON button that opens the JSON editor drawer. The menu
trigger is a labelled "Actions" button with a 9-grid icon; the time selector
moves out of the actions row to the toolbar's second row.
* feat(dashboard-v2): description-on-hover and space-aware tag overflow
Collapse the dashboard description behind an info icon shown on hover, and move
tags inline after the title where they restrict to the available width and
collapse the remainder into a +N badge (reusing the alerts badge measuring).
* refactor(dashboard-v2): two-row toolbar with a floated, expandable variables bar
Second toolbar row floats the time-range selector top-right; the variables bar
flows beside it, collapsing to a single line with an inline +N trigger that hugs
the last visible pill. Expanding clears the float so the pills pack full-width
on the lines beneath the time selector (no stair-stepping). Overflow pills are
display:none but stay mounted (widths cached) so auto-selection and option
fetching keep driving the panels. Also centre the variable info icon, give the
pills a visible --l3-border (and drop the single-select's stray inner border so
it matches), and replace the toolbar's fuzzy drop shadow with a token hairline.
* feat(dashboard-v2): section title modal & scroll to the new section
New section now opens a title-entry modal instead of inserting a default-named
section, and the view scrolls the freshly created section into view once the
refetch renders it. Generalise the rename modal into a shared SectionTitleModal
reused by both create and rename.
* test(dashboard-v2): cover the JSON editor hook and drawer
useJsonEditor: seeding, live validation, format/reset, dirty tracking, apply
(no-op when clean/invalid, PUTs the narrowed body, error handling) and re-seed
on re-open. JsonEditorDrawer: toolbar/footer wiring, validation text, Apply
enablement, editor changes and Cmd/Ctrl+Enter — with Monaco and the hook mocked.
* refactor(dashboard-v2): extract generic useInlineOverflowCount hook
Address review on the variables bar: generalise the single-line overflow
measurement into hooks/useInlineOverflowCount (container of data-overflow-item
children, with gap/reserveWidth/enabled options) so it's reusable elsewhere, and
clarify the internal variable names (container/itemWidths/availableWidth/etc.).
* refactor(dashboard-v2): use descriptive names in useInlineOverflowCount
Replace single-letter/abbreviated locals (el, i, w, width/widths) with
itemElement/index/itemWidth/cachedWidth(s) inside the measure loop.
* feat(authz): add transaction group schema and validations
* fix(authz): drop constant errorFormat param from wrapValidationError
unparam flagged wrapValidationError's errorFormat parameter since all
call sites passed the same "%s: %s". Inline the format and trim the
argument at each call site. No behavior change.
* feat(authz): better error handling
* chore(authz): suffix generated web settings schema with .schema.json
Rename webSettings.json to webSettings.schema.json to follow the JSON
Schema file-naming convention and match transactionGroups.schema.json.
Updates the generator output path, the json2ts input + banner in
package.json, and the generated banner comment.
* feat(authz): add schema titles
selectVariableValues returned an inline `{}` fallback whenever a dashboard had
no stored selections. Zustand reads selectors through useSyncExternalStore,
which compares snapshots with Object.is, so a fresh object every call reads as a
perpetually-changed snapshot and React re-renders without end ("Maximum update
depth exceeded").
This surfaced specifically on fresh/empty dashboards: when a dashboard has
variables, the seeding effect in useVariableSelection populates the store with a
stable object and the loop never starts; with no variables that effect
early-returns, the entry stays undefined, and the selector mints a new `{}` on
every render. VariablesBar renders null in that case, but its hook still
subscribes, so the loop fires anyway.
Return a single module-level empty map so the snapshot is referentially stable.
* feat(dashboard-v2): variable model, adapters, validation & cycle detection
* feat(dashboard-v2): variable editor building-block components
* feat(dashboard-v2): variable form with type tabs & per-type fields
* feat(dashboard-v2): variables list with drag reorder & inline delete
* refactor(dashboard-v2): migrate variables bar to the overhauled model
* feat(dashboards-v2): panel query hook with pagination and time window
* refactor(dashboards-v2): trim comment noise and use JSDoc for function docs
Reduce over-commenting flagged in review across the V2 dashboard code:
remove comments that restate the code, shrink verbose blocks to a line, and
keep only the non-obvious "why". Function/helper docs are written as JSDoc;
inline implementation notes stay as line comments.
* fix(dashboards-v2): harden list pagination against bad inputs
Clamp the page size and offset to finite, positive values before deriving
pageIndex/canNext so the pager can never produce NaN/Infinity/negative state,
and ignore a non-positive setPageSize so the size state stays valid. canNext
now uses `rowCount >= pageSize` to also cover an over-fetch.
Add edge-case tests: empty/non-raw response, full vs partial page, nextCursor,
goNext advancing the page, and a rejected zero page size.
* feat(dashboards-v2): config pane shell with reusable form controls
* feat(dashboards-v2): chart panel section editors
* feat(dashboards-v2): thresholds section editor with per-variant rows
* refactor(dashboards-v2): address config-pane review feedback
- Drop unnecessary optional chaining on the always-present panel spec
(display / plugin / data); type the formatting cast via PanelFormattingSlice.
- Rename the section-lens read/write to get/update (+ slice helpers).
- Derive the histogram NumericBound from the buckets DTO.
- Use userEvent (via tests/test-utils) in the Axes/Buckets/Thresholds tests.
- Use the SigNoz Button for the legend-color Reset action.
* feat(dashboards-v2): table panel (#11771)
* feat(dashboards-v2): table panel renderer with record-table prep
* feat(dashboards-v2): resizable, persisted table columns
* fix(dashboards-v2): keep clickhouse table columns distinct
A scalar/table panel backed by a clickhouse_sql query collapsed every value
column onto the query name: getColName/getColId had no clickhouse handling,
so all value columns resolved to the query name ("A") and the row builder
overwrote each cell with the last column's value.
clickhouse_sql queries carry no aggregation metadata but the response column
holds the user's real SQL alias in col.name. Thread the request's
clickhouse_sql query names through, and name/key those columns by col.name so
each stays distinct. Ports the V2 half of the merged V1 fix (#11794).
* feat(dashboard-v2) - list panel (#11766)
* feat(dashboards-v2): prepare V5 raw tables for the list panel
* feat(dashboards-v2): list panel kind (logs/traces) with row detail
* feat(dashboards-v2): list columns editor with datasource column switch
* feat(dashboards-v2): move list columns editor below the query builder
Replace the config-pane Columns section with a dnd-kit reorderable editor
rendered beneath the query builder (V1 parity); sanitize selectFields to the
field-key DTO so saved columns drop non-contract keys (isIndexed).
* style(dashboards-v2): format list panel header with oxfmt
* refactor(dashboards-v2): address list-panel PR review feedback
- type the telemetry signal as TelemetrytypesSignalDTO (enum) and drop the
raw-string comparisons across the list panel renderer, columns, row
interaction, prep util, and the columns-switch hook
- make prepareRawTable's selectFields a required array; make the log
drawer's selectedTab always defined (defaults to OVERVIEW)
- read/write the list spec via spec.plugin.spec (plugin is non-optional)
- move isPlainObject (lodash) / coerceToString / toFiniteNumber out of
rawRowToILog into shared utils
- replace the columns editor's hand-built popover + native buttons with
@signozhq/ui Button and a searchable Combobox
- switch ListColumnsEditor tests to userEvent; trim verbose comments
* refactor(dashboards-v2): de-duplicate panel cell + column-unit helpers
- collapse the per-panel stringifyCell copies onto the shared coerceToString
util (list + table column builders)
- extract the column-unit resolver to Panels/utils/getColumnUnit; the table
renderer and the editor's column options now share one implementation,
aligning the editor onto the renderer's "empty entry = no unit" semantics
- export a single TableRowData type from tableColumns (with the antd key)
instead of two divergent local copies
* refactor(dashboards-v2): clean up comments across ListPanel components
* fix(dashboards-v2): drop duplicated list-pagination test block
The `describe('list pagination')` block in usePanelQuery.test.tsx was
duplicated byte-for-byte, tripping oxlint sonarjs(no-identical-functions)
on the repeated rawResponse/withResponse helpers and failing lint CI.
* feat(dashboards-v2): pure-V5 perses query adapter and request builder
* feat(dashboards-v2): panel query hook with pagination and time window
* refactor(dashboards-v2): per-kind panel definitions and registry
* feat(dashboards-v2): role and kind-gated panel actions with header chrome
* feat(dashboards-v2): panel editor route with live preview and query builder
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix(dashboards-v2): make the editor dirty-check immune to query re-serialization
* fix(dashboards-v2): persist raw/list panels as a bare BuilderQuery
* feat(dashboards-v2): optional footer slot below the query builder
* refactor(dashboards-v2): render the editor preview through the shared panel body
The editor preview duplicated PanelBody's loading/error/renderer state
machine. Delegate to PanelBody so the preview is the production render
path, differing only by panelMode (DASHBOARD_EDIT) and the forwarded
server pager. PanelBody's panelMode and dashboardPreference become
optional (the preview has no dashboard-wide preferences), and its error
state now surfaces the backend message via panelStatusFromError instead
of the raw axios "status code 4xx".
* feat(dashboards-v2): richer panel status popover for errors and warnings
Replace the plain status tooltip with a card: variant-coloured icon, the
error/warning code and message, an optional Open Docs link, a MESSAGES
count pill, and the per-item message list. Hosted in @signozhq/ui
TooltipSimple with its padding/width cap stripped so the card owns its
own layout. Bump the header actions gap so the status icon sits clear of
its neighbours.
* refactor(dashboards-v2): address panel-editor foundation PR review
- fix failing lint: drop the unused Typography import in PanelStatusContent
- drop redundant optional chaining on the required spec/plugin (usePanelQuery,
PanelEditor index, HistogramPanel sections)
- move ComparisonThresholdShape into types/threshold
- derive PanelActionId from keyof PanelActionCapabilities
- fold the per-kind header search flag into actions (drop PanelHeaderControls)
- default PanelHeader searchTerm to ''
- drive the editor's discard prompt through useConfirmableAction
- trim over-verbose comments; PanelHeader test uses userEvent
* refactor(dashboards-v2): trim comment noise and use JSDoc for function docs
Reduce over-commenting flagged in review across the V2 dashboard code:
remove comments that restate the code, shrink verbose blocks to a line, and
keep only the non-obvious "why". Function/helper docs are written as JSDoc;
inline implementation notes stay as line comments.
* fix(dashboards-v2): harden list pagination against bad inputs
Clamp the page size and offset to finite, positive values before deriving
pageIndex/canNext so the pager can never produce NaN/Infinity/negative state,
and ignore a non-positive setPageSize so the size state stays valid. canNext
now uses `rowCount >= pageSize` to also cover an over-fetch.
Add edge-case tests: empty/non-raw response, full vs partial page, nextCursor,
goNext advancing the page, and a rejected zero page size.
* refactor(dashboards-v2): localize the perses adapter's envelope casts
The adapter bridges the generated query-envelope DTO (enum type, undiscriminated
spec) and the hand-written QueryEnvelope (typed spec) the V1 mappers consume —
nominally distinct types for the same wire shape, so a structural cast is
unavoidable. Confine those casts to two named `*Envelopes` converters and a
builder-query predicate, keep an explicit typed checkpoint for the composite
spec, and correct the stale "Orval erases spec to unknown" comments.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(user): accept custom roles in user invite
* feat(user): use binding package
* feat(user): more domain restrictions
* feat(user): use suggestions
* feat(user): use suggestions
* feat(user): use pointer postable role
* feat(dashboard-v2): add persisted views store, types, and filter-query helpers
* feat(dashboard-v2): add filter state hook and filter zone
* feat(dashboard-v2): add views rail with save and dirty-state flow
* feat(dashboard-v2): add list status bar with rail collapse
* feat(dashboard-v2): add favorites and recently-viewed to dashboard rows
* feat(dashboard-v2): add persisted visible-columns store
* feat(dashboard-v2): add tabbed new-dashboard modal (blank / template / import)
* feat(dashboard-v2): full-width skeleton loading state
* feat(dashboard-v2): compose views, filters, and inline metadata into the list page
* chore(dashboard-v2): remove superseded create dropdown and standalone modals
* feat(dashboard-v2): add duplicate (clone) action to dashboard rows
* refactor(dashboards-v2): move toPostableTags to utils next to its inverse
* refactor(dashboards-v2): use signoz Button for view rows & delete action
* refactor(dashboards-v2): rename filterStatesEqual to areFilterStatesEqual
* fix(dashboard): clickhouse table panel collapses value columns onto query name
A table/scalar panel backed by a ClickHouse SQL query rendered every
aggregation column with the header "A" (the query name) and the same value in
each, while only the group columns (e.g. service.name) showed correctly.
Root cause: the scalar-response column-naming utils derive a value column's
display name and row-data key from request-side aggregation metadata, which
only exists for builder_query envelopes. A clickhouse_sql query has none, so
getColName/getColId fell through to the query name for every value column.
Sharing one id ("A") collapsed all value columns onto a single row key, so the
last column written (total_requests) overwrote the rest.
The backend already returns correct data: readAsScalar names each ClickHouse
SELECT column with its real SQL alias and a unique aggregationIndex. This is a
frontend-only consumption fix.
Fix: when a column belongs to a clickhouse_sql query (determined from the
request's query type, not a name heuristic), name and key it by the response
column's real SQL alias. Builder queries are unchanged; formulas/promql keep
the legend || queryName fallback. Applied to both the V1 converter
(convertV5Response.ts, the live table-panel path) and the V2 path
(prepareScalarTables.ts).
* chore: minor type fix
* feat(authz): add unified role APIs
* feat(authz): update openapi spec
* feat(authz): restructure the chunked write to the openfga server
* feat(authz): fix the order for minimal gitdiff
* feat(authz): update openapi spec
* feat(authz): fix the create API
* feat(authz): better error messages
* refactor(sidenav): add support for routes with ?key=value
* refactor(channels): move to be under alerts
* test(private): add test to cover redirects of channels
* chore(codeowners): move channels to pulse frontend
* chore(sidenav): add todo to remove the menu from sidebar
* test(jest): add transform ignore due to import of react-markdown
* test(ai-assistant): fix redirect link of notification channels
* chore: send warning instead of error for unseen metrics and missing (metric, key)
* chore: update integration test
* chore: fix integration test
* chore: fix test
* chore: add unit test for missing key
* chore: deployments -> add default namespace group by
* chore: added integration tests for statefulsets
* chore: namespace group by for jobs
* chore: namespace group by for daemonsets
* chore: added group by clustername for all workloads and integration tests for the same
* chore: fix py fmt for integration tests
* chore: added group by namespace, cluster for pvcs
* chore: added cluster name default group by for namespaces monitoring
* feat(dashboard-v2): redesign public dashboard publish drawer
Rework the Publish tab to the status-strip design (Claude Design handoff):
- a status strip with a lock/globe medallion, plain-language line and a
Private/Public badge
- a public-link field shown in both states — a dashed placeholder while
private, the live URL with copy / open actions once published
- an "Enable time range" switch + default-range select, and a quiet inline
variables caveat
- actions grouped in a footer (Publish / Unpublish + Update)
Split each piece into its own folder with a co-located *.module.scss, drop the
dead time-range constants in favour of the shared RelativeDurationOptions, and
render the range dropdown without a portal (z-index + trigger width) so it shows
correctly inside the settings drawer.
* feat(dashboard-v2): fetch public dashboard meta once, globally
Move the public-sharing GET out of the publish drawer: a shared
usePublicDashboardMeta hook (keyed by dashboard id, license-gated, kept warm via
staleTime) owns the request, the toolbar mounts it with the dashboard to drive the
public-access badge, and the drawer's usePublicDashboard reads the same cache
instead of issuing its own call. Mutations invalidate the key so all consumers
refresh together.
Also rename the variables Callout to Hint, and drop redundant font-family: Inter /
font-weight: 400 from the publish-drawer styles (Inter is the inherited default).