* 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
* refactor: move waterfall traverse logic to types
and extract out auto expanded span calculation
* chore: convert all timestamp to nano for consitancy
* chore: rename waterfall response to gettableX format
* chore: fix method calls in test after refactoring
* refactor: remove unused methods
* chore: fix openapi spec
* chore: better names for methods and vars
* chore: remove caching to match from v2
* chore: update openapi client
* refactor: move selection decision to types
* chore: move types to the top
* refactor: avoid passing the whole telementry store in a module
* refactor: move waterfall constants to module config
* chore: update openapi specs
* chore: update openapi clints
* feat(authz): add support for delete role
* feat(authz): register config and return error on cleanup failure
* feat(authz): take user and serviceaccount DI for assignee checks
* feat(authz): add the example yaml
* feat(authz): move to callbacks instead of DI
* 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: updated spec
* chore: nil pointer dereference fix in req.Filter
* chore: added temporalities of metrics
* chore: unified composite key function
* chore: code improvements
* 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: comments resolve
* chore: added json tag required: true
* chore: added status unauthorized
* chore: remove a defensive nil map check, the function ensure non-nil map when err nil
* 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>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: perses schema for dashboards
* chore: no need for Signal type in commons, only used once
* chore: no need for PageSize type in commons, only used once
* chore: rm comment
* chore: remove stub for time series chart
* chore: remove manually written manifest and package
* chore: remove validate file
* chore: no config folder
* chore: no config folder
* chore: no commons (for now)
* feat: validation script
* fix: remove fields from variable specs that are there in ListVariable
* chore: test file with way more examples
* chore: test file with way more examples
* chore: checkpoint for half correct setup
* chore: rearrange specs in package.json
* chore: py script not needed
* chore: rename
* chore: folders in schemas for arranging
* chore: folders in schemas for arranging
* fix: proper composite query schema
* feat: custom time series schema
* chore: comment explaining when to use composite query and when not
* feat: promql example
* chore: remove upstream import
* fix: promql fix
* docs: time series panel schema without upstream ref
* chore: object for visualization section
* docs: bar chart panel schema without upstream ref
* docs: number panel schema without upstream ref
* docs: number panel schema without upstream ref
* docs: pie chart panel schema without upstream ref
* docs: table chart panel schema without upstream ref
* docs: histogram chart panel schema without upstream ref
* docs: list panel schema without upstream ref
* chore: a more complex example
* chore: examples for panel types
* chore: remaining fields file
* fix: no more online validation
* chore: replace yAxisUnit by unit
* chore: no need for threshold prefix inside threshold obj
* chore: remove unimplemented join query schema
* fix: no nesting in context links
* fix: less verbose field names in dynamic var
* chore: actually name every panel as a panel
* chore: common package for panels' repeated definitions
* chore: common package for queries' repeated definitions
* chore: common package for variables' repeated definitions
* fix: functions in formula
* fix: only allow one of metric or expr aggregation in builder query
* fix: datasource in perses.json
* fix: promql step duration schema
* fix: proper type for selectFields
* chore: single version for all schemas
* fix: normalise enum defs
* chore: change attr name to name
* chore: common threshold type
* chore: doc for how to add a panel spec
* feat: textbox variable
* feat: go struct based schema for dashboardv2 with validations and some tests
* fix: go mod fix
* chore: perses folder not needed anymore
* chore: use perses updated/createdat
* fix: builder query validation (might need to revisit, 3 types seems bad)
* chore: go lint fixes
* chore: define constants for enum values
* chore: nil factory case not needed
* chore: nil factory case not needed
* chore: slight rearrange for builder spec readability
* feat: add TimeSeriesChartAppearance
* chore: no omit empty
* chore: span gaps in schema
* chore: context link not needed in plugins
* chore: remove format from threshold with label, rearrange structs
* test: fix unit tests
* chore: refer to common struct
* feat: query type and panel type matching
* test: unit tests improvement first pass
* test: unit tests improvement second pass
* test: unit tests improvement third pass
* test: unit tests improvement fourth pass
* test: unit test for dashboard with sections
* test: unit test for dashboard with sections
* fix: add missing dashboard metadata fields
* chore: go lint fixes
* chore: go lint fixes
* chore: changes for create v2 api
* chore: more info in StorableDashboardDataV2
* chore: diff check in update method
* chore: add required true tag to required fields
* feat: update metadata methods
* chore: go mod tidy
* chore: put id in metadata.name, authtypes for v2
* revert: only the schema for now in this PR
* chore: comment for why v1.DashboardSpec is chosen
* chore: change source to signal in DynamicVariableSpec
* fix: string values for precision option
* feat: literal options for comparison operator
* fix: missing required tag in threshold fields
* chore: use valuer.string for plugin kind enums
* chore: use only TelemetryFieldKey in ListPanelSpec
* chore: simplify variable plugin validation
* fix: do not allow nil panels
* fix: do not allow nil plugin spec
* fix: signal should be an enum not a string
* chore: rearrange enums to separate those with default values
* test: unit tests for invalid enum values
* fix: all enums should have a default value
* refactor: extract UnmarshalBuilderQueryBySignal to deduplicate signal dispatch
* refactor: proper struct for span gaps
* chore: back to normal strings for kind enums
* chore: ticks in err messages
* chore: ticks in err messages
* chore: remove unused struct
* chore: snake case for non-kind enum values
* chore: proper error wrapping
* chore: accept int values in PrecisionOption as fallback
* fix: actually update the plugin from map to custom struct
* feat: disallow unknown fields in plugins
* chore: make enums valuer.string
* chore: proper enum types in constants
* chore: rename value to avoid overriding valuer.string method
* test: db cycle test
* fix: lint fix in some other file
* test: remove collapse info from sections
* test: use testify package
---------
Co-authored-by: Srikanth Chekuri <srikanth.chekuri92@gmail.com>
* fix(member): better UX for pending invite users
* fix(member): add integration tests and reuse timezone util
* fix(member): rename deprecated and remove dead files
* fix(member): do not use hypened endpoints
* fix(member): user friendly button text
* fix(member): update the API endpoints and integration tests
* fix(member): simplify handler naming convention
* fix(member): added v2 API for update my password
* fix(member): remove more dead code
* fix(member): fix integration tests
* fix(member): fix integration tests
* fix(authz): populate correct error for deleted service account
* chore(authz): reduce the regex restrictions on service accounts
* chore(authz): reduce the regex restrictions on service accounts
* fix(authz): populate correct error for deleted service account
* fix(authz): populate correct error for deleted service account
* 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
* chore: rename resources field to follow otel
---------
Co-authored-by: Nityananda Gohain <nityanandagohain@gmail.com>
* feat(authz): accept singular roles for user and service accounts
* feat(authz): update integration tests
* feat(authz): update integration tests
* feat: move role management to a single select flow on members and service account pages(temporarily)
* feat(authz): enable stats reporter for service accounts
* feat(authz): identity call for activating/deleting user
---------
Co-authored-by: SagarRajput-7 <sagar@signoz.io>
* feat: updated user api to v2 and accordingly update members page and role management
* feat: updated members page to use new role management and v2 user api
* feat: updated test cases
* feat: code refactor
* feat: refactored code and addressed feedbacks
* feat: refactored code and addressed feedbacks
* feat: refactored code and addressed feedbacks
* fix(user): fix openapi spec
* feat: handle isRoot user and self user cases and added test cases
---------
Co-authored-by: vikrantgupta25 <vikrant@signoz.io>
* feat(serviceaccount): integrate service account
* feat(serviceaccount): integrate service account with better types
* feat(serviceaccount): fix lint and testing changes
* feat(serviceaccount): update integration tests
* feat(serviceaccount): fix formatting
* feat(serviceaccount): fix openapi spec
* feat(serviceaccount): update txlock to immediate to avoid busy snapshot errors
* feat(serviceaccount): add restrictions for factor_api_key
* feat(serviceaccount): add restrictions for factor_api_key
* feat: enabled service account and deprecated API Keys (#10715)
* feat: enabled service account and deprecated API Keys
* feat: deprecated API Keys
* feat: service account spec updates and role management changes
* feat: updated the error component for roles management
* feat: updated test case
* feat: updated the error component and added retries
* feat: refactored code and added retry to happend 3 times total
* feat: fixed feedbacks and added test case
* feat: refactored code and removed retry
* feat: updated the test cases
---------
Co-authored-by: SagarRajput-7 <162284829+SagarRajput-7@users.noreply.github.com>
* feat: user v2 apis
* fix: openapi specs
* chore: address review comments
* fix: proper handling if invalid roles are passed
* chore: address review comments
* refactor: frontend to use deprecated apis after id rename
* feat: separate apis for adding and deleting user role
* fix: invalidate token when roles are updated
* fix: openapi specs and frontend test
* fix: openapi schema
* fix: openapi spec and move to snakecasing for json
* feat: adding cloud integration type for refactor
* refactor: store interfaces to use local types and error
* feat: adding sql store implementation
* refactor: removing interface check
* feat: adding updated types for cloud integration
* refactor: using struct for map
* refactor: update cloud integration types and module interface
* fix: correct GetService signature and remove shadowed Data field
* feat: implement cloud integration store
* refactor: adding comments and removed wrong code
* refactor: streamlining types
* refactor: add comments for backward compatibility in PostableAgentCheckInRequest
* refactor: update Dashboard struct comments and remove unused fields
* refactor: split upsert store method
* feat: adding integration test
* refactor: clean up types
* refactor: renaming service type to service id
* refactor: using serviceID type
* feat: adding method for service id creation
* refactor: updating store methods
* refactor: clean up
* refactor: clean up
* refactor: review comments
* refactor: clean up
* feat: adding handlers
* fix: lint and ci issues
* fix: lint issues
* fix: update error code for service not found
* feat: adding handler skeleton
* chore: removing todo comment
* feat: adding frontend openapi schema
* refactor: making review changes
* feat: regenerating openapi specs
* feat(factory): add service state tracking, AwaitHealthy, depends_on, and /healthz endpoint
Add explicit lifecycle state tracking to factory.Registry services
(starting/running/failed) modeled after Guava's ServiceManager. Services
can declare dependencies via NewNamedService(..., dependsOn) which are
validated for unknown refs and cycles at registry creation. AwaitHealthy
blocks until all services reach running state. A /healthz endpoint is
wired through signozapiserver returning 200/503 with per-service state.
* feat(apiserver): move health endpoints to /api/v2/ and register readyz, livez
* refactor(factory): use gonum for cycle detection, return error on cycles, fix test assertions
Replace custom DFS cycle detection with gonum's topo.Sort + TarjanSCC.
Dependency cycles now return an error from NewRegistry instead of being
silently dropped. Use assert for final test assertions and require only
for intermediate setup errors.
* chore: go mod tidy
* refactor(factory): decouple Handler from Registry, wire through Handlers struct
Move Handler implementation to a private handler struct with NewHandler
constructor instead of methods on *Registry. Route handler through the
existing Handlers struct as RegistryHandler. Rename healthz.go to
registry.go in signozapiserver. Fix handler_test.go for new param.
* feat(factory): add ServiceWithHealthy interface, add Healthy to authz, user depends on authz
Add ServiceWithHealthy interface embedding Service + Healthy. NamedService
now delegates Healthy() to the underlying service, eliminating unwrapService.
AuthZ interface requires Healthy(), implemented in both pkg and ee providers.
User service declares dependency on authz via dependsOn.
* test(integration): use /api/v2/healthz for readiness check, log 503 response body
* fix(factory): replace fmt.Errorf with errors.Newf in tests to satisfy linter
* feat: generate openapi spec
* fix(integration): log errors at error level in healthz readiness check
* test(integration): log and assert healthz response in test_setup
* feat(user): implement ServiceWithHealthy for user service
User service signals healthy after successful root user reconciliation
or immediately when disabled. User Service interface now embeds
factory.ServiceWithHealthy.
* fix(factory): reflect service names as strings
* fix(apiserver): document health 503 responses
* feat: generate openapi spec
* feat: adding cloud integration type for refactor
* refactor: store interfaces to use local types and error
* feat: adding sql store implementation
* refactor: removing interface check
* feat: adding updated types for cloud integration
* refactor: using struct for map
* refactor: update cloud integration types and module interface
* fix: correct GetService signature and remove shadowed Data field
* feat: implement cloud integration store
* refactor: adding comments and removed wrong code
* refactor: streamlining types
* refactor: add comments for backward compatibility in PostableAgentCheckInRequest
* refactor: update Dashboard struct comments and remove unused fields
* refactor: split upsert store method
* feat: adding integration test
* refactor: clean up types
* refactor: renaming service type to service id
* refactor: using serviceID type
* feat: adding method for service id creation
* refactor: updating store methods
* refactor: clean up
* refactor: clean up
* refactor: review comments
* refactor: clean up
* fix: update error code for service not found
* refactor: returning error only for create methods
* refactor: method chaining formatting
* feat: introduce user_role table
* fix: golint and register migrations
* fix: user types and order of update user
* feat: add migration to drop role column from users table
* fix: raw queries pointing to role column in users table
* chore: remove storable user struct and minor other changes
* chore: remove refs of calling vars as storable users
* chore: user 0th role instead of highest
* chore: address pr comments
* chore: rename userrolestore to user_role_store
* chore: return userroles with user in getter where possible
* chore: move user module as user setter
* chore: arrange getter and setter methods
* fix: nil pointer for update user in integration test due to half payload being passed
* chore: update openapi specs
* fix: nil errors without making frontend changes
* fix: empty array check everywhere for user roles array and minor other changes
* fix: imports
* fix: rebase changes
* chore: renaming functions
* chore: simplified getorcreateuser user setter method and call sites
* fix: golint
* fix: remove redundant authz migration, remove fk enforcement for drop migration
* fix: add new event for user activation
* feat(instrumentation): add OTel exception semantic convention log handler
Add a loghandler.Wrapper that enriches error log records with OpenTelemetry
exception semantic convention attributes (exception.type, exception.code,
exception.message, exception.stacktrace).
- Add errors.Attr() helper for standardized error logging under "exception" key
- Add exception log handler that replaces raw error attrs with structured group
- Wire exception handler into the instrumentation SDK logger chain
- Remove LogValue() from errors.base as the handler now owns structuring
* refactor: replace "error", err with errors.Attr(err) across codebase
Migrate all slog error logging from ad-hoc "error", err key-value pairs
to the standardized errors.Attr(err) helper, enabling the exception log
handler to enrich these logs with OTel semantic convention attributes.
* refactor: enforce attr-only slog style across codebase
Change sloglint from kv-only to attr-only, requiring all slog calls to
use typed attributes (slog.String, slog.Any, etc.) instead of key-value
pairs. Convert all existing kv-style slog calls in non-excluded paths.
* refactor: tighten slog.Any to specific types and standardize error attrs
- Replace slog.Any with slog.String for string values (action, key, where_clause)
- Replace slog.Any with slog.Uint64 for uint64 values (start, end, step, etc.)
- Replace slog.Any("err", err) with errors.Attr(err) in dispatcher and segment analytics
- Replace slog.Any("error", ctx.Err()) with errors.Attr in factory registry
* fix(instrumentation): use Unwrapb message for exception.message
Use the explicit error message (m) from Unwrapb instead of
foundErr.Error(), which resolves to the inner cause's message
for wrapped errors.
* feat(errors): capture stacktrace at error creation time
Store program counters ([]uintptr) in base errors at creation time
using runtime.Callers, inspired by thanos-io/thanos/pkg/errors. The
exception log handler reads the stacktrace from the error instead of
capturing at log time, showing where the error originated.
* fix(instrumentation): apply default log wrappers uniformly in NewLogger
Move correlation, filtering, and exception wrappers into NewLogger so
all call sites (including CLI loggers in cmd/) get them automatically.
* refactor(instrumentation): remove variadic wrappers from NewLogger
NewLogger no longer accepts arbitrary wrappers. The core wrappers
(correlation, filtering, exception) are hardcoded, preventing callers
from accidentally duplicating behavior.
* refactor: migrate remaining "error", <var> to errors.Attr across legacy paths
Replace all remaining "error", <variable> key-value pairs with
errors.Attr(<variable>) in pkg/query-service/ and ee/query-service/
paths that were missed in the initial migration due to non-standard
variable names (res.Err, filterErr, apiErrorObj.Err, etc).
* refactor(instrumentation): use flat exception.* keys instead of nested group
Use flat keys (exception.type, exception.code, exception.message,
exception.stacktrace) instead of a nested slog.Group in the exception
log handler.
* chore: deprecate old user invite apis
* chore: add back validation for pending user in list user apis for integration tests
* fix: allow pending user to be updated
* feat: updated members page with new status response and remove invite endpoint api (#10624)
* feat: updated members page with new status response and remove invite endpoint api
* feat: removed deprecated invite endpoint apis
* feat: delete orphaned type files
* feat: changed text for copy, cancel and ingeneral messaging for invited users
* feat: test case and pagination fix
* feat: feedback, refactor and test mock update
* feat: updated the confirmation dialog description as now the we cant permanently delete the member
* feat: refactored the member status mapping
* feat: used the open api spec hooks in editmember and updated the test cases
* feat: added error handling
---------
Co-authored-by: SagarRajput-7 <162284829+SagarRajput-7@users.noreply.github.com>
Co-authored-by: SagarRajput-7 <sagar@signoz.io>
* feat: adding cloud integration type for refactor
* refactor: store interfaces to use local types and error
* feat: adding updated types for cloud integration
* refactor: using struct for map
* refactor: update cloud integration types and module interface
* fix: correct GetService signature and remove shadowed Data field
* refactor: adding comments and removed wrong code
* refactor: streamlining types
* refactor: add comments for backward compatibility in PostableAgentCheckInRequest
* refactor: update Dashboard struct comments and remove unused fields
* refactor: clean up types
* refactor: renaming service type to service id
* refactor: using serviceID type
* feat: adding method for service id creation
* refactor: updating store methods
* refactor: clean up
* refactor: review comments
* fix(user): increase expiry for reset password token for invites
* fix(user): increase expiry for reset password token for invites
* fix(user): increase expiry for reset password token for invites
* fix(user): increase expiry for reset password token for invites
* feat: deprecate user invite table
* fix: handle soft deleted users flow
* fix: handle edge cases for authentication and reset password flow
* feat: integration tests with fixes for new flow
* fix: array for grants
* fix: edge cases for reset token and context api
* chore: remove all code related to old invite flow
* fix: openapi specs
* fix: integration tests and minor naming change
* fix: integration tests fmtlint
* feat: improve invitation email template
* fix: role tests
* fix: context api
* fix: openapi frontend
* chore: rename countbyorgid to activecountbyorgid
* fix: a deleted user cannot recycled, creating a new one
* feat: migrate existing invites to user as pending invite status
* fix: error from GetUsersByEmailAndOrgID
* feat: add backward compatibility to existing apis using new invite flow
* chore: change ordering of apis in server
* chore: change ordering of apis in server
* fix: filter active users in role and org id check
* fix: check deleted user in reset password flow
* chore: address some review comments, add back countbyorgid method
* chore: move to bulk inserts for migrating existing invites
* fix: wrap funcs to transactions, and fix openapi specs
* fix: move reset link method to types, also move authz grants outside transation
* fix: transaction issues
* feat: helper method ErrIfDeleted for user
* fix: error code for errifdeleted in user
* fix: soft delete store method
* fix: password authn tests also add old invite flow test
* fix: callbackauthn tests
* fix: remove extra oidc tests
* fix: callback authn tests oidc
* chore: address review comments and optimise bulk invite api
* fix: use db ctx in various places
* fix: fix duplicate email invite issue and add partial invite
* fix: openapi specs
* fix: errifpending
* fix: user status persistence
* fix: edge cases
* chore: add tests for partial index too
* feat: use composite unique index on users table instead of partial one
* chore: move duplicate email check to unmarshaljson and query user again in accept invite
* fix: make 068 migratin idempotent
* chore: remove unused emails var
* chore: add a temp filter to show only active users in frontend until next frontend fix
* chore: remove one check from register flow testing until temp code is removed
* chore: remove commented code from tests
* chore: address frontend review comments
* chore: address frontend review comments