* 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: regen api client for inframonitoring
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: added phase counts feature
* chore: added queries for pod phase counts in custom group by
* 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 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
* 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: nodes list v2 full blown
* chore: metadata fix
* chore: updated comment
* chore: namespaces code
* chore: v2 nodes api
* chore: rename
* chore: v2 clusters list api
* chore: namespaces code
* chore: rename
* chore: review clusters PR
* chore: pvcs code added
* chore: updated endpoint and spec
* chore: pvcs todo
* chore: added condition
* chore: added filter
* chore: added code for deployments
* chore: query nit
* chore: statefulsets code added
* chore: base filter added
* chore: added base deployments change
* chore: added base condition
* chore: v2 jobs list api added
* chore: added pod phase counts
* chore: for pods and nodes, replace none with no_data
* chore: node and pod counts structs added
* chore: namespace record uses PodCountsByPhase
* chore: cluster record uses PodCountsByPhase, NodeCountsByReadiness
* chore: deployment record uses PodCountsByPhase
* chore: statefulset record uses PodCountsByPhase
* chore: job record uses PodCountsByPhase
* chore: metrics existence check
* chore: statefulset metrics added
* chore: added jobs metrics
* chore: added metrics
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
* fix: dangling AND in parenthesized filter expression
* fix: duplicate variable name via drilldown unguarded
* fix: resolved few fixes
* fix: scope variable expression removal to comparison values
* fix: resolved the comments
* fix: updated more tests
* test: new playwright project to seed data
* test: add teardown bits
* test: move from fixtures to seeder
* test: format file
* test: format file + update lockfile
* 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: regen api client for inframonitoring
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: added phase counts feature
* chore: added queries for pod phase counts in custom group by
* 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 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
* 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: nodes list v2 full blown
* chore: metadata fix
* chore: updated comment
* chore: namespaces code
* chore: v2 nodes api
* chore: rename
* chore: v2 clusters list api
* chore: namespaces code
* chore: rename
* chore: review clusters PR
* chore: pvcs code added
* chore: updated endpoint and spec
* chore: pvcs todo
* chore: added condition
* chore: added filter
* chore: added code for deployments
* chore: query nit
* chore: statefulsets code added
* chore: base filter added
* chore: added base deployments change
* chore: added base condition
* chore: added pod phase counts
* chore: for pods and nodes, replace none with no_data
* chore: node and pod counts structs added
* chore: namespace record uses PodCountsByPhase
* chore: cluster record uses PodCountsByPhase, NodeCountsByReadiness
* chore: deployment record uses PodCountsByPhase
* chore: statefulset record uses PodCountsByPhase
* chore: metrics existence check
* chore: statefulset metrics added
* chore: availablePods -> renamed to currentPods
* chore: restored to main
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
* fix(alerts): invalidate rule cache after disable/enable toggle
The toggle calls patchRulePartial but never invalidated the
useGetRuleByID react-query cache. With refetchOnMount disabled on
the edit page, saving the form sent back the stale disabled value
and reverted the toggle.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* reuse existing function to invalidate rule cache
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
* feat(authz): enable multi role assignment for members page
* feat(authz): enable multi role assignemnt for users
---------
Co-authored-by: vikrantgupta25 <vikrant@signoz.io>
* 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: regen api client for inframonitoring
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: added phase counts feature
* chore: added queries for pod phase counts in custom group by
* 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 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
* 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: nodes list v2 full blown
* chore: metadata fix
* chore: updated comment
* chore: namespaces code
* chore: v2 nodes api
* chore: rename
* chore: v2 clusters list api
* chore: namespaces code
* chore: rename
* chore: review clusters PR
* chore: pvcs code added
* chore: updated endpoint and spec
* chore: pvcs todo
* chore: added condition
* chore: added filter
* chore: added code for deployments
* chore: query nit
* chore: added base deployments change
* chore: added base condition
* chore: added pod phase counts
* chore: for pods and nodes, replace none with no_data
* chore: node and pod counts structs added
* chore: namespace record uses PodCountsByPhase
* chore: cluster record uses PodCountsByPhase, NodeCountsByReadiness
* chore: deployment record uses PodCountsByPhase
* chore: metrics existence check
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
* feat: span details init
* feat: span details header
* feat: details field component
* feat: added span percentile
* feat: key attr section added
* feat: added pretty view
* feat: update yarn lock
* feat: minor change
* feat: search in pretty view
* feat: refactor
* feat: style fix
* feat: json viewer with select dropdown added
* feat: span details floating drawer added
* feat: span details folder rename
* feat: replace draggable package
* feat: fix pinning. fix drag on top
* feat: add bound to drags while floating
* feat: add collapsible sections in trace details
* feat: use resizable for waterfall table as well
* feat: copy link change and url clear on span close
* feat: fix span details headr
* feat: key value label style fixes
* feat: linked spans
* feat: style fixes
* feat: setup types and interface for waterfall v3
v3 is required for udpating the response json of
the waterfall api. There wont' be any logical change.
Using this requirement as an opportunity to move
waterfall api to provider codebase architecture from
older query-service
* refactor: move type conversion logic to types pkg
* chore: add reason for using snake case in response
* fix: update span.attributes to map of string to any
To support otel format of diffrent types of attributes
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* refactor: convert waterfall api to modules format
* chore: add same test cases as for old waterfall api
* chore: avoid sorting on every traversal
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* fix: rename timestamp to milli for readability
* fix: add timeout to module context
* fix: use typed paramter field in logs
* feat: api integration
* feat: add limit
* feat: minor change
* feat: supress click
* chore: generate openapi spec for v3 waterfall
* feat: fix test
* feat: fix test
* feat: lint fix
* feat: span details ux
* feat: analytics
* feat: add icons
* feat: added loading to flamegraph and timeout to webworker
* feat: sync error and loading state for flamegraph for n/w and computation logic
* feat: auto scroll horizontally to span
* feat: show total span count
* feat: disable anaytics span tab for now
* feat: add span details loader
* feat: prevent api call on closing span detail
* fix: remove timeout since waterfall take longer
* fix: use int16 for status code as per db schema
* fix: update openapi specs
* feat: make filter and search work with flamegraph
* feat: filter ui fix
* feat: remove trace header
* feat: new filter ui
* feat: setup types and interface for waterfall v3
v3 is required for udpating the response json of
the waterfall api. There wont' be any logical change.
Using this requirement as an opportunity to move
waterfall api to provider codebase architecture from
older query-service
* refactor: move type conversion logic to types pkg
* chore: add reason for using snake case in response
* fix: update span.attributes to map of string to any
To support otel format of diffrent types of attributes
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* refactor: convert waterfall api to modules format
* chore: add same test cases as for old waterfall api
* chore: avoid sorting on every traversal
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* fix: rename timestamp to milli for readability
* fix: add timeout to module context
* fix: use typed paramter field in logs
* chore: generate openapi spec for v3 waterfall
* fix: remove timeout since waterfall take longer
* fix: use int16 for status code as per db schema
* fix: update openapi specs
* feat: api integration
* feat: automatically scroll left on vertical scroll
* feat: reduce time
* feat: set limit to 100k for flamegraph
* feat: show child count in waterfall
* fix: align timeline and span length in flamegraph and waterfall
* feat: fix flamegraph and waterfall bg color
* feat: show caution on sampled flamegraph
* feat: api integration v3
* feat: disable scroll to view for collapse and uncollapse
* feat: setup types and interface for waterfall v3
v3 is required for udpating the response json of
the waterfall api. There wont' be any logical change.
Using this requirement as an opportunity to move
waterfall api to provider codebase architecture from
older query-service
* refactor: move type conversion logic to types pkg
* chore: add reason for using snake case in response
* fix: update span.attributes to map of string to any
To support otel format of diffrent types of attributes
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* refactor: convert waterfall api to modules format
* chore: add same test cases as for old waterfall api
* chore: avoid sorting on every traversal
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* fix: rename timestamp to milli for readability
* fix: add timeout to module context
* fix: use typed paramter field in logs
* chore: generate openapi spec for v3 waterfall
* fix: remove timeout since waterfall take longer
* fix: use int16 for status code as per db schema
* fix: update openapi specs
* refactor: break down GetWaterfall method for readability
* chore: avoid returning nil, nil
* refactor: move type creation and constants to types package
- Move DB/table/cache/windowing constants to tracedetailtypes package
- Add NewWaterfallTrace and NewWaterfallResponse constructors in types
- Use constructors in module.go instead of inline struct literals
- Reorder waterfall.go so public functions precede private ones
* refactor: extract ClickHouse queries into a store abstraction
Move GetTraceSummary and GetTraceSpans out of module.go into a
traceStore interface backed by clickhouseTraceStore in store.go.
The module struct now holds a traceStore instead of a raw
telemetrystore.TelemetryStore, keeping DB access separate from
business logic.
* refactor: move error to types as well
* refactor: separate out store calls and computations
* refactor: breakdown GetSelectedSpans for readability
* refactor: return 404 on missing trace and other cleanup
* refactor: use same method for cache key creation
* chore: remove unused duration nano field
* chore: use sqlbuilder in clickhouse store where possible
* feat: dropdown added to span details
* feat: fix color duplications
* feat: no data screen
* feat: old trace btn added
* feat: minor fix
* feat: rename copy to copy value
* feat: delete unused file
* feat: use semantic tokens
* feat: use semantic tokens
* feat: add crosshair
* feat: fix test
* feat: disable crosshair in waterfall
* feat: fix colors
* feat: minor fix
* feat: add status codes
* feat: load all spans in waterfall under limit
* feat: uncollapse spans on select from flamegraph
* feat: style fix
* feat: add service name
* feat: open in new tab
* feat: add trace details header
* feat: add trace details header styles
* feat: add trace details header styles
* feat: minor changes
* feat: floating fields set
* feat: filters init
* feat: filter toggle added
* feat: fix color
* fix: scroll to span in frontend mode
* feat: delete waterfall go
* feat: minor change
* feat: minor change
* feat: lint fix
* feat: analytics spans
* feat: color by field
* feat: save color by pref in user pref
* feat: migrate v2 pinned attr
* feat: preview fields
* feat: minor refactors
* feat: minor refactors
* feat: v3 behind feature flag
* feat: minor refactors
* feat: packages remove
* feat: packages remove
* feat: remove common component
* feat: remove antd component usage
* feat: leaf node indent fix
* feat: fix mouse wheel in json view
* feat: update signoz ui
* feat: remove feature flag
* feat: fixed the waterfall span hover card
* feat: fix hidden filters
* feat: trace details always visible
* feat: correct status code
* fix: pagination calls in waterfall
* feat: fix failing test
* feat: show error count
* feat: fix waterfall child sibling indent
* feat: change how we show span hover data in waterfall
* feat: fix logs in span details styles
* feat: minor fixes
* feat: make trace id copyable
* feat: add status message to highlight section
* feat: persist user choosing old view
* feat: add more fields in color by
* feat: add llm as fast filter
* feat: show api error correctly
* feat: update test cases
* feat: revert route change
* feat: revert route change
* feat: replace antd btns
* feat: allow removing all fields in preview
* feat: send selected span when flamegraph is sampled
* feat: only scroll when span is not in view
* feat: auto expand on highlight errors
* feat: move analytics panel
* feat: additional check
* feat: minor fix
* feat: minor fix
* feat: dont use antd button and tooltip
* feat: dont use antd button and tooltip
* feat: update icons
* feat: minor change
* feat: minor change
* feat: move to zustand
* feat: update test cases
* feat: update border color
* feat: add icons
* feat: support filter on parent keys
* feat: add links to non filterable keys
* feat: minor fix
* feat: use pinned attributes accross views
* feat: update tests
* feat: hide v3
---------
Co-authored-by: Nikhil Soni <nikhil.soni@signoz.io>
* feat: add AI Assistant with interactive blocks for data visualization
* feat: add AI Assistant with interactive blocks for data visualization
* chore: format taglines for better readability in AIAssistantIconPreview
* feat: add AI Assistant action block and speech recognition capabilities
* feat: enhance voice input functionality and integrate streaming chat
* feat: implement message feedback component and enhance message bubble styling
* feat: enhance AI Assistant SSE event handling and markdown rendering
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: implement thread management and feedback submission in AI Assistant
* feat: refactor AI Assistant state management to support per-conversation streaming
* chore: remove unused icons and page
* feat: introduce thinking step and message block structure in AI Assistant
* refactor: update Tooltip imports to use @signozhq/ui across components
* refactor: migrate button components to @signozhq/ui and update styles for consistency
* feat: enhance home header layout with new HeaderRightSection component and updated styles
* refactor: improve code readability and consistency
* feat: integrate AI assistant feature with conditional routing and environment configuration
* feat: update openapi.yml and improve ui
* feat: add character limit warning to ChatInput component
* feat: enhance AI Assistant button with pending user input badge and styles
* feat: implement conversation archiving and restoration functionality in AI Assistant
* feat: streamline AI Assistant UI components and improve styles
* feat: add MessageContext interface and enhance message sending functionality in AI Assistant
* feat: update AI Assistant styles and components to use new icon library and improve layout
* feat: move to css modules
* feat: enhance AI Assistant with new API integration and UI components
* refactor: update AIAssistant components to use Button from Signoz UI and enhance styling
* refactor: simplify action handling and enhance streaming message indicators
* refactor: improve loading indicators in HistorySidebar component
* refactor: enhance ConversationView loading state and improve action key stability
* refactor: implement AIAssistant axios instance and enhance SSE authentication handling
* refactor: support auto-derived contexts and enhance diff display functionality
* refactor: enhance ChatInput component with improved overflow handling and context fetching logic
* refactor: enhance AIAssistantModal and ConversationItem components with improved key handling and UI
* refactor: streamline Spinner component and update ChatInput styles for improved UI consistency
* feat: implement push-to-talk functionality in ChatInput for improved voice interaction
* feat: add edit and resend functionality to user messages in ConversationView and ChatInput
* feat: implement AI Assistant UI components for enhanced user interaction
* feat: improve tool call instance rendering
* feat: add accessibility attributes and feedback buttons to HeaderRightSection
* chore: update openapi.yaml with improved formatting and structure for API documentation
* feat: enhance AI Assistant components with new enums, improved clarification handling, code block
* refactor: remove edit and resend functionality, streamline message handling
* refactor: remove AI backend URL from environment variables
* refactor: update styles and structure for MessageBubble, ThinkingStep, and ToolCallStep components
* feat: enhance conversation item and history sidebar with search functionality and dropdown actions
* feat: update AI Assistant UI components with new icons
* feat: add displayText property to ToolCallBlock
* feat: implement message regeneration functionality in AI Assistant
* feat: pass comment for negative feedback
* fix(frontend): position chat support around AI assistant
* feat: add SigNoz URL header to AI Assistant requests for multi-tenant support
* feat: add header actions to TraceDetailV2 for sharing and feedback
* chore: remove hardcoded url
* fix: skip custom AI block markers in language validation script
* feat: implement AI API instance with request/response interceptors
* feat: enhance AI Assistant conversation handling with hydration state
* feat: implement SSE backoff strategy and error handling in AI Assistant
* refactor: update color variables in AI Assistant styles for consistency and improved theming
* chore: increase margin for title in Block component for improved spacing
* chore: fmt
* feat: use default domain url for X-SigNoz-URL
* refactor: simplify AIAssistant enabled state management across components
* refactor: replace HistorySidebar with ConversationsList component in AIAssistant
* feat: improve css
* feat: enhance voice input functionality with microphone permission handling
* feat: add rule to enforce subpath imports for @signozhq/ui components
* fix: renameConversation requires reload to render
* refactor: update imports for @signozhq/ui components to use subpath imports
* refactor: adjust imports for @signozhq/ui components to use specific subpath imports
* chore: remove temp files
* chore: remove temp files
* chore: move types to ai assistant folder
* chore: remove unused chart blocks from AI assistant
Removes BarChart, LineChart, PieChart, and Timeseries block components
along with the shared chartSetup and Chart.module.scss. These rendered
hex-color literals outside the design-token system and weren't being
emitted by any current response flow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: update header button color to use accent primary
* chore: remove the rule files
* chore: remove react chartjs
* refactor: replace hardcoded radius values with CSS variables
* chore: use css variable
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: makeavish <makeavish786@gmail.com>
* fix: style fix
* fix: update color
* feat: bg color for selected and hover spans
* feat: remove unnecessary props
* feat: minor comment added
* feat: add test cases for flamegraph
* feat: add test utils
* feat: waterfall init
* feat: decouple waterfall left (span tree) and right (timeline bars) panels
Split the waterfall into two independent panels with a shared virtualizer
so deeply nested span names are visible via horizontal scroll in the left
panel. Left panel uses useReactTable + <table> for future column
extensibility; right panel uses plain divs for timeline bars. A draggable
resize handle separates the two panels.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add TimelineV3 ruler to waterfall header with padding fix
Add the TimelineV3 component to the sticky header of the waterfall's
right panel so timeline tick marks are visible. Add horizontal padding
to both the timeline header and span duration bars to prevent label
overflow/clipping at the edges.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: match span style
* feat: fix hover option overflow
* feat: span hover popover sync
* feat: row based flamegraph
* feat: subtree segregated tree
* feat: subtree segregated tree
* feat: subtree segregated tree
* feat: move to service worker
* feat: connector line ux
* feat: event dots in trace details
* feat: waterfall resizable
* feat: span details init
* feat: span details header
* feat: details field component
* feat: added span percentile
* feat: key attr section added
* feat: added pretty view
* feat: update yarn lock
* feat: minor change
* feat: search in pretty view
* feat: refactor
* feat: style fix
* feat: json viewer with select dropdown added
* feat: span details floating drawer added
* feat: span details folder rename
* feat: replace draggable package
* feat: fix pinning. fix drag on top
* feat: add bound to drags while floating
* feat: add collapsible sections in trace details
* feat: use resizable for waterfall table as well
* feat: copy link change and url clear on span close
* feat: fix span details headr
* feat: key value label style fixes
* feat: linked spans
* feat: style fixes
* feat: setup types and interface for waterfall v3
v3 is required for udpating the response json of
the waterfall api. There wont' be any logical change.
Using this requirement as an opportunity to move
waterfall api to provider codebase architecture from
older query-service
* refactor: move type conversion logic to types pkg
* chore: add reason for using snake case in response
* fix: update span.attributes to map of string to any
To support otel format of diffrent types of attributes
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* refactor: convert waterfall api to modules format
* chore: add same test cases as for old waterfall api
* chore: avoid sorting on every traversal
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* fix: rename timestamp to milli for readability
* fix: add timeout to module context
* fix: use typed paramter field in logs
* feat: api integration
* feat: add limit
* feat: minor change
* feat: supress click
* chore: generate openapi spec for v3 waterfall
* feat: fix test
* feat: fix test
* feat: lint fix
* feat: span details ux
* feat: analytics
* feat: add icons
* feat: added loading to flamegraph and timeout to webworker
* feat: sync error and loading state for flamegraph for n/w and computation logic
* feat: auto scroll horizontally to span
* feat: show total span count
* feat: disable anaytics span tab for now
* feat: add span details loader
* feat: prevent api call on closing span detail
* fix: remove timeout since waterfall take longer
* fix: use int16 for status code as per db schema
* fix: update openapi specs
* feat: make filter and search work with flamegraph
* feat: filter ui fix
* feat: remove trace header
* feat: new filter ui
* feat: setup types and interface for waterfall v3
v3 is required for udpating the response json of
the waterfall api. There wont' be any logical change.
Using this requirement as an opportunity to move
waterfall api to provider codebase architecture from
older query-service
* refactor: move type conversion logic to types pkg
* chore: add reason for using snake case in response
* fix: update span.attributes to map of string to any
To support otel format of diffrent types of attributes
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* refactor: convert waterfall api to modules format
* chore: add same test cases as for old waterfall api
* chore: avoid sorting on every traversal
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* fix: rename timestamp to milli for readability
* fix: add timeout to module context
* fix: use typed paramter field in logs
* chore: generate openapi spec for v3 waterfall
* fix: remove timeout since waterfall take longer
* fix: use int16 for status code as per db schema
* fix: update openapi specs
* feat: api integration
* feat: automatically scroll left on vertical scroll
* feat: reduce time
* feat: set limit to 100k for flamegraph
* feat: show child count in waterfall
* fix: align timeline and span length in flamegraph and waterfall
* feat: fix flamegraph and waterfall bg color
* feat: show caution on sampled flamegraph
* feat: api integration v3
* feat: disable scroll to view for collapse and uncollapse
* feat: setup types and interface for waterfall v3
v3 is required for udpating the response json of
the waterfall api. There wont' be any logical change.
Using this requirement as an opportunity to move
waterfall api to provider codebase architecture from
older query-service
* refactor: move type conversion logic to types pkg
* chore: add reason for using snake case in response
* fix: update span.attributes to map of string to any
To support otel format of diffrent types of attributes
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* refactor: convert waterfall api to modules format
* chore: add same test cases as for old waterfall api
* chore: avoid sorting on every traversal
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* fix: rename timestamp to milli for readability
* fix: add timeout to module context
* fix: use typed paramter field in logs
* chore: generate openapi spec for v3 waterfall
* fix: remove timeout since waterfall take longer
* fix: use int16 for status code as per db schema
* fix: update openapi specs
* refactor: break down GetWaterfall method for readability
* chore: avoid returning nil, nil
* refactor: move type creation and constants to types package
- Move DB/table/cache/windowing constants to tracedetailtypes package
- Add NewWaterfallTrace and NewWaterfallResponse constructors in types
- Use constructors in module.go instead of inline struct literals
- Reorder waterfall.go so public functions precede private ones
* refactor: extract ClickHouse queries into a store abstraction
Move GetTraceSummary and GetTraceSpans out of module.go into a
traceStore interface backed by clickhouseTraceStore in store.go.
The module struct now holds a traceStore instead of a raw
telemetrystore.TelemetryStore, keeping DB access separate from
business logic.
* refactor: move error to types as well
* refactor: separate out store calls and computations
* refactor: breakdown GetSelectedSpans for readability
* refactor: return 404 on missing trace and other cleanup
* refactor: use same method for cache key creation
* chore: remove unused duration nano field
* chore: use sqlbuilder in clickhouse store where possible
* feat: dropdown added to span details
* feat: fix color duplications
* feat: no data screen
* feat: old trace btn added
* feat: minor fix
* feat: rename copy to copy value
* feat: delete unused file
* feat: use semantic tokens
* feat: use semantic tokens
* feat: add crosshair
* feat: fix test
* feat: disable crosshair in waterfall
* feat: fix colors
* feat: minor fix
* feat: add status codes
* feat: load all spans in waterfall under limit
* feat: uncollapse spans on select from flamegraph
* feat: style fix
* feat: add service name
* feat: open in new tab
* feat: add trace details header
* feat: add trace details header styles
* feat: add trace details header styles
* feat: minor changes
* feat: floating fields set
* feat: filters init
* feat: filter toggle added
* feat: fix color
* fix: scroll to span in frontend mode
* feat: delete waterfall go
* feat: minor change
* feat: minor change
* feat: lint fix
* feat: analytics spans
* feat: color by field
* feat: save color by pref in user pref
* feat: migrate v2 pinned attr
* feat: preview fields
* feat: minor refactors
* feat: minor refactors
* feat: v3 behind feature flag
* feat: minor refactors
* feat: packages remove
* feat: packages remove
* feat: remove common component
* feat: remove antd component usage
* feat: leaf node indent fix
* feat: fix mouse wheel in json view
* feat: update signoz ui
* feat: remove feature flag
* feat: fixed the waterfall span hover card
* feat: fix hidden filters
* feat: trace details always visible
* feat: correct status code
* fix: pagination calls in waterfall
* feat: fix failing test
* feat: show error count
* feat: fix waterfall child sibling indent
* feat: change how we show span hover data in waterfall
* feat: fix logs in span details styles
* feat: minor fixes
* feat: make trace id copyable
* feat: add status message to highlight section
* feat: persist user choosing old view
* feat: add more fields in color by
* feat: add llm as fast filter
* feat: show api error correctly
* feat: update test cases
* feat: revert route change
* feat: replace antd btns
* feat: allow removing all fields in preview
* feat: additional check
* feat: minor fix
* feat: minor fix
* feat: dont use antd button and tooltip
* feat: dont use antd button and tooltip
* feat: update icons
* feat: minor change
* feat: minor change
* feat: minor fix
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Nikhil Soni <nikhil.soni@signoz.io>
* 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: regen api client for inframonitoring
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: added phase counts feature
* chore: added queries for pod phase counts in custom group by
* 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 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
* 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: nodes list v2 full blown
* chore: metadata fix
* chore: updated comment
* chore: namespaces code
* chore: v2 nodes api
* chore: rename
* chore: v2 clusters list api
* chore: namespaces code
* chore: rename
* chore: review clusters PR
* chore: pvcs code added
* chore: updated endpoint and spec
* chore: pvcs todo
* chore: added condition
* chore: added filter
* chore: added base condition
* chore: added pod phase counts
* chore: for pods and nodes, replace none with no_data
* chore: node and pod counts structs added
* chore: namespace record uses PodCountsByPhase
* chore: cluster record uses PodCountsByPhase, NodeCountsByReadiness
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
* feat(pnpm): migrate away from yarn
* fix(lodash): using uninstall dependency
* fix(workflows): use pnpm as package manager
* fix(pnpm-lock): keep it updated
* fix(test): issue with lodash-es and our pnpm store
* fix(jest): more esm conflicts
* fix(pipeline-page): update snapshot test
* fix(pnpm-lock): out of sync
* fix(json-view): issue with typing
* chore(pnpm): upgrade pnpm
* chore(yarn): remove yarn
* feat: module and store for span mapper
* fix: remove nullable from fieldcontext
* fix: address comments
* fix: cleanup migration file as well
* fix: rename field_context to fieldContext
* fix: decompose update function in module
* feat: meter reporter for new billing infra
* feat(meterreporter): simplify code, add metric meters, dry-run zeus call
* feat(meterreporter): add traces meters
* chore: update interval validation to allow min 5 mins interval for testing
* feat: add telemetry for collect and ship durations & improve comments
* feat(meterreporter): sealed-range catch-up and today-partial ticks
* chore: intermediate commit
* feat: improve retention period queries based on workspace ids for logs only for now
* chore: skip meter checkpoint call temporarily
* feat(meterreporter): bootstrap from data floor, emit sentinel zero-readings
* chore: lower HistoricalBackfillDays
* fix(meterreporter): pin retention type
* refactor(meterreporter): remove unused retry config
* refactor: add retentiontypes
* chore: intermediate commit
* feat(meterreporter): add metric and trace meters
* refactor: cleanup comments
* refactor: remove HistoricalBackfillDays
* refactor: move few things to ee package
* refactor: simplify some sections of tick
* refactor: push meters in batch for each day
* chore: add tracing and logging
* feat: make retention buckets generic
* feat(metercollector): add MeterCollector interface and split type packages
* feat(metercollector/retention): add narrow retention slice loader and SQL helpers
* refactor(meterreporter): wire http collectors
* chore(meterreporter): trim comments
* test(metercollector): add collector coverage
* chore(meterreporter): increase catchup window
* fix: ci lint and flag default value
* refactor(meters): align retention and zeus
* refactor(retention): move ttl types
* refactor(meters): rename platform fee collector
* refactor(meters): add meter constructor
* refactor(meters): add window constructor
* refactor(meters): consolidate zeus meter types
* refactor(meters): centralize meter metadata
* refactor(retention): add getter module
* refactor(retention): consolidate ttl types
* chore: use int64 instead of float64 as meter value
* chore: int64 conversion in clickhouse query too
* chore: error log - make failed meter collection louder
* chore: start sending data to zeus
* chore: add debug statement for logging meter data
* chore: simplify meter query only use org id and retention duration
* chore: remove unused functions from retention module and move sqlbuilder function too
* chore: remove unused code
* chore: switch to info context log for testing
* refactor(meterreporter): consolidate collectors and push origin into source
Replaces six near-duplicate collector packages with two parametrized,
factory-shaped ones: telemetrymetercollector for the ClickHouse-backed
meters (log size, span size, datapoint count) and staticmetercollector
for fixed-value meters (base platform fee). Each meter is now a Config
entry in cmd/enterprise/meter.go, materialized by iterating the factory.
Pushes the catchup floor concept out of the reporter and into each
collector via a new Origin method. Telemetry collectors return per-meter
min(unix_milli) FROM signoz_meter.samples; static collectors return
todayStart. The reporter now computes per-meter next-day-to-report and
only invokes a collector for days at/after its own next, eliminating
the over-emit + dropCheckpointed dance.
Other tightening: typed Meter.MeterName with JSON marshalers; Meter
dimensions built via attribute.Key-based zeustypes.NewDimensions;
license flows into Collect from the reporter (collectors stop fetching
it themselves); providerSettings plumbed into the meterreporter
factory closure for harness-style provider construction.
* refactor(meterreporter): per-collector Origin, simpler tick, semconv metrics
Pushes the catchup-floor concept out of the reporter and into each
collector via MeterCollector.Origin. Telemetry collectors return per-
meter min(unix_milli) FROM signoz_meter.samples; static collectors
return today. The reporter computes per-meter next-reportable-day,
iterates the day-loop globally, and only invokes a collector for days
at/after its own next — eliminating the over-emit + dropCheckpointed
dance entirely.
collectOrg is split into three named helpers: provider.checkpoints
(Zeus call + index), provider.nextDays (per-meter origin + checkpoint
max), and pure backfillRange (start/end clamped to yesterday + cap).
collectOrg itself reads as a five-step recipe.
Provider stores collectors as map[MeterName]MeterCollector keyed by
name; the slice + sort.Slice scaffolding is gone, validation moves
into newProvider. eligibleCollectors and report take the map directly.
Start matches the opaquetokenizer pattern: synchronous select+ticker,
sharder + per-org loop with license check (skipping orgs with no
active license), per-tick span scoped via an IIFE so defer span.End()
fires once per tick. goroutinesWg removed.
Config drops Timeout. CatchupMaxDaysPerTick renamed to MaxBackfillDays.
runPhase renamed to report. telemetryStore injection removed (no
longer used after dataFloor moved into the telemetry collector).
Metrics rebuilt around OTel semconv: signoz.meterreporter.checkpoints,
.reports, .collections, .meters — each bumped on success and failure,
with error.type set on failure via a new errors.TypeAttr helper in
pkg/errors. collections also carries signoz.meter.name.
* refactor(meterreporter): rename base platform fee meter, add metric units
Renames signoz.meter.base.platform.fee to signoz.meter.platform.active.
The new name matches the per-service template signoz.meter.<service>
.active that scales for future per-service billing meters; "active"
fits the billing-eligibility semantic (org's platform subscription
is active for the period) without conflating with operational
liveness conventions like Prometheus's `up`.
Adds UCUM annotated-count units to each reporter counter:
- signoz.meterreporter.checkpoints -> {checkpoint}
- signoz.meterreporter.reports -> {report}
- signoz.meterreporter.collections -> {collection}
- signoz.meterreporter.meters -> {meter}
* chore: stop leaking collectors if flag is false and address comments
* fix(meterreporter): correct startup and retention metadata
* fix(meterreporter): recover static meter backfill
* chore: address review comments
* chore: move flag evaluation into reporter
* refactor: fix retention origin for staticmeter collectors
* fix(meterreporter): gate backfill by license day
Replace max_backfill_days with a backfill switch.
Clamp sealed-day catch-up to the license creation day.
Send retention duration dimensions in seconds.
* fix(meterreporter): anchor backfill to license day
* chore: address review comments
* chore: drop unrelated authz schema diff
---------
Co-authored-by: Karan Balani <29383381+balanikaran@users.noreply.github.com>
Co-authored-by: grandwizard28 <vibhupandey28@gmail.com>
* fix:replace LoadingOutlined to Loader signoz icon
* fix: remove unintended changes
* add correct import for icon and size
* fix test and linting
* fix test and linting
* fix test and linting
* fix test and linting
* fix linting
* fix(src): missing few places after merge main
* fix(hostslisttable): removed file added by accident
---------
Co-authored-by: Vinícius Lourenço <vinicius@signoz.io>
Co-authored-by: Vinicius Lourenço <12551007+H4ad@users.noreply.github.com>
* 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: regen api client for inframonitoring
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: added phase counts feature
* chore: added queries for pod phase counts in custom group by
* 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 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
* 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: nodes list v2 full blown
* chore: metadata fix
* chore: updated comment
* chore: namespaces code
* chore: v2 nodes api
* chore: rename
* chore: v2 clusters list api
* chore: namespaces code
* chore: rename
* chore: review clusters PR
* chore: added pod phase counts
* chore: for pods and nodes, replace none with no_data
* chore: node and pod counts structs added
* chore: namespace record uses PodCountsByPhase
* chore: cluster record uses PodCountsByPhase, NodeCountsByReadiness
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
* feat(sa): made service account role selection multiselect, handling multiple api calls parallely
* feat(authz): enable multi role assignemnt for service accounts
* feat(authz): update integration tests
---------
Co-authored-by: vikrantgupta25 <vikrant@signoz.io>
* 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: regen api client for inframonitoring
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: added phase counts feature
* chore: added queries for pod phase counts in custom group by
* 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 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
* 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: nodes list v2 full blown
* chore: metadata fix
* chore: updated comment
* chore: v2 nodes api
* chore: namespaces code
* chore: rename
* chore: added pod phase counts
* chore: for pods and nodes, replace none with no_data
* chore: node and pod counts structs added
* chore: namespace record uses PodCountsByPhase
* chore: merge error resolved
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
* feat(auditor): add file provider for audit logs
* feat(auditor): write payload + newline in a single syscall
Combine the JSON payload and trailing newline into one Write call so a
concurrent reader can never observe a torn JSON object — they see either
the full line or nothing.
* style(auditor): drop wrapping at file-provider export and obvious doc comments
* feat(authz): add resource-level FGA and attach permissions for service accounts
- Add CheckAll middleware (AND of OR groups) for multi-resource authz checks
- Switch SA role routes (SetRole, DeleteRole) to VerbAttach on ResourceServiceAccount
- Add RoleAttachSelectors on SA module for role-level VerbAttach resolution
- DeleteRole uses CheckAll (both checks at middleware from URL params)
- SetRole uses Check (entity) at middleware + module-level role attach check
- Add migration 078 to backfill FGA tuples for existing organizations
- Add authz contributing guide (docs/contributing/go/authz.md)
- Regenerate OpenAPI spec with scoped security schemes
* feat(authz): fix openapi spec
* feat(authz): add attach permissions to migration
* feat(authz): role details page fixes
* fix(openapi): openapi changes for attach
* fix(openapi): openapi changes for attach
* fix(types): move types to middleware to remove http import from types
* test(integration): add integration tests
* test(integration): fix test lint and remove contributing guide
* feat(authz): revert role details changes
* feat(authz): move selectors to handler
* feat(authz): better naming for authz service and authz middleware
* feat(authz): better naming for authz service and authz middleware
`/status` was showing an upgrade-available banner even when the
running build matched the latest release, because `checkVersionState`
compared `currentVersion` (e.g. `v0.76.2`) against `latestVersion`
(e.g. `0.76.2`) via raw string equality.
Normalize both sides by stripping a leading `v`/`V` before comparing.
Existing pre-release handling (`0.76.2-rc.1` → `0.76.2`) is preserved.
Add a unit test covering exact match, either-side prefix mismatch,
both prefixed, pre-release, and true mismatches.
Fixes#7484
* fix: disallow group by timestamp for timeseries request
* fix: added a unit test
* fix: use WithTimestampGroupByValidation instead
* fix: unexport the field
* fix: update doc string
* feat(ruletypes): publish OpenAPI 3 discriminator on RuleThresholdData and EvaluationEnvelope
Both types model `{kind, spec}` discriminated unions on the wire but
the generated OpenAPI lacked the `discriminator:` keyword, so
codegen tools (oapi-codegen, terraform-plugin-codegen-openapi) fell
back to opaque `Spec: any` and consumers had to hand-write
JSON-bridges instead of typed Expand/Flatten.
Add the discriminator declaration via a marker convention:
- Each parent type implements `jsonschema.Preparer` to set an
`x-signoz-discriminator` extra property carrying `propertyName` and
the per-kind `mapping`.
- A small `attachDiscriminators` pass in pkg/signoz/openapi.go runs
after spec reflection, walks every component schema, promotes the
marker into a real openapi3.Discriminator, and removes the marker
so it doesn't leak into the rendered YAML.
The two-step is required because jsonschema-go.Schema has no
Discriminator field of its own and openapi-go only carries through
`x-`-prefixed extras unchanged. The wire shape is unchanged —
`{kind: "<value>", spec: <variant>}` is still what's sent and
received.
Adding a new variant: append to JSONSchemaOneOf and add a
mapping entry on PrepareJSONSchema.
* refactor(openapi): inline discriminator constant and tighten attachDiscriminators
* chore(ruletypes): trim discriminator comments
* fix(ruletypes): mark evaluation variant kind/spec required
* fix(ruletypes): keep envelope kind/spec out of the parent schema via json:"-"
* refactor(ruletypes): strip envelope parent properties in attachDiscriminators
Revert the json:"-" + custom MarshalJSON dance on the envelope
structs. Restore the original tags (json:"kind" / json:"spec"),
keep the discriminator marker, and clear the parent's redundant
properties / required block in attachDiscriminators after the
discriminator is promoted.
* style(openapi): add blank lines between logical blocks in attachDiscriminators
* style(ruletypes): add blank lines in PrepareJSONSchema
* fix(ruletypes): mark threshold variant kind/spec required
* feat: openapi spec generation
* test: script to generate test dashboard data in a sql db
* test: fixes in dashboard perf testing data generator
* test: perf test script for both sql flavours
* test: data column in perf tests should match real data
* test: much bigger json for data column
* chore: comment clean up
* chore: separate file for perses replicas
* test: more descriptive test file name
* chore: move plugin maps to correct file
* chore: comment cleanup
* test: add tests for spec wrappers
* chore: better file names
* chore: better file name
* chore: too many comments
* fix: js lint errors
* fix: dot at the end of a comment
* chore: better error messages
* fix: strict decode variable spec as well
* fix: remove textbox plugin from openapi spec
* chore: renames and code rearrangement
* chore: better comment to explain what restrictKindToLiteral does
* chore: cleaner comment
* chore: cleaner comment
* chore: cleaner comment
* chore: better method name
* chore: cleanup testing code
* chore: code movement
* chore: code movement
* chore: code movement
* chore: go lint fix (godot)
* chore: code movement
* chore: cleanup comments
* chore: better method name extractKindAndSpec
* test: test for drift detection mechanics
* chore: follow proper unmarshal json method structure
* chore: separate method for validation
* fix: remove extra spec from builder query marshalling
* fix: add allowed values in err messages
* fix: remove extra (un)marshal cycle
* fix: return 500 err if spec is nil for composite kind w/ code comment
* fix: no need for copying textboxvariablespec
* fix: wrap errors
* chore: no v2 subpackage
* fix: query-less panels not allowed
* fix: allow only 1 query in a panel
* test: unit test fixes
* feat(ingestion): added default alert name when coming from ingestion limit
* feat(ingestion): added helper text and set alert badge for ingestion
* feat(ingestion): removed antd button, used signozhq library
* feat(ingestion): added test cases
* feat(ingestion): code refactor
* feat(ingestion): updated test cases
* feat(ingestion): base path fixes
* feat(ingestion): pass on relevant unit also from ingestion to alert
* feat(ingestion): updated test cases
* feat(ingestion): updated alert name format
* feat(typography): migrate to @signozhq/ui
* test(ingestion-settings): add more timeout for test
* fix(typography): missing few places introduced by merge main
* fix(traces): blue links instead of l1 foreground
* fix(span-duration): fix issue with bad mocking
* feat: flamegraph canvas init
* feat: add text to spans
* feat: added timeline v3
* feat: zoom and drag added
* feat: update span colors
* feat: handle click and hover with tooltip
* feat: temp change
* feat: fix timerange unit selection when zoomed
* feat: scroll to selected span
* feat: fix style
* feat: fix style
* feat: reduce timeline intervals
* fix: style fix
* fix: update color
* feat: bg color for selected and hover spans
* feat: remove unnecessary props
* feat: minor comment added
* feat: add test cases for flamegraph
* feat: add test utils
* feat: waterfall init
* feat: decouple waterfall left (span tree) and right (timeline bars) panels
Split the waterfall into two independent panels with a shared virtualizer
so deeply nested span names are visible via horizontal scroll in the left
panel. Left panel uses useReactTable + <table> for future column
extensibility; right panel uses plain divs for timeline bars. A draggable
resize handle separates the two panels.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: add TimelineV3 ruler to waterfall header with padding fix
Add the TimelineV3 component to the sticky header of the waterfall's
right panel so timeline tick marks are visible. Add horizontal padding
to both the timeline header and span duration bars to prevent label
overflow/clipping at the edges.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: match span style
* feat: fix hover option overflow
* feat: span hover popover sync
* feat: row based flamegraph
* feat: subtree segregated tree
* feat: subtree segregated tree
* feat: subtree segregated tree
* feat: move to service worker
* feat: connector line ux
* feat: event dots in trace details
* feat: waterfall resizable
* feat: span details init
* feat: span details header
* feat: details field component
* feat: added span percentile
* feat: key attr section added
* feat: added pretty view
* feat: update yarn lock
* feat: minor change
* feat: search in pretty view
* feat: refactor
* feat: style fix
* feat: json viewer with select dropdown added
* feat: span details floating drawer added
* feat: span details folder rename
* feat: replace draggable package
* feat: fix pinning. fix drag on top
* feat: add bound to drags while floating
* feat: add collapsible sections in trace details
* feat: use resizable for waterfall table as well
* feat: copy link change and url clear on span close
* feat: fix span details headr
* feat: key value label style fixes
* feat: linked spans
* feat: style fixes
* feat: setup types and interface for waterfall v3
v3 is required for udpating the response json of
the waterfall api. There wont' be any logical change.
Using this requirement as an opportunity to move
waterfall api to provider codebase architecture from
older query-service
* refactor: move type conversion logic to types pkg
* chore: add reason for using snake case in response
* fix: update span.attributes to map of string to any
To support otel format of diffrent types of attributes
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* refactor: convert waterfall api to modules format
* chore: add same test cases as for old waterfall api
* chore: avoid sorting on every traversal
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* fix: rename timestamp to milli for readability
* fix: add timeout to module context
* fix: use typed paramter field in logs
* feat: api integration
* feat: add limit
* feat: minor change
* feat: supress click
* chore: generate openapi spec for v3 waterfall
* feat: fix test
* feat: fix test
* feat: lint fix
* feat: span details ux
* feat: analytics
* feat: add icons
* feat: added loading to flamegraph and timeout to webworker
* feat: sync error and loading state for flamegraph for n/w and computation logic
* feat: auto scroll horizontally to span
* feat: show total span count
* feat: disable anaytics span tab for now
* feat: add span details loader
* feat: prevent api call on closing span detail
* fix: remove timeout since waterfall take longer
* fix: use int16 for status code as per db schema
* fix: update openapi specs
* feat: make filter and search work with flamegraph
* feat: filter ui fix
* feat: remove trace header
* feat: new filter ui
* feat: setup types and interface for waterfall v3
v3 is required for udpating the response json of
the waterfall api. There wont' be any logical change.
Using this requirement as an opportunity to move
waterfall api to provider codebase architecture from
older query-service
* refactor: move type conversion logic to types pkg
* chore: add reason for using snake case in response
* fix: update span.attributes to map of string to any
To support otel format of diffrent types of attributes
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* refactor: convert waterfall api to modules format
* chore: add same test cases as for old waterfall api
* chore: avoid sorting on every traversal
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* fix: rename timestamp to milli for readability
* fix: add timeout to module context
* fix: use typed paramter field in logs
* chore: generate openapi spec for v3 waterfall
* fix: remove timeout since waterfall take longer
* fix: use int16 for status code as per db schema
* fix: update openapi specs
* feat: api integration
* feat: automatically scroll left on vertical scroll
* feat: reduce time
* feat: set limit to 100k for flamegraph
* feat: show child count in waterfall
* fix: align timeline and span length in flamegraph and waterfall
* feat: fix flamegraph and waterfall bg color
* feat: show caution on sampled flamegraph
* feat: api integration v3
* feat: disable scroll to view for collapse and uncollapse
* feat: setup types and interface for waterfall v3
v3 is required for udpating the response json of
the waterfall api. There wont' be any logical change.
Using this requirement as an opportunity to move
waterfall api to provider codebase architecture from
older query-service
* refactor: move type conversion logic to types pkg
* chore: add reason for using snake case in response
* fix: update span.attributes to map of string to any
To support otel format of diffrent types of attributes
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* refactor: convert waterfall api to modules format
* chore: add same test cases as for old waterfall api
* chore: avoid sorting on every traversal
* fix: remove unused fields and rename span type
To avoid confusing with otel span
* fix: rename timestamp to milli for readability
* fix: add timeout to module context
* fix: use typed paramter field in logs
* chore: generate openapi spec for v3 waterfall
* fix: remove timeout since waterfall take longer
* fix: use int16 for status code as per db schema
* fix: update openapi specs
* refactor: break down GetWaterfall method for readability
* chore: avoid returning nil, nil
* refactor: move type creation and constants to types package
- Move DB/table/cache/windowing constants to tracedetailtypes package
- Add NewWaterfallTrace and NewWaterfallResponse constructors in types
- Use constructors in module.go instead of inline struct literals
- Reorder waterfall.go so public functions precede private ones
* refactor: extract ClickHouse queries into a store abstraction
Move GetTraceSummary and GetTraceSpans out of module.go into a
traceStore interface backed by clickhouseTraceStore in store.go.
The module struct now holds a traceStore instead of a raw
telemetrystore.TelemetryStore, keeping DB access separate from
business logic.
* refactor: move error to types as well
* refactor: separate out store calls and computations
* refactor: breakdown GetSelectedSpans for readability
* refactor: return 404 on missing trace and other cleanup
* refactor: use same method for cache key creation
* chore: remove unused duration nano field
* chore: use sqlbuilder in clickhouse store where possible
* feat: dropdown added to span details
* feat: fix color duplications
* feat: no data screen
* feat: old trace btn added
* feat: minor fix
* feat: rename copy to copy value
* feat: delete unused file
* feat: use semantic tokens
* feat: use semantic tokens
* feat: add crosshair
* feat: fix test
* feat: disable crosshair in waterfall
* feat: fix colors
* feat: minor fix
* feat: add status codes
* feat: load all spans in waterfall under limit
* feat: uncollapse spans on select from flamegraph
* feat: style fix
* feat: add service name
* feat: open in new tab
* feat: delete waterfall go
* feat: minor change
* feat: minor change
* feat: minor refactors
* feat: minor refactors
* feat: v3 behind feature flag
* feat: minor refactors
* feat: packages remove
* feat: packages remove
* feat: remove common component
* feat: remove antd component usage
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Nikhil Soni <nikhil.soni@signoz.io>
* 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: regen api client for inframonitoring
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: added phase counts feature
* chore: added queries for pod phase counts in custom group by
* 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 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
* 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: nodes list v2 full blown
* chore: metadata fix
* chore: updated comment
* chore: v2 nodes api
* chore: added pod phase counts
* chore: for pods and nodes, replace none with no_data
* chore: node and pod counts structs added
* chore: strongly type meta
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
* fix: dashboard invalid date state upon refresh
* fix: dashboard invalid date state upon refresh
---------
Co-authored-by: Nityananda Gohain <nityanandagohain@gmail.com>
* refactor: move authtypes to coretypes
* refactor: migrate downstream consumers to coretypes Kind/Type/Relation
Wire all consumers of the typeable infrastructure through coretypes:
- Replace authtypes.Name/Type/Relation references with coretypes equivalents
- Switch Typeable singletons to constructor calls (authtypes.NewTypeableUser
etc.), with the embedded coretypes.Typeable populated so Kind/Type/Prefix/
Scope dispatch correctly through the embed
- Update dashboardtypes meta-resource declarations to use authtypes
constructors so they expose Tuples (authz callers need it)
- Rename Resource.Name field accesses to Resource.Kind to match the field
rename in authtypes.Resource
- Fix typeable_metaresource.go calling the plural NewTypeableMetaResources
helper — should be the singular NewTypeableMetaResource
go build ./... and go vet ./... clean (parser-generated unreachable-code
warnings are pre-existing). Authz unit tests pass.
* refactor(audittypes): unify Action with coretypes.Relation
Drop the duplicate Action enum from audittypes — the verbs (create/update/
delete) match coretypes.Relation exactly. Move PastTense onto Relation so
audit EventName derivation continues to work without a parallel hierarchy.
Also retypes AuditDef.ResourceKind from string to coretypes.Kind so audit
declarations get the same regex validation that authz already enforces.
* refactor(retentiontypes): extract TTLSetting into its own package
TTLSetting is the bun model for ClickHouse TTL settings — has nothing to do
with the Organization domain it was previously co-located with in
pkg/types/organization.go. Moved to pkg/types/retentiontypes/ alongside the
ClickHouse reader that's its sole consumer.
No schema change; the bun table tag (table:ttl_setting) is unchanged.
* chore(openapi): regenerate spec for coretypes.Relation and Resource.Kind
* chore(frontend): regenerate API client and migrate Resource.name → Resource.kind
Regenerated TypeScript API types after the AuthtypesResource field rename
and the new CoretypesRelation enum. Updated:
- frontend/scripts/generate-permissions-type.cjs to read `r.kind` from the
/api/v1/authz/resources response and emit `kind:` in the static
permissions.type.ts file.
- frontend/src/hooks/useAuthZ/{permissions.type,types,utils,useAuthZ}.tsx:
Resource.name → Resource.kind throughout.
- frontend/src/container/RolesSettings/{utils.tsx,__tests__/utils.test.ts}:
same field migration.
- frontend/src/components/createGuardedRoute/createGuardedRoute.test.tsx:
same.
- useAuthZ/utils.ts: cast string relations to CoretypesRelationDTO at the
AuthtypesTransactionDTO boundary now that relation is an enum, not a raw
string.
yarn generate:api passes (orval generation + lint + typecheck).
* refactor: migrate downstream consumers to Resource/Verb rename
* chore(openapi): regenerate spec for Resource/Verb rename
* feat(coretypes): add ListResources accessor with stable sort
* feat(cmd): add 'generate authz' subcommand for permissions type
* refactor(authz): drop runtime authz/resources endpoint
* refactor(frontend): consume static permissions.type.ts directly
* chore(frontend): regenerate Orval client without authz/resources
* ci: move authz schema check from jsci to goci
* refactor(coretypes): move Selector/Object/Transaction from authtypes
* feat(coretypes): add managed role names and permission policy
* feat(coretypes): add Registry assembling resources, types, and managed-role transactions
* refactor(authz): wire *coretypes.Registry; drop RegisterTypeable
* refactor(cmd): wire coretypes.NewRegistry into server bootstraps
* chore: regenerate openapi spec for authtypes -> coretypes type moves
* chore(frontend): regenerate API client for Authtypes -> Coretypes type moves
* refactor(coretypes): rename GettableResource to ResourceRef
* refactor(authz): collapse Registry around static data; bridge once at construction
* refactor(coretypes): tighten Registry, restore anonymous public-dashboard grant
Drops passthrough fields from coretypes.Registry; adds an O(1) lookup map
for NewResourceFromTypeAndKind; replaces stringly-typed Type compares with
Type.Equals; removes the now-redundant getUniqueTypes helper. Restores the
signoz-anonymous read grant on metaresource/public-dashboard that was
silently dropped, and removes the invalid signoz-admin/VerbCreate/TypeUser
entry that panicked at startup.
* chore: regenerate openapi spec for coretypes -> authtypes type moves
* chore(frontend): regenerate API client for Coretypes -> Authtypes type moves
* fix(authz): disambiguate kind→type by relation, preserve multi-part selectors
permissions.type.ts now lists the same kind (dashboard, role,
public-dashboard) under both metaresource and metaresources, so the prior
kind→type map silently overwrote one with the other. Resolve the type
using the requesting relation's allowed types, and slice the selector at
the first colon so multi-part selectors (e.g. id:version) round-trip
correctly. Updates useAuthZ.test.tsx to use the regenerated kind field.
* refactor(authtypes): introduce Relation wrapper over coretypes.Verb
The authz layer modeled relations as raw coretypes.Verb everywhere, which
forced authz-level concepts (action, role-binding) to share a type with
schema-level enumerations. Introduce authtypes.Relation as a thin wrapper
over coretypes.Verb so the authz APIs (CheckWithTupleCreation, ListObjects,
GetObjects, PatchObjects, NewTuples, Transaction.Relation, etc.) can grow
authz-specific affordances without leaking back into coretypes.
Also reshuffles the static coretypes data into dedicated registry_*.go files
(types, kinds, verbs, resources, managed roles) to keep the schema declarations
isolated from the value types they configure.
* refactor(authtypes): expose Relation.Enum() and regenerate openapi spec
Without an Enum() method on Relation the openapi generator emitted an
empty AuthtypesRelation schema (no allowed values). Forward the enum
from the embedded coretypes.Verb so the wire contract is faithful.
* refactor(ee/authz): drop always-nil error returns from managed-role tuple helpers
getManagedRoleGrantTuples and getManagedRoleTransactionTuples never
returned a non-nil error, which the linter (unparam) had flagged. Drop
the unused error return; callers no longer need the err check either.
* chore(frontend): regenerate API client for authtypes.Relation
* fix(authz): satisfy go-lint — keyed Relation literal, drop redundant Verb selector
* refactor(coretypes): sync Kinds slice with full registry_kind declarations
* feat(coretypes): register metaresource and metaresources for all new kinds
Adds 21 metaresource and 21 metaresources entries (covering notification-channel,
route-policy, apdex-setting, auth-domain, session, cloud-integration,
cloud-integration-service, ingestion-key, ingestion-limit, pipeline,
user-preference, org-preference, quick-filter, ttl-setting, rule,
planned-maintenance, saved-view, trace-funnel, factor-password, factor-api-key,
license) so the authz schema covers every resource Kind declared in
registry_kind. Regenerates the static frontend permissions.type.ts to match.
* feat(coretypes): populate ManagedRoleToTransactions from signozapiserver routes
Enumerates every (verb, resource) tuple each managed role holds, derived
from the AdminAccess/EditAccess/ViewAccess middleware on routes in
pkg/apiserver/signozapiserver and the legacy http_handler in
pkg/query-service/app. Admin gets 123 transactions, editor 53, viewer 25,
anonymous keeps the single public-dashboard read.
* feat(coretypes): add integration kind with full CRUD for viewer/editor/admin
Install/uninstall/list integration routes (legacy /api/v1/integrations) all
sit behind ViewAccess, so every authenticated role gets the full CRUD
surface on (metaresource, integration) and (metaresources, integration).
Regenerates the static frontend permissions.type.ts to match.
* feat(coretypes): add subscription kind alongside license, document LCRUD shape
License covers the in-product license resource (Activate/Refresh/GetActive).
Subscription is the billing lifecycle (checkout/portal/billing) served by
ee/query-service routes. Both are admin-only and modeled with a uniform
LCRUD shape; comments call out which verbs actually map to routes versus
which are placeholders for shape parity (e.g. cancellation flows through
Stripe's portal, not an in-process delete).
* feat(coretypes): model telemetryresource for logs, traces, metrics
Mirrors the telemetryresource type from ee/authz/openfgaschema/base.fga
into coretypes: a read-only Type with three Kinds (logs, traces, metrics)
matching telemetrytypes.Signal. Selector is wildcard-only for v1; future
work can narrow per-service or per-environment when the use case lands.
Every managed role (admin/editor/viewer) gets read on each signal,
matching the schema's role#assignee grant. Anonymous stays unchanged.
Regenerates the static frontend permissions.type.ts.
* feat(coretypes): add audit-logs and meter-metrics kinds under telemetryresource
Audit logs (signal=logs, source=audit) and meter metrics (signal=metrics,
source=meter) are sensitive source-qualified telemetry streams that don't
belong under the broad read-grant every role gets on regular logs/traces/
metrics. Modeled as distinct Kinds so they can be permissioned
independently. Admin-only read for now; widen on explicit ask (e.g. an
auditor flow that needs viewer access to audit-logs). Regenerates the
static frontend permissions.type.ts.
* feat(coretypes): add logs-field and traces-field kinds for stored field config
GET/POST /logs/fields and /api/v2/traces/fields manage stored, mutable
field metadata (indexed/promoted columns) over each signal. They're
configuration, not telemetry data, so they sit under metaresource rather
than telemetryresource. Viewer reads, editor/admin update; no
create/delete since POST overwrites. Plural prefix (logs-field /
traces-field) matches the signal naming.
* chore(frontend): regenerate permissions.type.ts to match generate authz output
* feat(authz): add attach permissions to fga model
* fix(tests): use role permissions instead of dashboards
* fix(authz): couple of issues with register flow
* fix(authz): public dashboard read should be anomymous
* fix(tests): integration test for public dashboard access
---------
Co-authored-by: vikrantgupta25 <vikrant@signoz.io>
* fix: return span start time similar to waterfall v2
* chore: update openapi specs
* chore: rename timestamp field to match style of other fields
* chore: rename the struct field to keep json and field same
* chore: minor ui fixes in tooltip
* chore: preetify
* chore: exposed tooltip + added panelid in events
* chore: fixed and updated tooltip test
* chore: added tooltip footer tests
* chore: updated pr review changes and added support for multi query
* chore: minor fix
* fix(authdomain): nest config response, rename Updateable→Updatable, return Identifiable on create
Three small API-shape corrections on auth_domain:
- GettableAuthDomain previously embedded AuthDomainConfig, which
flattened sso_enabled / saml_config / oidc_config / google_auth_config /
role_mapping at the response root and made the response shape
diverge from the request shape (PostableAuthDomain has them under
`config`). Move it under a named `Config` field with a `config`
json tag so request and response carry the same nested object.
- UpdateableAuthDomain → UpdatableAuthDomain (typo fix; aligns with
UpdatableUser already in the codebase).
- CreateAuthDomain previously returned the full GettableAuthDomain;
the only field clients actually need from the create response is
the new ID. Switch to Identifiable so the contract states what the
endpoint guarantees and clients re-Read for the full domain when
needed.
Frontend schema and OpenAPI spec regenerated.
* fix(authdomain-frontend): adapt to nested config + Identifiable create response
Regenerate the orval client (`yarn generate:api`) and update the
auth-domain UI for the API shape changes from the previous commit:
- `record.ssoType`, `.ssoEnabled`, `.googleAuthConfig`, `.oidcConfig`,
`.samlConfig`, `.roleMapping` are now nested under `record.config.*`
in `AuthtypesGettableAuthDomainDTO` — update SSOEnforcementToggle,
CreateEdit form initial-values, the list page's Configure button,
and the auth-domain test mocks.
- `mockCreateSuccessResponse` now returns `{ id }` (Identifiable)
instead of the full domain.
`yarn generate:api` ran clean: lint OK, tsgo OK.
* fix(authdomain): align CreateAuthDomain success code with handler + adjust integration test
The Create handler returns http.StatusCreated but the OpenAPI
annotation said StatusOK. Sync the annotation to 201, regenerate the
spec + frontend client.
The callbackauthn integration test (01_domain.py) still read
`domain["ssoType"]` off the GET response — now nested under
`domain["config"]["ssoType"]` after the previous shape change. Update
the assertion.
* feat(infra-monitoring): use new table component
* test(k8s-base-list): try fix issue with flaky test
* fix(table): tweaks in the layout
* fix(pr-comments): usage of const and move disable lint to line
* fix(css): format of css file
* test(k8s-base-list): flaky test
* test(k8s-base-list): second try to fix flaky test
* fix(table): have different ids for expanded table
* fix(k8s-base-list): third attempt to de-flaky test
* refactor(table): tiny adjustments on table
* fix(k8s-empty-state): better title size
* fix(authtypes): embed values and expose AuthDomainConfig oneOf
GettableAuthDomain now embeds StorableAuthDomain and AuthDomainConfig
by value so the response flattens correctly. AuthDomainConfig also
implements jsonschema.OneOfExposer over the SAML/Google/OIDC variants.
* fix(alertmanagertypes): expose PostableChannel JSONSchema
PostableChannel now implements jsonschema.Exposer, requiring name
and a oneOf branch per *_configs field so the OpenAPI request body
for POST /channels matches the runtime contract enforced in
NewChannelFromReceiver. Switched the route's Request type from
Receiver to PostableChannel and regenerated the OpenAPI spec.
* fix(alertmanagertypes): use components/schemas prefix in PostableChannel refs
The standalone reflector inside JSONSchema defaulted to #/definitions/
prefix, producing dangling refs to ConfigDiscordConfig etc. that broke
the generated frontend client. Pass DefinitionsPrefix("#/components/schemas/")
so refs point to existing OpenAPI components, and regenerate the frontend
Orval client.
* feat(authdomain): add GET /api/v1/domains/{id} endpoint
Returns a single GettableAuthDomain scoped to the caller's organization,
backed by the existing module.GetByOrgIDAndID. Adds Get to the Handler
interface, wires the route under AdminAccess, and regenerates the
OpenAPI spec and frontend Orval client.
* feat(authtypes): expose AuthNProvider enum in OpenAPI schema
AuthNProvider now implements jsonschema.Enum, narrowing the generated
TypeScript type from string to a typed enum. Updated callers in the
auth-domain settings UI and mocks to use AuthtypesAuthNProviderDTO,
and added an early-return guard in the create/edit submit handler so
TS can narrow the union before passing it as ssoType.
* chore(types): document oneOf/discriminator mismatch on PostableChannel and AuthDomainConfig
Both types emit a oneOf in the OpenAPI spec but neither shape supports an
OpenAPI discriminator: PostableChannel implies the variant by which *_configs
field is present, and AuthDomainConfig keeps the variant payload in a
sibling field instead of being the payload itself. Leave a TODO pointing at
ruletypes.RuleThresholdData as the envelope pattern to migrate to.
* fix(ruletypes): handle string driver values in Schedule.Scan and Recurrence.Scan
The Scan methods only handled []byte and silently no-op'd on anything
else. SQLite's TEXT columns come back as string from the driver, so
every GET of a planned_maintenance returned a zero-valued Schedule
(empty timezone, 0001-01-01 startTime/endTime, no recurrence) — even
though Create + Update wrote the values correctly.
Switch on src type, accept []byte, string, and nil; error on anything
else. Aligns Schedule with the existing pattern; in Recurrence fixes
the receiver — Unmarshal was being passed src (the interface{} arg)
rather than r.
* fix(mcp-page): added acitve host url instead of current url on mcp page
* fix(mcp-page): configure access and role control
* chore: move get hosts api access to viewers (#11145)
* chore: move get hosts api access to viewers
* chore: update openapi spec
---------
Co-authored-by: SagarRajput-7 <162284829+SagarRajput-7@users.noreply.github.com>
* fix: allowed hosts api to run on all the cloud users
* fix: updated test cases
---------
Co-authored-by: Karan Balani <29383381+balanikaran@users.noreply.github.com>
* feat(global-time-store): add support to context, url persistence, store persistence, drift handle
* chore(fmt): fix issue with format
* refactor(hooks): mark internal and public ones
* refactor(store): adapt to don't need round down
* refactor(global-time): scope queries via name for auto refresh to be isolated
* chore(use-query-cache): add little doc
* chore(global-time): update docs
* fix: fts warning miss in direct text search
* fix: comments
* test: added one more test variation
* ci: go lint
* fix: fts warning update
* fix: integration tests
* fix: go test and fmtlint
* feat: azure integration - ui refactor
* feat: implement AWS cloud account integration UI components and connection handling
* feat: add Azure cloud account integration UI components and connection handling
* feat: enhance Azure cloud account setup UI with prerequisites and accordion for how it works section
* feat: enhance styling for Azure and AWS account management
* refactor: clean up state initialization and destructuring in AWS and HeroSection components
* fix: update import path for ServiceDashboards in S3Sync test
* feat: add Denmark East region to Azure regions and enhance Azure account removal messaging
* chore: remove prefer-signoz-ui-icons ESLint rule and update telemetry event naming
* feat: add customer aggregation support in waterfall
* chore: add tests for aggregation logic
* chore: rename analytics to aggregations
* chore: update openapi specs
* feat: add support to request telemetry fields in flamegraph
* chore: simplify getting attribute value for span
* fix: remove overlapping time from duration aggregation
* fix: use valuer.String for enums
* feat: add preferences for preview and color by
* chore: add json enabled as feature flag for FE
* fix: still using global bool
* feat: flagger integration in flow
* fix: flagger threaded into tests
* test: removed nil checks
* fix: minor changes
* chore: rename field
* chore: remove querybuilder helper
* fix: unit tests
* fix: correct env var
* fix: lint fix
* fix: lint
* chore: replace flag
* 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: 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
* 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: formatted file
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Ashwin Bhatkal <ashwin96@gmail.com>
* chore: added changes for crosshair sync for tooltip
* chore: minor cleanup
* chore: updated the core structure
* chore: updated the types
* chore: minor cleanup
* feat: added changes for sereis highlighting on crosshair sync
* chore: pr review fixes
* chore: handled other cases of groupby
* chore: minor changes
* feat: tooltip sync across panels (#11114)
* feat: added changes for syncing tooltip
* fix: fixed other tooltips closing when clicked on top of root tooltip
* fix: highlighting first series
* chore: removed y-axis sync for tooltip mode
* chore: minor fix
* chore: fmt fix
* feat(onboarding): add OpenCode, Baseten, and DBOS datasources
Adds three new datasources to the onboarding config with logos and
documentation links, closing signoz.io issues #3111, #3053, and #3040.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* fix(onboarding): fix basetenUrl import alphabetical ordering
---------
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
* refactor(frontend): remove xstate and migrate to plain React state
Replace xstate state machines with useState-based step tracking in the
three remaining consumers (labels form, dashboard search filter,
resource attribute provider). Drops xstate and @xstate/react from
dependencies and removes the corresponding no-restricted-imports
entries from oxlint config.
* refactor: clear list of dashboard
* chore: resolve comments
* feat(settings): add SigNoz MCP Server setup page
Add a new Settings page at /settings/mcp-server that guides Cloud users
through connecting AI assistants (Cursor, VS Code, Claude Desktop, Claude
Code, Codex) to SigNoz via the Model Context Protocol, and provides a
deep-link into Service Accounts for creating the API key the OAuth flow
needs.
* feat(settings): point MCP Server onboarding tile to in-app settings page
The onboarding-config-with-links entry for SigNoz MCP Server previously
linked out to the docs page. Now that we ship an in-product setup page
at /settings/mcp-server, route Cloud users there directly via the
existing internalRedirect pattern. Self-hosted users still see the
in-page fallback card with a docs link.
* fix(settings): fire MCP Server page-viewed event reliably on mount
Previously gated the PAGE_VIEWED analytics event on
isGlobalConfigFetched to avoid a double-fire when the async
ingestion_url resolved. Side effect: if /global/config was slow or
errored out, the event never fired. Fire once on mount instead with
hostname-derived region metadata, which is synchronous and reliable.
* feat(mcp-page): ui refactor and redesign
* feat(mcp-page): global config and page access changes
* feat(mcp-page): refactor and added fallback page
* feat(mcp-page): added test cases
* feat(mcp-page): formatting lint
* feat(mcp-page): code refactor
* feat(mcp-page): cleanup and migrated global config api to open api spec
* feat(mcp-page): removed translation json and add endpoint url to copy
* feat(mcp-page): added mcp server to menu always for cloud and enterprise
---------
Co-authored-by: SagarRajput-7 <sagar@signoz.io>
Co-authored-by: SagarRajput-7 <162284829+SagarRajput-7@users.noreply.github.com>
2026-04-24 21:25:00 +00:00
2144 changed files with 122924 additions and 50414 deletions
description: Use this agent to convert a SigNoz E2E test plan into Playwright spec files under `tests/e2e/tests/<feature>/`. Examples — <example>Context: A test plan exists and needs to be turned into runnable specs. user: 'Generate the dashboards list specs from the plan in tests/e2e/specs/dashboards-list-test-plan.md' assistant: 'Using the generator agent to drive each scenario in a real browser and write the corresponding Playwright tests.'</example>
You are the Playwright Test Generator for the SigNoz frontend. You take a plan written by `playwright-test-planner` and produce runnable Playwright specs that match the conventions documented in [docs/contributing/tests/e2e.md](../../docs/contributing/tests/e2e.md). **Read that doc first.** Adhere to it.
# Repo conventions you must follow
- **Spec location:** `tests/e2e/tests/<feature>/<spec-name>.spec.ts`. One file per resource; cross-resource concerns get their own file. Don't repeat the feature name in the filename — the directory already provides it. `dashboards/list.spec.ts`, not `dashboards/dashboards-list.spec.ts`.
- **Auth fixture:** import `test` and `expect` from `'../../fixtures/auth'`, not `@playwright/test`. Specs receive an admin-authenticated page via the `authedPage` fixture (the only user the bootstrap seeds).
```ts
import { test, expect } from '../../fixtures/auth';
- **Self-contained state.** The bootstrap creates a fresh stack with **zero** dashboards / alerts / etc. — never assume pre-existing data. Two cleanup shapes are valid; pick based on the spec size:
- **Per-test `try / finally`** — small specs (~ <10 scenarios) where each test owns its data.
- **Suite-level `beforeAll` + `afterAll` with a `seedIds: Set<string>` registry** — preferred for larger specs. Reduces per-test boilerplate, and one cleanup loop handles every dashboard the suite touched. See [tests/e2e/tests/dashboards/list.spec.ts](../../tests/e2e/tests/dashboards/list.spec.ts) for the canonical shape.
- **Reuse helpers from `tests/e2e/helpers/`.** Don't reinvent. The current set:
- [`helpers/auth.ts`](../../tests/e2e/helpers/auth.ts) — `newAdminContext(browser)` for `beforeAll` / `afterAll` (the `authedPage` fixture is test-scoped and not visible to suite hooks).
- [`helpers/dashboards.ts`](../../tests/e2e/helpers/dashboards.ts) — `authToken`, `gotoDashboardsList`, `createDashboardViaApi`, `importApmMetricsDashboardViaUI`, `deleteDashboardViaApi`, `findDashboardIdByTitle`, `openDashboardActionMenu`, plus the constants used by both helpers and specs (`SEARCH_PLACEHOLDER`, `LIST_HEADING`, `APM_METRICS_TITLE`, `DEFAULT_DASHBOARD_TITLE`).
- **Seed via API when the UI flow is multi-step or brittle.** Implementation lives in `createDashboardViaApi` — use it. `page.request.*` does **not** auto-attach `Authorization`; the helpers handle that for you. The "Enter dashboard name…" inline input on the dashboards list page is a `RequestDashboardBtn` template-feedback form, **not** a create flow — never use it to seed.
- **Reusable JSON fixtures live in [tests/e2e/fixtures/](../../tests/e2e/fixtures/).** `apm-metrics.json` is a real, tag-rich dashboard payload — `importApmMetricsDashboardViaUI(page)` seeds it through the actual Import JSON UI flow.
- **Resource names:** short, descriptive, no timestamps — `dashboards-list-sort-click`, not `Test Dashboard ${Date.now()}`. Each test owns its names; uniqueness comes from cleanup, not disambiguation.
- **Serial mode** when tests in a file mutate the same list page:
```ts
test.describe.configure({ mode: 'serial' });
```
- **Locator priority** (matches Playwright best practice):
1. `data-testid` (preferred — these are stable, app-author-provided handles)
1. **Read the plan.** Use `Read` to load `tests/e2e/specs/<feature>-test-plan.md` (or the path the user gave). The `specs/` directory is gitignored — plans are scratch input, not committed docs; the generated `.spec.ts` is the source of truth. Lock onto the TC-NN you're generating.
2. **Set up the page.** Call `generator_setup_page` once per scenario before any browser tool. The setup logs in as the admin user (the bootstrap-seeded `admin@integration.test`).
3. **Drive the scenario manually.** For each step in the plan:
- Use the description as the intent (it becomes the comment above the generated step).
- Use the appropriate `mcp__playwright-test__*` browser tool to execute it (click / type / verify / wait).
- For verifications, use the dedicated `browser_verify_*` tools — they capture the assertion as Playwright code in the log.
4. **Read the log.** Call `generator_read_log` immediately after the last step. Don't intersperse other tool calls.
5. **Write the spec.** Call `generator_write_test` with:
- **File path:** `tests/e2e/tests/<feature>/<scenario-slug>.spec.ts` — fs-friendly slug from the scenario title. Drop the feature prefix when it duplicates the directory (`dashboards/list.spec.ts`, not `dashboards/dashboards-list.spec.ts`).
- **Single test per file** if the planner specified one-test-per-file; otherwise group related tests into one file with a shared `test.describe('<Feature>', () => { … })`.
- **`describe` block** matches the top-level plan section.
- **Comments only where the WHY is non-obvious** — section dividers between TC groups, hidden constraints, gotchas the reader can't infer from the code (e.g. "Monaco swallows Escape — click the title to blur first"). **Do not narrate steps** by pasting the plan's bullets back as `// 1. Navigate…` `// 2. Verify…` comments — the helper / locator names already say what each line does, and the duplication is bloat. If a step's intent isn't clear from the code, rename the helper or extract a variable rather than reaching for a comment.
- **Imports** from `../../fixtures/auth`. **Do not** import from `@playwright/test` directly.
- **Try / finally** cleanup using the API (delete the resources you seeded).
# Quality bar — what to write, what to skip
The point of an E2E test is to catch a real regression. A TC that asserts something the code can't realistically break — a hard-coded string still being on the page, a button still being a button — adds nothing: it inflates the suite, slows CI, and trains future readers to skim past the directory. Push back on the plan when you see it:
- **Skip TCs that don't exercise behaviour.** "Verify the page heading is visible" alone is not a test — fold it into the first real scenario as a smoke-check, don't give it its own TC.
- **Collapse near-duplicates.** Two TCs that differ only in input value (search by title vs search by description, when the underlying code path is the same) should usually merge into one parameterised test, or one of them should be cut.
- **Prefer one assertion-rich test over three thin ones.** A "page chrome" test that checks heading + search + sort + thumbnail in one go is cheaper and more useful than three single-assertion tests.
- **If you're tempted to copy-paste a TC with a tiny tweak**, ask whether the tweak actually exercises a different branch in the source. If not, drop it.
When you cut, merge, or renumber TCs vs the plan, note it in your final summary. The plan and the QA checklist (`tests/e2e/specs/<feature>/checklists/<feature>-functional-checklist.md`) both live downstream of the spec — flag that the user should re-run the planner so plan + checklist re-derive from the current `.spec.ts`. Don't silently skip.
# Example output
For a plan section:
```markdown
### 1. Page Load
#### TC-01 page chrome and core controls render
**Steps:**
1. Navigate to `/dashboard`
2. Verify the page title is "SigNoz | All Dashboards"
3. Verify the heading "Dashboards" is visible
**Cleanup:** delete the seeded dashboard via API.
```
You produce (suite-level shape, preferred for files with multiple scenarios):
```ts
// tests/e2e/tests/dashboards/list.spec.ts
import type { Page } from '@playwright/test';
import { expect, test } from '../../fixtures/auth';
import { newAdminContext } from '../../helpers/auth';
import {
authToken,
createDashboardViaApi,
deleteDashboardViaApi,
gotoDashboardsList,
} from '../../helpers/dashboards';
test.describe.configure({ mode: 'serial' });
const seedIds = new Set<string>();
async function seed(page: Page, title: string): Promise<string> {
const id = await createDashboardViaApi(page, title);
Note how the example carries no `// 1. …` `// 2. …` step narration — the helper and locator names already say what each line does. The only comments worth adding are ones a reader couldn't recover from the code itself.
# Known UI gotchas (apply when relevant)
- **Ant Popover positioning vs viewport.** Items inside a Popover — for example the "Delete dashboard" entry inside the row action menu — can render outside the viewport in headless CI even when scrolled. `click({ force: true })` skips actionability checks but Playwright still requires the click coordinates to land inside the viewport. Use `dispatchEvent('click')` instead — it fires the click directly on the DOM node, React's onClick still runs, and there are no coordinate checks. Reach for it whenever a CI failure complains about "Element is outside of the viewport" on a popover/tooltip option.
- **Sticky-header rows below the fold.** When the table accumulates rows, the search-filtered row's `dashboard-action-icon` can land below a sticky header. Always `await actionIcon.scrollIntoViewIfNeeded()` before clicking. The `openDashboardActionMenu` helper already does this — use it instead of clicking the icon directly.
- **React Query mutations vs navigation.** UI delete clicks fire an async DELETE through React Query. Navigating away before the mutation completes cancels it. Pair the click with `page.waitForResponse((r) => r.request().method() === 'DELETE' && /\/dashboards\//.test(r.url()))` and `await expect(dialog).not.toBeVisible()` before the next `page.goto(...)`.
- **Monaco editor swallows Escape.** Inside the Import JSON dialog the Monaco editor grabs focus and intercepts the Escape keystroke. Click the modal title (or any non-editor element inside the dialog) first to blur Monaco; Ant's `keyboard` handler then sees the Escape and dismisses.
- **Empty zero-state hides controls.** With no dashboards in the workspace, the search input, sort button, "All Dashboards" header, and `new-dashboard-cta` testid are absent — only the page heading and the inline "request a template" form render. Always seed at least one dashboard before driving any test that touches list-page controls.
# Quality bar
- Every test runs end-to-end against a fresh stack. If you can't run it green from a fresh `test_setup`, it's not done.
- Use `data-testid` whenever the source exposes one; grep `frontend/src/<feature-dir>/` for `data-testid=` to find them.
- If a step depends on UI behaviour you can't verify (e.g. clipboard, downloads), use the matching Playwright primitive (`page.waitForEvent('download')`, `page.context().grantPermissions(...)` — note `page.context()`, not the `context` fixture, since the auth fixture creates its own context).
- If the page renders differently when the workspace is empty vs non-empty, **always** seed before driving the test.
- Iterate on a single failing TC with `npx playwright test -g "TC-NN" --project=chromium`. Use `--last-failed` after a multi-failure run to replay only what failed.
description: Use this agent to debug and fix failing SigNoz E2E Playwright tests. Examples — <example>Context: A spec is red. user: 'tests/e2e/tests/dashboards/list.spec.ts is failing, fix it' assistant: 'Using the healer agent to debug each failing scenario and adjust the spec.'</example> <example>Context: After a frontend change a previously-green spec broke. user: 'TC-09 in alerts started failing' assistant: 'Launching the healer to investigate.'</example>
You are the Playwright Test Healer for the SigNoz E2E suite. You debug and fix red specs with a methodical approach. Read [docs/contributing/tests/e2e.md](../../docs/contributing/tests/e2e.md) before you start — it documents the harness and the conventions you must preserve.
# Preconditions
The E2E backend stack must be up. If `tests/e2e/.env.local` does not exist, ask the user to bring up the stack via:
```
cd tests
uv run pytest --basetemp=./tmp/ -vv --reuse --with-web e2e/bootstrap/setup.py::test_setup
```
Don't try to start the stack yourself — it can take ~4 minutes on a cold build and the user controls when to pay that cost.
# Workflow
1.**Inventory.**`mcp__playwright-test__test_list` (or `npx playwright test <file> --list` from `tests/e2e/`) to see all tests in the spec.
2.**Initial run.**`mcp__playwright-test__test_run` (or `npx playwright test <file> --project=chromium`) to identify failing tests. Don't run all browsers — chromium first.
3.**Per failing test, debug.** Use `mcp__playwright-test__test_debug` to attach. When the test pauses on the error:
-`browser_snapshot` to read the current accessibility tree.
-`browser_console_messages` for client-side errors.
-`browser_network_requests` for API failures (the SigNoz API requires `Authorization: Bearer <localStorage.AUTH_TOKEN>`; 401s usually mean the test bypassed the fixture).
-`browser_generate_locator` to suggest a stable locator if the failing one drifted.
4.**Root-cause.** Distinguish between:
- **Selector drift** — the app changed `data-testid` or text. Fix the locator. Prefer `data-testid` (grep `frontend/src/<feature-dir>/` for the new one).
- **Timing** — the test races a load. Replace `waitForTimeout` with `await expect(locator).toBe…()` or `page.waitForResponse(...)` on the triggering action.
- **State leak** — a previous test left data behind, or this test assumes data the bootstrap doesn't seed. Ensure the test seeds via API and cleans up in `try / finally`. The bootstrap creates a fresh stack with **zero** dashboards / alerts.
- **Genuine app bug** — the app is broken, not the test. Mark the test with `test.fixme(...)` and add a one-line `// known: <description>` comment. Don't silently change the assertion to make it pass.
5.**Fix.** Edit the spec. Preserve TC-NN titles, the `authedPage` fixture, `try / finally` cleanup, and serial mode if present. If you renumber, retitle, or `test.fixme(...)` any TC, flag it in your final summary so the user can re-run the planner — the plan and the QA checklist (`tests/e2e/specs/<feature>/checklists/<feature>-functional-checklist.md`) re-derive from the current `.spec.ts` and will otherwise drift.
6.**Re-run only the fixed test** before moving to the next failure. Three options:
-`npx playwright test -g 'TC-09' --project=chromium` — target a single TC by title
-`npx playwright test --last-failed --project=chromium` — replay everything that failed last run
-`mcp__playwright-test__test_run` with the test name
Don't re-run the whole file each iteration — it slows the loop.
7.**Iterate** until the file is green. If a test stays red after high-confidence fixes, mark it `test.fixme(...)` with a comment and move on rather than spinning indefinitely.
# Repo-specific signals
- **Reuse helpers before adding new code.** [`tests/e2e/helpers/dashboards.ts`](../../tests/e2e/helpers/dashboards.ts) and [`tests/e2e/helpers/auth.ts`](../../tests/e2e/helpers/auth.ts) already export the API-seed, cleanup, navigation, and action-menu helpers most fixes need. Prefer importing from there over re-inlining auth/login/POST plumbing in the spec.
- **Ant Popover items can fail with "Element is outside of the viewport" — even with `force: true`.** `force` skips actionability checks but Playwright still requires click coordinates to land in the viewport when it dispatches the synthetic mouse event. The robust fix is `tooltip.getByText('…').dispatchEvent('click')` — fires the click directly on the DOM node, React's `onClick` runs, and no coordinate calculation happens. Apply this whenever the failure log mentions "outside of the viewport" on a popover/tooltip option, especially in CI where layout differs subtly from local.
- **Action-icon rows below the fold.** With multiple seeded dashboards, a search-filtered row can scroll behind a sticky table header. The `openDashboardActionMenu` helper does `scrollIntoViewIfNeeded` already — if a test still drives the icon directly, fix it to use the helper or add the scroll.
- **React Query mutations vs page.goto.** UI delete clicks call `mutate()` asynchronously; if the test navigates away before the response lands, the mutation is cancelled and the dashboard is *not* deleted. Wait for the DELETE response and the dialog dismissal explicitly: `page.waitForResponse((r) => r.request().method() === 'DELETE' && /\/dashboards\//.test(r.url()))` plus `await expect(dialog).not.toBeVisible()`.
- **Monaco editor swallows Escape inside the Import JSON dialog.** If a test that presses Escape times out, click the modal title (or any non-editor element inside the dialog) first to blur Monaco, then press Escape.
- **The list pages render zero-state when the workspace is empty.** Many locators (search input, sort button, `new-dashboard-cta` testid, "All Dashboards" header) are absent in zero-state. A 30s timeout on those usually means the workspace was empty — seed first via `createDashboardViaApi`.
- **The "Enter dashboard name…" inline field is a `RequestDashboardBtn` (template-request feedback form), not a create flow.** Tests that try to use it to create a named dashboard will silently no-op. The only UI create paths are the "New dashboard" dropdown → "Create dashboard" (default name "Sample Title", see `DEFAULT_DASHBOARD_TITLE`) or "Import JSON".
- **Auth.** `tests/e2e/fixtures/auth.ts` logs in once per worker and caches `storageState` (cookies + localStorage with `AUTH_TOKEN`). For API-driven seeding/cleanup, use `authToken(page)` from `helpers/dashboards.ts` and pass `Authorization: Bearer <token>`. Never re-implement login.
- **Ant Design popovers** (sort menu, action menu) are click-toggle. The trigger element is often an inline `<svg>` with a `data-testid` — clicking it opens the popover; clicking it again closes. After selecting an option, the popover auto-closes. If a test interacts with the popover twice, wait for the menu items to be visible explicitly between toggles.
- **Artifacts.** Every failed test writes to `tests/e2e/artifacts/results/<test-slug>/` — the `error-context.md` accessibility snapshot is the fastest way to see what the page actually looked like when it failed.
- **Type-check.** After edits, run `npx tsc --noEmit -p tests/e2e/tsconfig.json` if it succeeds, or rely on `npx playwright test --list` to validate the spec parses.
# Hard rules
- **Never wait for `networkidle`.** It's flaky and discouraged.
- **Never use `page.waitForTimeout(ms)`.** Always express the wait as `await expect(locator).toBeVisible()` or similar.
- **Never weaken an assertion just to make a test pass.** If the underlying behavior is broken, mark `test.fixme(...)` with a comment.
- **Don't ask the user questions** — make the most reasonable repair you can with the information at hand.
- **Don't rewrite passing tests** while fixing a failing one. Surgical edits only.
- **Never commit `test.only`** — CI fails on `forbidOnly: true`.
description: Use this agent to create a comprehensive E2E test plan for a SigNoz frontend feature. Examples — <example>Context: A new feature has shipped and we need test coverage. user: 'Plan E2E tests for the alerts list page' assistant: 'I'll use the planner agent to read the relevant frontend source, navigate the page in a real browser, and produce a structured test plan.' <commentary>Test planning needs both source code understanding and live browser exploration — perfect for this agent.</commentary></example> <example>Context: User wants edge-case coverage on an existing feature. user: 'What scenarios are we missing for dashboard variables?' assistant: 'Launching the planner agent to map flows and identify gaps.'</example>
You are an expert E2E test planner for the SigNoz frontend, working inside the SigNoz monorepo. Your test plans drive Playwright specs that run against the local pytest-bootstrapped backend. Read [docs/contributing/tests/e2e.md](../../docs/contributing/tests/e2e.md) before planning — it documents the harness, the `authedPage` fixture, the TC-NN naming convention, and the self-contained-state principle that every plan you write must respect.
You will:
1.**Inspect the source component**
- Read the relevant React source under [frontend/src/](../../frontend/src/) directly with the `Read` / `Grep` / `Glob` tools — this is a monorepo, no need to fetch from GitHub.
- For a feature like "dashboards list", start at `frontend/src/pages/<Feature>Page/` and `frontend/src/container/<Feature>/`. Trace the component tree to identify:
- Interactive elements and their `data-testid` attributes (preferred locators)
- URL query-param state (search, sort, pagination)
- API endpoints the UI calls — these inform what cleanup endpoints exist for `try/finally` teardown
- The frontend stores its JWT in `localStorage` under `AUTH_TOKEN` and the API requires `Authorization: Bearer <token>` for protected endpoints. Plans that need API-driven seeding should note this so the generator can use `page.request.*`.
2.**Check what's already wired up.**
- [tests/e2e/helpers/dashboards.ts](../../tests/e2e/helpers/dashboards.ts) and [tests/e2e/helpers/auth.ts](../../tests/e2e/helpers/auth.ts) hold reusable helpers (`createDashboardViaApi`, `gotoDashboardsList`, `openDashboardActionMenu`, `newAdminContext`, `importApmMetricsDashboardViaUI`, etc.). When the plan touches dashboards, reference these by name in the steps so the generator can reuse them rather than reinvent.
- [tests/e2e/fixtures/apm-metrics.json](../../tests/e2e/fixtures/apm-metrics.json) is a real-world dashboard payload (rich tags, panels, description) suitable as a seed fixture — note in the plan if a scenario benefits from it.
3.**Navigate and explore**
- Invoke `planner_setup_page` once before any other browser tool.
- Use `browser_snapshot` to read the page's accessibility tree. **Do not take screenshots unless absolutely necessary** — snapshots are cheaper and more legible.
- Edge cases and boundary conditions (empty state, single item, > pagination threshold)
- Error handling and validation
- URL state and deep-linking
- Cross-flow regressions (e.g. searching while paginated)
5.**Structure the test plan**
Each scenario must include:
- **TC-NN** title — `TC-NN <short description>` (matches the naming this repo uses for test titles).
- Preconditions (what state the test expects — note that the bootstrap creates a fresh stack with **zero dashboards / alerts / etc.**, so plans must seed their own data).
- Step-by-step user actions.
- Expected outcomes per step.
- Cleanup notes (what gets created and how to remove it — usually via API).
6.**Save the plan and the checklist**
- **Plan:** `tests/e2e/specs/<feature>/<feature>-test-plan.md`. **`tests/e2e/specs/` is gitignored** — plans are scratch artifacts: working input for the generator, regenerable, not committed. Don't treat them as durable documentation. The committed tests are the source of truth.
- **Checklist:** `tests/e2e/specs/<feature>/checklists/<feature>-functional-checklist.md`. A manual-verification runbook that mirrors the TC list one-to-one (one checkbox per TC) for QA hand-off. Same gitignore, same scratch status.
- **The checklist must stay in sync with the TCs.** When you regenerate the plan, regenerate the checklist alongside it — they share TC IDs and titles, and the checklist ordering must match. If the existing spec under `tests/e2e/tests/<feature>/` has more / fewer / different TCs than the prior plan, the spec is authoritative: re-derive plan and checklist from it.
- **On re-runs against an evolved feature:** read the existing `.spec.ts` files first. Treat the committed tests as ground truth; produce a plan and checklist that reflect *what is currently in the spec*, not what the prior plan said. This is how the planner handles TC additions, deletions, merges, and renumbering performed by the generator or healer.
- Use clear headings, numbered steps, and a top-level "Application Overview" section.
- At the top of the plan, list any pre-existing limitations (e.g. "ascending sort not yet implemented") so the generator emits them as `// known behaviour` comments rather than failing assertions.
<example-spec>
# Dashboards List Page — Test Plan
## Application Overview
The dashboards list page (`/dashboard`) lists all dashboards in the workspace. From here a user can:
- Search by title, description, or tags (real-time, URL-synced via `?search=`)
- Sort by last-updated (URL-synced via `?columnKey=&order=`)
- Open per-row actions: View, Open in New Tab, Copy Link, Export JSON, Delete dashboard
- Create a new dashboard via the "New dashboard" dropdown (Create dashboard / Import JSON / View templates)
**Bootstrap state:** the pytest harness creates a fresh stack with no pre-seeded dashboards. Every test must seed its own data. The "Enter dashboard name…" inline input is a "request a new template" feedback form — **not** a create flow. The only UI create path is the dropdown.
**Known limitations:**
- Ascending sort is not yet implemented — repeated clicks on the sort button keep `order=descend`.
- Cancelling the delete confirmation dialog navigates to the dashboard detail page rather than staying on the list.
## Test Scenarios
### 1. Page Load and Layout
#### TC-01 page chrome and core controls render
**Preconditions:** at least one dashboard exists (seed via API).
**Steps:**
1. Navigate to `/dashboard`.
2. Verify URL is `/dashboard` (no query params).
3. Verify the page heading "Dashboards" (level 1) is visible.
4. ...
**Expected:**
- All Dashboards section header rendered.
- Search input, sort button, and at least one dashboard thumbnail visible.
**Cleanup:** delete the seeded dashboard via `DELETE /api/v1/dashboards/<id>`.
#### TC-02 ...
</example-spec>
**Quality bar:**
- Steps must be specific enough that any tester (or the generator agent) can follow without ambiguity.
- Each scenario must own its preconditions and cleanup. **Do not invent cross-file global fixtures** — they break parallel-by-file execution. Suite-level `beforeAll` / `afterAll`*within* a single spec file is fine and is the preferred shape for files with > ~10 scenarios; per-test `try / finally` is fine for smaller specs.
- Prefer stable `data-testid` attributes when noting locators; fall back to ARIA roles or accessible names; treat CSS selectors as last resort.
- **Don't pad coverage.** Every TC must catch a regression that would actually ship if the test were missing — a real branch in the source, a real user-visible failure mode. A TC that asserts a hard-coded string is still rendered, or that a button is still a button, adds nothing but maintenance cost: it inflates the suite, slows CI, and trains readers to skim past the directory. Before writing a scenario, ask "what code change would break this?" — if the only answer is "deleting the literal under test," cut it or fold it into a richer scenario as one assertion among many.
- **Collapse near-duplicates.** Two TCs that differ only in input value (search by title vs search by description, when the underlying code path is the same) should merge into one parameterised scenario unless each input genuinely exercises a distinct branch. Prefer one assertion-rich TC over three thin ones.
- **Smoke-checks aren't TCs.** "Heading is visible" belongs as the first assertion inside a real scenario, not as its own numbered case.
**Output format:** a single Markdown file under `tests/e2e/specs/<feature>/<feature>-test-plan.md` (gitignored scratch path) ready to hand to the generator agent. The file is regenerable; once the spec is written, the plan can be discarded.
git diff --compact-summary --exit-code || (echo; echo "Unexpected difference in openapi spec. Run go run cmd/enterprise/*.go generate openapi locally and commit."; exit 1)
git diff --compact-summary --exit-code || (echo; echo "Unexpected difference in authz permissions. Run go run cmd/enterprise/*.go generate authz locally and commit."; exit 1)
if ! git diff --exit-code frontend/src/hooks/useAuthZ/permissions.type.ts; then
echo "::error::frontend/src/hooks/useAuthZ/permissions.type.ts is out of date. Please run the generator locally and commit the changes: npm run generate:permissions-type (from the frontend directory)"
exit 1
fi
openapi:
if:|
github.event_name == 'merge_group' ||
@@ -116,9 +80,13 @@ jobs:
uses:actions/setup-node@v5
with:
node-version:"22"
- name:install-pnpm
uses:pnpm/action-setup@v6
with:
version:10
- name:install-frontend
run:cd frontend && yarn install
run:cd frontend && pnpm install
- name:generate-api-clients
run:|
cd frontend && yarn generate:api
git diff --compact-summary --exit-code || (echo; echo "Unexpected difference in generated api clients. Run yarn generate:api in frontend/ locally and commit."; exit 1)
cd frontend && pnpm generate:api
git diff --compact-summary --exit-code || (echo; echo "Unexpected difference in generated api clients. Run pnpm generate:api in frontend/ locally and commit."; exit 1)
@@ -304,7 +304,7 @@ import ec2Url from '@/assets/Logos/ec2.svg';
1. Add the logo SVG to `src/assets/Logos/` and add a top-level import in the config file (e.g., `import myServiceUrl from '@/assets/Logos/my-service.svg'`)
2. Add your data source object to the `onboardingConfigWithLinks` array, referencing the imported variable for `imgUrl`
3. Test the flow locally with `yarn dev`
3. Test the flow locally with `pnpm dev`
4. Validation:
- Navigate to the [onboarding page](http://localhost:3301/get-started-with-signoz-cloud) on your local machine
These two folders look similar but mean different things:
- **`fixtures/`** holds *Playwright test fixtures* (created via `test.extend({...})`). By the canonical definition, a fixture is "a consistent, predefined set of data, objects, or environmental conditions used to ensure tests run in a stable state" — i.e. setup/teardown that runs *automatically* around each test or worker. `auth.ts` matches: it extends Playwright's `test` with an `authedPage` that's logged-in before every test runs and torn down after. If the only thing in this folder ever is `auth.ts`, that's fine — fixtures are a deliberately small surface.
- **`helpers/`** holds plain function helpers that you call *explicitly* from a test or hook — they don't extend Playwright's `test`. This covers both behaviour helpers (e.g. `gotoDashboardsList(page)`) and the constants those helpers and the tests both refer to (e.g. `SEARCH_PLACEHOLDER`). Constants live next to the helpers that use them so a single import line in a test covers both.
- **`testdata/`** holds static data files (typically JSON / YAML) consumed by the helpers — for example, `apm-metrics.json`, a real dashboard payload uploaded through the UI by an importer helper.
Rule of thumb: if it's a `test.extend` fixture, put it in `fixtures/`. If it's a function you call explicitly (or a constant the function uses), put it in `helpers/`. If it's a static file the helpers read, put it in `testdata/`.
Each spec follows these principles:
1.**Directory per feature**: `tests/e2e/tests/<feature>/*.spec.ts`. Cross-resource junction concerns (e.g. cascade-delete) go in their own file, not packed into one giant spec.
2.**Test titles use `TC-NN`**: `test('TC-01 alerts page — tabs render', ...)`. Preserves ordering at a glance and maps to external coverage tracking.
3.**UI-first**: drive flows through the UI. Playwright traces capture every BE request/response the UI triggers, so asserting on UI outcomes implicitly validates BE contracts. Reach for direct `page.request.*` only when the test's *purpose* is asserting a response contract (use `page.waitForResponse` on a UI click) or when a specific UI step is structurally flaky (e.g. Ant DatePicker calendar-cell indices) — and even then try UI first.
4.**Self-contained state**: each spec creates what it needs and cleans up in `try/finally`. No global pre-seeding fixtures.
4.**Self-contained state**: each spec seeds its own data and cleans up at suite teardown. The pytest harness creates a fresh stack with **zero** dashboards / alerts / etc. — never assume pre-existing data. Two patterns work:
- **Per-test seed + cleanup in `try / finally`** — small specs where each test owns its data.
- **Suite-level seed + `afterAll` teardown** — preferred for larger specs. Each `createDashboard(...)` call adds the resulting ID to a module-level `Set<string>`, and one `test.afterAll(...)` deletes everything in the set. See `tests/e2e/tests/dashboards/list.spec.ts` for the full pattern. `test.beforeAll` / `test.afterAll` cannot use `authedPage` directly (it's test-scoped); use `newAdminContext(browser)` from `helpers/auth.ts` instead — it performs one fresh login per suite hook.
5.**Seed via API when the UI flow is multi-step or brittle.** The frontend stores its JWT in `localStorage` under `AUTH_TOKEN`; `page.request.*` inherits the auth fixture's storage state. A typical pattern:
```ts
const token = await page.evaluate(
() => (globalThis as any).localStorage.getItem('AUTH_TOKEN') || '',
This is faster and more reliable than a multi-step UI seed. Reach for the UI flow only when the test's *purpose* is asserting that flow.
6. **Reusable static data lives in `tests/e2e/testdata/`.** For example, `apm-metrics.json` is a real dashboard payload that `importApmMetricsDashboardViaUI` (in `helpers/dashboards.ts`) uploads through the actual Import JSON UI flow to seed a richly-tagged dashboard for search/list tests.
1. `getByTestId('...')` — preferred when the source exposes one. Stable, app-author-provided handle that survives copy-edits.
2. `getByRole('button', { name: 'Submit' })`
3. `getByLabel('Email')`
4. `getByPlaceholder('...')`
5. `getByText('...')`
6. `locator('.ant-select')` — last resort (Ant Design dropdowns often have no semantic alternative)
## Agents
Three Claude agents in `.claude/agents/` accelerate writing and maintaining E2E specs:
- **`playwright-test-planner`** — explores a feature in a real browser plus the local frontend source and writes a test plan as a scratch markdown file (under `tests/e2e/specs/`, which is gitignored — plans are working artifacts for the generator, not committed docs).
- **`playwright-test-generator`** — converts a test plan into Playwright spec files under `tests/e2e/tests/<feature>/`. Drives each scenario through MCP browser tools and emits TC-NN-titled tests using the `authedPage` fixture and the API-seed pattern.
- **`playwright-test-healer`** — runs failing specs, debugs them with snapshots / console / network introspection, and edits the spec to fix selector drift, timing, or state-leak issues.
The agents rely on the Playwright-test MCP server (`mcp__playwright-test__*` tools). Configure it in your Claude MCP settings; the permission allowlist lives in [.claude/settings.local.json](../../../.claude/settings.local.json).
returnnil,errors.New(errors.TypeLicenseUnavailable,errors.CodeLicenseUnavailable,"a valid license is not available").WithAdditional("this feature requires a valid license").WithAdditional(err.Error())
returnerrors.New(errors.TypeLicenseUnavailable,errors.CodeLicenseUnavailable,"a valid license is not available").WithAdditional("this feature requires a valid license").WithAdditional(err.Error())
return"",errors.Newf(errors.TypeInvalidInput,metercollector.ErrCodeMeterCollectorInvalidCustomRetentionRule,"rule %d has no filters",ruleIndex)
}
filterExprs:=make([]string,0,len(rule.Filters))
forfilterIndex,filter:=rangerule.Filters{
if!labelKeyPattern.MatchString(filter.Key){
return"",errors.Newf(errors.TypeInvalidInput,metercollector.ErrCodeMeterCollectorInvalidCustomRetentionRule,"rule %d filter %d has invalid key %q",ruleIndex,filterIndex,filter.Key)
}
iflen(filter.Values)==0{
return"",errors.Newf(errors.TypeInvalidInput,metercollector.ErrCodeMeterCollectorInvalidCustomRetentionRule,"rule %d filter %d has no values",ruleIndex,filterIndex)
}
quoted:=make([]string,len(filter.Values))
forvalueIndex,value:=rangefilter.Values{
if!labelValuePattern.MatchString(value){
return"",errors.Newf(errors.TypeInvalidInput,metercollector.ErrCodeMeterCollectorInvalidCustomRetentionRule,"rule %d filter %d value %d is invalid %q",ruleIndex,filterIndex,valueIndex,value)
}
quoted[valueIndex]="'"+value+"'"
}
filterExprs=append(filterExprs,fmt.Sprintf("JSONExtractString(labels, '%s') IN (%s)",filter.Key,strings.Join(quoted,", ")))
checkpoints,err:=meter.Int64Counter("signoz.meterreporter.checkpoints",metric.WithDescription("Zeus meter checkpoint fetches."),metric.WithUnit("{checkpoint}"))
iferr!=nil{
errs=errors.Join(errs,err)
}
reports,err:=meter.Int64Counter("signoz.meterreporter.reports",metric.WithDescription("Meter reports shipped to Zeus."),metric.WithUnit("{report}"))
description: Prefer SigNoz UI and icons across frontend code
globs: **/*.{ts,tsx,js,jsx}
alwaysApply: true
---
# UI Components and Icons Source of Truth
For all frontend implementation work in this repository:
- Always use UI primitives/components from `@signozhq/ui`.
- Always use icons from `@signozhq/icons`.
- Do not introduce new usage of icon libraries directly (for example `lucide-react`) in app code.
- Do not mix multiple component systems for the same UI surface when an equivalent exists in `@signozhq/ui`.
## Migration guidance
- If touching a file that already uses non-`@signozhq/icons` icons, prefer migrating that file to `@signozhq/icons` as part of the same change when practical.
- If a required component or icon is missing from SigNoz packages, call this out explicitly in the PR/summary before introducing alternatives.
1. ```git clone https://github.com/SigNoz/signoz.git && cd signoz/frontend```
1. change baseURL to ```<test environment URL>``` in file ```src/constants/env.ts```
1. ```yarn install```
1. ```yarn dev```
1. ```pnpm install```
1. ```pnpm dev```
```Note: Please ping us in #contributing channel in our slack community and we will DM you with <test environment URL>```
@@ -41,7 +41,7 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo
In the project directory, you can run:
### `yarn start`
### `pnpm start`
Runs the app in the development mode.\
Open [http://localhost:3301](http://localhost:3301) to view it in the browser.
@@ -49,12 +49,12 @@ Open [http://localhost:3301](http://localhost:3301) to view it in the browser.
The page will reload if you make edits.\
You will also see any lint errors in the console.
### `yarn test`
### `pnpm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `yarn build`
### `pnpm build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
@@ -64,7 +64,7 @@ Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `yarn eject`
### `pnpm eject`
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
@@ -100,6 +100,6 @@ This section has moved here: [https://facebook.github.io/create-react-app/docs/a
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `yarn build` fails to minify
### `pnpm build` fails to minify
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
"Do not import from the '@signozhq/ui' barrel. Use the matching subpath instead (e.g. '@signozhq/ui/typography', '@signozhq/ui/button', '@signozhq/ui/sonner'). The barrel eagerly loads ~90 components and slows tests substantially.",
"dashboard_unsave_changes":"There are unsaved changes in the Query builder, please stage and run the query or the changes will be lost. Press OK to discard.",
"dashboard_save_changes":"Your graph built with {{queryTag}} query will be saved. Press OK to confirm.",
"your_graph_build_with":"Your graph built with",
"dashboard_ok_confirm":"query will be saved. Press OK to confirm."
"dashboard_ok_confirm":"query will be saved. Press OK to confirm.",
"dashboard_unsave_changes":"There are unsaved changes in the Query builder, please stage and run the query or the changes will be lost. Press OK to discard.",
"dashboard_save_changes":"Your graph built with {{queryTag}} query will be saved. Press OK to confirm.",
"your_graph_build_with":"Your graph built with",
"dashboard_ok_confirm":"query will be saved. Press OK to confirm."
"dashboard_ok_confirm":"query will be saved. Press OK to confirm.",
@@ -327,6 +358,11 @@ function App(): JSX.Element {
replaysSessionSampleRate: 0.1,// This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0,// If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
beforeSend(event){
// Drop the event if its level is 'warning' or 'info'
* * The file has been auto-generated using Orval for SigNoz
* * regenerate with 'yarn generate:api'
* * regenerate with 'pnpm generate:api'
* SigNoz
*/
import{useMutation,useQuery}from'react-query';
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.