Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

feat: v2 create and get dashboard API (#11125)

Naman Vermac68f237a8aa6
diff --git a/cmd/community/server.go b/cmd/community/server.go
index ebe3f9c39b..6006a48e75 100644
--- a/cmd/community/server.go
+++ b/cmd/community/server.go
@@ -33,6 +33,7 @@ import (
"github.com/SigNoz/signoz/pkg/modules/retention"
"github.com/SigNoz/signoz/pkg/modules/rulestatehistory"
"github.com/SigNoz/signoz/pkg/modules/serviceaccount"
+ "github.com/SigNoz/signoz/pkg/modules/tag"
"github.com/SigNoz/signoz/pkg/prometheus"
"github.com/SigNoz/signoz/pkg/querier"
"github.com/SigNoz/signoz/pkg/query-service/app"
@@ -100,8 +101,8 @@ func runServer(ctx context.Context, config signoz.Config, logger *slog.Logger) e
return openfgaauthz.NewProviderFactory(sqlstore, openfgaschema.NewSchema().Get(ctx), openfgaDataStore, authtypes.NewRegistry()), nil
},
- func(store sqlstore.SQLStore, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, _ querier.Querier, _ licensing.Licensing) dashboard.Module {
- return impldashboard.NewModule(impldashboard.NewStore(store), settings, analytics, orgGetter, queryParser)
+ func(store sqlstore.SQLStore, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, _ querier.Querier, _ licensing.Licensing, tagModule tag.Module) dashboard.Module {
+ return impldashboard.NewModule(impldashboard.NewStore(store), settings, analytics, orgGetter, queryParser, tagModule)
},
func(_ licensing.Licensing) factory.ProviderFactory[gateway.Gateway, gateway.Config] {
return noopgateway.NewProviderFactory()
diff --git a/cmd/enterprise/server.go b/cmd/enterprise/server.go
index 7a63b88973..0e1266f8a4 100644
--- a/cmd/enterprise/server.go
+++ b/cmd/enterprise/server.go
@@ -50,6 +50,7 @@ import (
"github.com/SigNoz/signoz/pkg/modules/retention"
"github.com/SigNoz/signoz/pkg/modules/rulestatehistory"
"github.com/SigNoz/signoz/pkg/modules/serviceaccount"
+ "github.com/SigNoz/signoz/pkg/modules/tag"
"github.com/SigNoz/signoz/pkg/prometheus"
"github.com/SigNoz/signoz/pkg/querier"
"github.com/SigNoz/signoz/pkg/queryparser"
@@ -133,8 +134,8 @@ func runServer(ctx context.Context, config signoz.Config, logger *slog.Logger) e
}
return openfgaauthz.NewProviderFactory(sqlstore, openfgaschema.NewSchema().Get(ctx), openfgaDataStore, licensing, onBeforeRoleDelete, authtypes.NewRegistry()), nil
},
- func(store sqlstore.SQLStore, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, querier querier.Querier, licensing licensing.Licensing) dashboard.Module {
- return impldashboard.NewModule(pkgimpldashboard.NewStore(store), settings, analytics, orgGetter, queryParser, querier, licensing)
+ func(store sqlstore.SQLStore, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, querier querier.Querier, licensing licensing.Licensing, tagModule tag.Module) dashboard.Module {
+ return impldashboard.NewModule(pkgimpldashboard.NewStore(store), settings, analytics, orgGetter, queryParser, querier, licensing, tagModule)
},
func(licensing licensing.Licensing) factory.ProviderFactory[gateway.Gateway, gateway.Config] {
return httpgateway.NewProviderFactory(licensing)
diff --git a/docs/api/openapi.yml b/docs/api/openapi.yml
index f8a23906dc..45e3c43874 100644
--- a/docs/api/openapi.yml
+++ b/docs/api/openapi.yml
@@ -1322,6 +1322,18 @@ components:
required:
- config
type: object
+ CommonDisplay:
+ properties:
+ description:
+ type: string
+ name:
+ type: string
+ type: object
+ CommonJSONRef:
+ properties:
+ $ref:
+ type: string
+ type: object
ConfigAuthorization:
properties:
credentials:
@@ -2301,97 +2313,921 @@ components:
items:
$ref: '#/components/schemas/CoretypesObjectGroup'
nullable: true
- type: array
- deletions:
+ type: array
+ deletions:
+ items:
+ $ref: '#/components/schemas/CoretypesObjectGroup'
+ nullable: true
+ type: array
+ required:
+ - additions
+ - deletions
+ type: object
+ CoretypesResourceRef:
+ properties:
+ kind:
+ type: string
+ type:
+ $ref: '#/components/schemas/CoretypesType'
+ required:
+ - type
+ - kind
+ type: object
+ CoretypesType:
+ enum:
+ - user
+ - serviceaccount
+ - anonymous
+ - role
+ - organization
+ - metaresource
+ - telemetryresource
+ type: string
+ DashboardGridItem:
+ properties:
+ content:
+ $ref: '#/components/schemas/CommonJSONRef'
+ height:
+ type: integer
+ width:
+ type: integer
+ x:
+ type: integer
+ "y":
+ type: integer
+ type: object
+ DashboardGridLayoutCollapse:
+ properties:
+ open:
+ type: boolean
+ type: object
+ DashboardGridLayoutDisplay:
+ properties:
+ collapse:
+ $ref: '#/components/schemas/DashboardGridLayoutCollapse'
+ title:
+ type: string
+ type: object
+ DashboardGridLayoutSpec:
+ properties:
+ display:
+ $ref: '#/components/schemas/DashboardGridLayoutDisplay'
+ items:
+ items:
+ $ref: '#/components/schemas/DashboardGridItem'
+ nullable: true
+ type: array
+ repeatVariable:
+ type: string
+ type: object
+ DashboardTextVariableSpec:
+ properties:
+ constant:
+ type: boolean
+ display:
+ $ref: '#/components/schemas/VariableDisplay'
+ name:
+ type: string
+ value:
+ type: string
+ type: object
+ DashboardtypesAxes:
+ properties:
+ isLogScale:
+ type: boolean
+ softMax:
+ nullable: true
+ type: number
+ softMin:
+ nullable: true
+ type: number
+ type: object
+ DashboardtypesBarChartPanelSpec:
+ properties:
+ axes:
+ $ref: '#/components/schemas/DashboardtypesAxes'
+ formatting:
+ $ref: '#/components/schemas/DashboardtypesPanelFormatting'
+ legend:
+ $ref: '#/components/schemas/DashboardtypesLegend'
+ thresholds:
+ items:
+ $ref: '#/components/schemas/DashboardtypesThresholdWithLabel'
+ nullable: true
+ type: array
+ visualization:
+ $ref: '#/components/schemas/DashboardtypesBarChartVisualization'
+ type: object
+ DashboardtypesBarChartVisualization:
+ properties:
+ fillSpans:
+ type: boolean
+ stackedBarChart:
+ type: boolean
+ timePreference:
+ $ref: '#/components/schemas/DashboardtypesTimePreference'
+ type: object
+ DashboardtypesBasicVisualization:
+ properties:
+ timePreference:
+ $ref: '#/components/schemas/DashboardtypesTimePreference'
+ type: object
+ DashboardtypesBuilderQuerySpec:
+ oneOf:
+ - $ref: '#/components/schemas/Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5LogAggregation'
+ - $ref: '#/components/schemas/Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5MetricAggregation'
+ - $ref: '#/components/schemas/Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5TraceAggregation'
+ DashboardtypesComparisonOperator:
+ enum:
+ - above
+ - below
+ - above_or_equal
+ - below_or_equal
+ - equal
+ - not_equal
+ type: string
+ DashboardtypesComparisonThreshold:
+ properties:
+ color:
+ type: string
+ format:
+ $ref: '#/components/schemas/DashboardtypesThresholdFormat'
+ operator:
+ $ref: '#/components/schemas/DashboardtypesComparisonOperator'
+ unit:
+ type: string
+ value:
+ format: double
+ type: number
+ required:
+ - value
+ - color
+ type: object
+ DashboardtypesCustomVariableSpec:
+ properties:
+ customValue:
+ type: string
+ required:
+ - customValue
+ type: object
+ DashboardtypesDashboard:
+ properties:
+ createdAt:
+ format: date-time
+ type: string
+ createdBy:
+ type: string
+ data:
+ $ref: '#/components/schemas/DashboardtypesStorableDashboardData'
+ id:
+ type: string
+ locked:
+ type: boolean
+ org_id:
+ type: string
+ source:
+ $ref: '#/components/schemas/DashboardtypesSource'
+ updatedAt:
+ format: date-time
+ type: string
+ updatedBy:
+ type: string
+ type: object
+ DashboardtypesDashboardSpec:
+ properties:
+ datasources:
+ additionalProperties:
+ $ref: '#/components/schemas/DashboardtypesDatasourceSpec'
+ type: object
+ display:
+ $ref: '#/components/schemas/CommonDisplay'
+ duration:
+ type: string
+ layouts:
+ items:
+ $ref: '#/components/schemas/DashboardtypesLayout'
+ nullable: true
+ type: array
+ links:
+ items:
+ $ref: '#/components/schemas/V1Link'
+ type: array
+ panels:
+ additionalProperties:
+ $ref: '#/components/schemas/DashboardtypesPanel'
+ nullable: true
+ type: object
+ refreshInterval:
+ type: string
+ variables:
+ items:
+ $ref: '#/components/schemas/DashboardtypesVariable'
+ type: array
+ type: object
+ DashboardtypesDatasourcePlugin:
+ oneOf:
+ - $ref: '#/components/schemas/DashboardtypesDatasourcePluginVariantStruct'
+ DashboardtypesDatasourcePluginKind:
+ enum:
+ - signoz/Datasource
+ type: string
+ DashboardtypesDatasourcePluginVariantStruct:
+ properties:
+ kind:
+ enum:
+ - signoz/Datasource
+ type: string
+ spec:
+ nullable: true
+ type: object
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesDatasourceSpec:
+ properties:
+ default:
+ type: boolean
+ display:
+ $ref: '#/components/schemas/CommonDisplay'
+ plugin:
+ $ref: '#/components/schemas/DashboardtypesDatasourcePlugin'
+ type: object
+ DashboardtypesDynamicVariableSpec:
+ properties:
+ name:
+ type: string
+ signal:
+ $ref: '#/components/schemas/TelemetrytypesSignal'
+ required:
+ - name
+ type: object
+ DashboardtypesFillMode:
+ enum:
+ - solid
+ - gradient
+ - none
+ type: string
+ DashboardtypesGettableDashboardV2:
+ properties:
+ createdAt:
+ format: date-time
+ type: string
+ createdBy:
+ type: string
+ id:
+ type: string
+ image:
+ type: string
+ locked:
+ type: boolean
+ name:
+ type: string
+ orgId:
+ type: string
+ schemaVersion:
+ type: string
+ source:
+ $ref: '#/components/schemas/DashboardtypesSource'
+ spec:
+ $ref: '#/components/schemas/DashboardtypesDashboardSpec'
+ tags:
+ items:
+ $ref: '#/components/schemas/TagtypesPostableTag'
+ nullable: true
+ type: array
+ updatedAt:
+ format: date-time
+ type: string
+ updatedBy:
+ type: string
+ required:
+ - id
+ - orgId
+ - locked
+ - source
+ - schemaVersion
+ - name
+ - tags
+ - spec
+ type: object
+ DashboardtypesGettablePublicDasbhboard:
+ properties:
+ defaultTimeRange:
+ type: string
+ publicPath:
+ type: string
+ timeRangeEnabled:
+ type: boolean
+ type: object
+ DashboardtypesGettablePublicDashboardData:
+ properties:
+ dashboard:
+ $ref: '#/components/schemas/DashboardtypesDashboard'
+ publicDashboard:
+ $ref: '#/components/schemas/DashboardtypesGettablePublicDasbhboard'
+ type: object
+ DashboardtypesHistogramBuckets:
+ properties:
+ bucketCount:
+ nullable: true
+ type: number
+ bucketWidth:
+ nullable: true
+ type: number
+ mergeAllActiveQueries:
+ type: boolean
+ type: object
+ DashboardtypesHistogramPanelSpec:
+ properties:
+ histogramBuckets:
+ $ref: '#/components/schemas/DashboardtypesHistogramBuckets'
+ legend:
+ $ref: '#/components/schemas/DashboardtypesLegend'
+ type: object
+ DashboardtypesLayout:
+ oneOf:
+ - $ref: '#/components/schemas/DashboardtypesLayoutEnvelopeGithubComPersesPersesPkgModelApiV1DashboardGridLayoutSpec'
+ DashboardtypesLayoutEnvelopeGithubComPersesPersesPkgModelApiV1DashboardGridLayoutSpec:
+ properties:
+ kind:
+ enum:
+ - Grid
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardGridLayoutSpec'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesLegend:
+ properties:
+ customColors:
+ additionalProperties:
+ type: string
+ nullable: true
+ type: object
+ position:
+ $ref: '#/components/schemas/DashboardtypesLegendPosition'
+ type: object
+ DashboardtypesLegendPosition:
+ enum:
+ - bottom
+ - right
+ type: string
+ DashboardtypesLineInterpolation:
+ enum:
+ - linear
+ - spline
+ - step_after
+ - step_before
+ type: string
+ DashboardtypesLineStyle:
+ enum:
+ - solid
+ - dashed
+ type: string
+ DashboardtypesListPanelSpec:
+ properties:
+ selectFields:
+ items:
+ $ref: '#/components/schemas/TelemetrytypesTelemetryFieldKey'
+ type: array
+ type: object
+ DashboardtypesListVariableSpec:
+ properties:
+ allowAllValue:
+ type: boolean
+ allowMultiple:
+ type: boolean
+ capturingRegexp:
+ type: string
+ customAllValue:
+ type: string
+ defaultValue:
+ $ref: '#/components/schemas/VariableDefaultValue'
+ display:
+ $ref: '#/components/schemas/VariableDisplay'
+ name:
+ type: string
+ plugin:
+ $ref: '#/components/schemas/DashboardtypesVariablePlugin'
+ sort:
+ nullable: true
+ type: string
+ type: object
+ DashboardtypesNumberPanelSpec:
+ properties:
+ formatting:
+ $ref: '#/components/schemas/DashboardtypesPanelFormatting'
+ thresholds:
+ items:
+ $ref: '#/components/schemas/DashboardtypesComparisonThreshold'
+ nullable: true
+ type: array
+ visualization:
+ $ref: '#/components/schemas/DashboardtypesBasicVisualization'
+ type: object
+ DashboardtypesPanel:
+ properties:
+ kind:
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesPanelSpec'
+ type: object
+ DashboardtypesPanelFormatting:
+ properties:
+ decimalPrecision:
+ $ref: '#/components/schemas/DashboardtypesPrecisionOption'
+ unit:
+ type: string
+ type: object
+ DashboardtypesPanelPlugin:
+ oneOf:
+ - $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTimeSeriesPanelSpec'
+ - $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBarChartPanelSpec'
+ - $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesNumberPanelSpec'
+ - $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesPieChartPanelSpec'
+ - $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTablePanelSpec'
+ - $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesHistogramPanelSpec'
+ - $ref: '#/components/schemas/DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesListPanelSpec'
+ DashboardtypesPanelPluginKind:
+ enum:
+ - signoz/TimeSeriesPanel
+ - signoz/BarChartPanel
+ - signoz/NumberPanel
+ - signoz/PieChartPanel
+ - signoz/TablePanel
+ - signoz/HistogramPanel
+ - signoz/ListPanel
+ type: string
+ DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBarChartPanelSpec:
+ properties:
+ kind:
+ enum:
+ - signoz/BarChartPanel
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesBarChartPanelSpec'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesHistogramPanelSpec:
+ properties:
+ kind:
+ enum:
+ - signoz/HistogramPanel
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesHistogramPanelSpec'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesListPanelSpec:
+ properties:
+ kind:
+ enum:
+ - signoz/ListPanel
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesListPanelSpec'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesNumberPanelSpec:
+ properties:
+ kind:
+ enum:
+ - signoz/NumberPanel
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesNumberPanelSpec'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesPieChartPanelSpec:
+ properties:
+ kind:
+ enum:
+ - signoz/PieChartPanel
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesPieChartPanelSpec'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTablePanelSpec:
+ properties:
+ kind:
+ enum:
+ - signoz/TablePanel
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesTablePanelSpec'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTimeSeriesPanelSpec:
+ properties:
+ kind:
+ enum:
+ - signoz/TimeSeriesPanel
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesTimeSeriesPanelSpec'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesPanelSpec:
+ properties:
+ display:
+ $ref: '#/components/schemas/V1PanelDisplay'
+ links:
+ items:
+ $ref: '#/components/schemas/V1Link'
+ type: array
+ plugin:
+ $ref: '#/components/schemas/DashboardtypesPanelPlugin'
+ queries:
+ items:
+ $ref: '#/components/schemas/DashboardtypesQuery'
+ type: array
+ type: object
+ DashboardtypesPieChartPanelSpec:
+ properties:
+ formatting:
+ $ref: '#/components/schemas/DashboardtypesPanelFormatting'
+ legend:
+ $ref: '#/components/schemas/DashboardtypesLegend'
+ visualization:
+ $ref: '#/components/schemas/DashboardtypesBasicVisualization'
+ type: object
+ DashboardtypesPostableDashboardV2:
+ properties:
+ generateName:
+ type: boolean
+ image:
+ type: string
+ name:
+ type: string
+ schemaVersion:
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesDashboardSpec'
+ tags:
+ items:
+ $ref: '#/components/schemas/TagtypesPostableTag'
+ nullable: true
+ type: array
+ required:
+ - schemaVersion
+ - tags
+ - spec
+ type: object
+ DashboardtypesPostablePublicDashboard:
+ properties:
+ defaultTimeRange:
+ type: string
+ timeRangeEnabled:
+ type: boolean
+ type: object
+ DashboardtypesPrecisionOption:
+ enum:
+ - "0"
+ - "1"
+ - "2"
+ - "3"
+ - "4"
+ - full
+ type: string
+ DashboardtypesQuery:
+ properties:
+ kind:
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesQuerySpec'
+ type: object
+ DashboardtypesQueryPlugin:
+ oneOf:
+ - $ref: '#/components/schemas/DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBuilderQuerySpec'
+ - $ref: '#/components/schemas/DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5CompositeQuery'
+ - $ref: '#/components/schemas/DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderFormula'
+ - $ref: '#/components/schemas/DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5PromQuery'
+ - $ref: '#/components/schemas/DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5ClickHouseQuery'
+ - $ref: '#/components/schemas/DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderTraceOperator'
+ DashboardtypesQueryPluginKind:
+ enum:
+ - signoz/BuilderQuery
+ - signoz/CompositeQuery
+ - signoz/Formula
+ - signoz/PromQLQuery
+ - signoz/ClickHouseSQL
+ - signoz/TraceOperator
+ type: string
+ DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBuilderQuerySpec:
+ properties:
+ kind:
+ enum:
+ - signoz/BuilderQuery
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesBuilderQuerySpec'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5ClickHouseQuery:
+ properties:
+ kind:
+ enum:
+ - signoz/ClickHouseSQL
+ type: string
+ spec:
+ $ref: '#/components/schemas/Querybuildertypesv5ClickHouseQuery'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5CompositeQuery:
+ properties:
+ kind:
+ enum:
+ - signoz/CompositeQuery
+ type: string
+ spec:
+ $ref: '#/components/schemas/Querybuildertypesv5CompositeQuery'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5PromQuery:
+ properties:
+ kind:
+ enum:
+ - signoz/PromQLQuery
+ type: string
+ spec:
+ $ref: '#/components/schemas/Querybuildertypesv5PromQuery'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderFormula:
+ properties:
+ kind:
+ enum:
+ - signoz/Formula
+ type: string
+ spec:
+ $ref: '#/components/schemas/Querybuildertypesv5QueryBuilderFormula'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderTraceOperator:
+ properties:
+ kind:
+ enum:
+ - signoz/TraceOperator
+ type: string
+ spec:
+ $ref: '#/components/schemas/Querybuildertypesv5QueryBuilderTraceOperator'
+ required:
+ - kind
+ - spec
+ type: object
+ DashboardtypesQuerySpec:
+ properties:
+ name:
+ type: string
+ plugin:
+ $ref: '#/components/schemas/DashboardtypesQueryPlugin'
+ type: object
+ DashboardtypesQueryVariableSpec:
+ properties:
+ queryValue:
+ type: string
+ required:
+ - queryValue
+ type: object
+ DashboardtypesSource:
+ enum:
+ - user
+ - system
+ - integration
+ type: object
+ DashboardtypesSpanGaps:
+ properties:
+ fillLessThan:
+ type: string
+ fillOnlyBelow:
+ type: boolean
+ type: object
+ DashboardtypesStorableDashboardData:
+ additionalProperties: {}
+ type: object
+ DashboardtypesTableFormatting:
+ properties:
+ columnUnits:
+ additionalProperties:
+ type: string
+ nullable: true
+ type: object
+ decimalPrecision:
+ $ref: '#/components/schemas/DashboardtypesPrecisionOption'
+ type: object
+ DashboardtypesTablePanelSpec:
+ properties:
+ formatting:
+ $ref: '#/components/schemas/DashboardtypesTableFormatting'
+ thresholds:
items:
- $ref: '#/components/schemas/CoretypesObjectGroup'
+ $ref: '#/components/schemas/DashboardtypesTableThreshold'
nullable: true
type: array
- required:
- - additions
- - deletions
+ visualization:
+ $ref: '#/components/schemas/DashboardtypesBasicVisualization'
type: object
- CoretypesResourceRef:
+ DashboardtypesTableThreshold:
properties:
- kind:
+ color:
type: string
- type:
- $ref: '#/components/schemas/CoretypesType'
+ columnName:
+ type: string
+ format:
+ $ref: '#/components/schemas/DashboardtypesThresholdFormat'
+ operator:
+ $ref: '#/components/schemas/DashboardtypesComparisonOperator'
+ unit:
+ type: string
+ value:
+ format: double
+ type: number
required:
- - type
- - kind
+ - value
+ - color
+ - columnName
type: object
- CoretypesType:
+ DashboardtypesThresholdFormat:
enum:
- - user
- - serviceaccount
- - anonymous
- - role
- - organization
- - metaresource
- - telemetryresource
+ - text
+ - background
type: string
- DashboardtypesDashboard:
+ DashboardtypesThresholdWithLabel:
properties:
- createdAt:
- format: date-time
+ color:
type: string
- createdBy:
+ label:
type: string
- data:
- $ref: '#/components/schemas/DashboardtypesStorableDashboardData'
- id:
+ unit:
type: string
- locked:
+ value:
+ format: double
+ type: number
+ required:
+ - value
+ - color
+ - label
+ type: object
+ DashboardtypesTimePreference:
+ enum:
+ - global_time
+ - last_5_min
+ - last_15_min
+ - last_30_min
+ - last_1_hr
+ - last_6_hr
+ - last_1_day
+ - last_3_days
+ - last_1_week
+ - last_1_month
+ type: string
+ DashboardtypesTimeSeriesChartAppearance:
+ properties:
+ fillMode:
+ $ref: '#/components/schemas/DashboardtypesFillMode'
+ lineInterpolation:
+ $ref: '#/components/schemas/DashboardtypesLineInterpolation'
+ lineStyle:
+ $ref: '#/components/schemas/DashboardtypesLineStyle'
+ showPoints:
type: boolean
- org_id:
- type: string
- source:
- $ref: '#/components/schemas/DashboardtypesSource'
- updatedAt:
- format: date-time
- type: string
- updatedBy:
- type: string
+ spanGaps:
+ $ref: '#/components/schemas/DashboardtypesSpanGaps'
type: object
- DashboardtypesGettablePublicDasbhboard:
+ DashboardtypesTimeSeriesPanelSpec:
+ properties:
+ axes:
+ $ref: '#/components/schemas/DashboardtypesAxes'
+ chartAppearance:
+ $ref: '#/components/schemas/DashboardtypesTimeSeriesChartAppearance'
+ formatting:
+ $ref: '#/components/schemas/DashboardtypesPanelFormatting'
+ legend:
+ $ref: '#/components/schemas/DashboardtypesLegend'
+ thresholds:
+ items:
+ $ref: '#/components/schemas/DashboardtypesThresholdWithLabel'
+ nullable: true
+ type: array
+ visualization:
+ $ref: '#/components/schemas/DashboardtypesTimeSeriesVisualization'
+ type: object
+ DashboardtypesTimeSeriesVisualization:
+ properties:
+ fillSpans:
+ type: boolean
+ timePreference:
+ $ref: '#/components/schemas/DashboardtypesTimePreference'
+ type: object
+ DashboardtypesUpdatablePublicDashboard:
properties:
defaultTimeRange:
type: string
- publicPath:
- type: string
timeRangeEnabled:
type: boolean
type: object
- DashboardtypesGettablePublicDashboardData:
+ DashboardtypesVariable:
+ oneOf:
+ - $ref: '#/components/schemas/DashboardtypesVariableEnvelopeGithubComSigNozSignozPkgTypesDashboardtypesListVariableSpec'
+ - $ref: '#/components/schemas/DashboardtypesVariableEnvelopeGithubComPersesPersesPkgModelApiV1DashboardTextVariableSpec'
+ DashboardtypesVariableEnvelopeGithubComPersesPersesPkgModelApiV1DashboardTextVariableSpec:
properties:
- dashboard:
- $ref: '#/components/schemas/DashboardtypesDashboard'
- publicDashboard:
- $ref: '#/components/schemas/DashboardtypesGettablePublicDasbhboard'
+ kind:
+ enum:
+ - TextVariable
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardTextVariableSpec'
+ required:
+ - kind
+ - spec
type: object
- DashboardtypesPostablePublicDashboard:
+ DashboardtypesVariableEnvelopeGithubComSigNozSignozPkgTypesDashboardtypesListVariableSpec:
properties:
- defaultTimeRange:
+ kind:
+ enum:
+ - ListVariable
type: string
- timeRangeEnabled:
- type: boolean
+ spec:
+ $ref: '#/components/schemas/DashboardtypesListVariableSpec'
+ required:
+ - kind
+ - spec
type: object
- DashboardtypesSource:
+ DashboardtypesVariablePlugin:
+ oneOf:
+ - $ref: '#/components/schemas/DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesDynamicVariableSpec'
+ - $ref: '#/components/schemas/DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesQueryVariableSpec'
+ - $ref: '#/components/schemas/DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesCustomVariableSpec'
+ DashboardtypesVariablePluginKind:
enum:
- - user
- - system
- - integration
+ - signoz/DynamicVariable
+ - signoz/QueryVariable
+ - signoz/CustomVariable
+ type: string
+ DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesCustomVariableSpec:
+ properties:
+ kind:
+ enum:
+ - signoz/CustomVariable
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesCustomVariableSpec'
+ required:
+ - kind
+ - spec
type: object
- DashboardtypesStorableDashboardData:
- additionalProperties: {}
+ DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesDynamicVariableSpec:
+ properties:
+ kind:
+ enum:
+ - signoz/DynamicVariable
+ type: string
+ spec:
+ $ref: '#/components/schemas/DashboardtypesDynamicVariableSpec'
+ required:
+ - kind
+ - spec
type: object
- DashboardtypesUpdatablePublicDashboard:
+ DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesQueryVariableSpec:
properties:
- defaultTimeRange:
+ kind:
+ enum:
+ - signoz/QueryVariable
type: string
- timeRangeEnabled:
- type: boolean
+ spec:
+ $ref: '#/components/schemas/DashboardtypesQueryVariableSpec'
+ required:
+ - kind
+ - spec
type: object
ErrorsJSON:
properties:
@@ -5983,6 +6819,16 @@ components:
trace_state:
type: string
type: object
+ TagtypesPostableTag:
+ properties:
+ key:
+ type: string
+ value:
+ type: string
+ required:
+ - key
+ - value
+ type: object
TelemetrytypesFieldContext:
enum:
- metric
@@ -6266,6 +7112,37 @@ components:
required:
- id
type: object
+ V1Link:
+ properties:
+ name:
+ type: string
+ renderVariables:
+ type: boolean
+ targetBlank:
+ type: boolean
+ tooltip:
+ type: string
+ url:
+ type: string
+ type: object
+ V1PanelDisplay:
+ properties:
+ description:
+ type: string
+ name:
+ type: string
+ type: object
+ VariableDefaultValue:
+ type: object
+ VariableDisplay:
+ properties:
+ description:
+ type: string
+ hidden:
+ type: boolean
+ name:
+ type: string
+ type: object
ZeustypesGettableHost:
properties:
hosts:
@@ -11788,6 +12665,110 @@ paths:
summary: Update user preference
tags:
- preferences
+ /api/v2/dashboards:
+ post:
+ deprecated: false
+ description: This endpoint creates a dashboard in the v2 format that follows
+ Perses spec.
+ operationId: CreateDashboardV2
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DashboardtypesPostableDashboardV2'
+ responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ properties:
+ data:
+ $ref: '#/components/schemas/DashboardtypesGettableDashboardV2'
+ status:
+ type: string
+ required:
+ - status
+ - data
+ type: object
+ description: Created
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Unauthorized
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Forbidden
+ "500":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Internal Server Error
+ security:
+ - api_key:
+ - EDITOR
+ - tokenizer:
+ - EDITOR
+ summary: Create dashboard (v2)
+ tags:
+ - dashboard
+ /api/v2/dashboards/{id}:
+ get:
+ deprecated: false
+ description: This endpoint returns a v2-shape dashboard.
+ operationId: GetDashboardV2
+ parameters:
+ - in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ properties:
+ data:
+ $ref: '#/components/schemas/DashboardtypesGettableDashboardV2'
+ status:
+ type: string
+ required:
+ - status
+ - data
+ type: object
+ description: OK
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Unauthorized
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Forbidden
+ "500":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Internal Server Error
+ security:
+ - api_key:
+ - VIEWER
+ - tokenizer:
+ - VIEWER
+ summary: Get dashboard (v2)
+ tags:
+ - dashboard
/api/v2/factor_password/forgot:
post:
deprecated: false
diff --git a/ee/modules/dashboard/impldashboard/module.go b/ee/modules/dashboard/impldashboard/module.go
index da531ab74b..7a7a84bdbd 100644
--- a/ee/modules/dashboard/impldashboard/module.go
+++ b/ee/modules/dashboard/impldashboard/module.go
@@ -11,6 +11,7 @@ import (
"github.com/SigNoz/signoz/pkg/modules/dashboard"
pkgimpldashboard "github.com/SigNoz/signoz/pkg/modules/dashboard/impldashboard"
"github.com/SigNoz/signoz/pkg/modules/organization"
+ "github.com/SigNoz/signoz/pkg/modules/tag"
"github.com/SigNoz/signoz/pkg/querier"
"github.com/SigNoz/signoz/pkg/queryparser"
"github.com/SigNoz/signoz/pkg/types"
@@ -30,9 +31,9 @@ type module struct {
licensing licensing.Licensing
}
-func NewModule(store dashboardtypes.Store, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, querier querier.Querier, licensing licensing.Licensing) dashboard.Module {
+func NewModule(store dashboardtypes.Store, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, querier querier.Querier, licensing licensing.Licensing, tagModule tag.Module) dashboard.Module {
scopedProviderSettings := factory.NewScopedProviderSettings(settings, "github.com/SigNoz/signoz/ee/modules/dashboard/impldashboard")
- pkgDashboardModule := pkgimpldashboard.NewModule(store, settings, analytics, orgGetter, queryParser)
+ pkgDashboardModule := pkgimpldashboard.NewModule(store, settings, analytics, orgGetter, queryParser, tagModule)
return &module{
pkgDashboardModule: pkgDashboardModule,
@@ -212,6 +213,14 @@ func (module *module) Create(ctx context.Context, orgID valuer.UUID, createdBy s
return module.pkgDashboardModule.Create(ctx, orgID, createdBy, creator, source, data)
}
+func (module *module) CreateV2(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, source dashboardtypes.Source, postable dashboardtypes.PostableDashboardV2) (*dashboardtypes.DashboardV2, error) {
+ return module.pkgDashboardModule.CreateV2(ctx, orgID, createdBy, creator, source, postable)
+}
+
+func (module *module) GetV2(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.DashboardV2, error) {
+ return module.pkgDashboardModule.GetV2(ctx, orgID, id)
+}
+
func (module *module) Get(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.Dashboard, error) {
return module.pkgDashboardModule.Get(ctx, orgID, id)
}
diff --git a/frontend/src/api/generated/services/dashboard/index.ts b/frontend/src/api/generated/services/dashboard/index.ts
index 2f07fce010..ef7f5d4764 100644
--- a/frontend/src/api/generated/services/dashboard/index.ts
+++ b/frontend/src/api/generated/services/dashboard/index.ts
@@ -18,11 +18,15 @@ import type {
} from 'react-query';
import type {
+ CreateDashboardV2201,
CreatePublicDashboard201,
CreatePublicDashboardPathParameters,
+ DashboardtypesPostableDashboardV2DTO,
DashboardtypesPostablePublicDashboardDTO,
DashboardtypesUpdatablePublicDashboardDTO,
DeletePublicDashboardPathParameters,
+ GetDashboardV2200,
+ GetDashboardV2PathParameters,
GetPublicDashboard200,
GetPublicDashboardData200,
GetPublicDashboardDataPathParameters,
@@ -628,3 +632,187 @@ export const invalidateGetPublicDashboardWidgetQueryRange = async (
return queryClient;
};
+
+/**
+ * This endpoint creates a dashboard in the v2 format that follows Perses spec.
+ * @summary Create dashboard (v2)
+ */
+export const createDashboardV2 = (
+ dashboardtypesPostableDashboardV2DTO?: BodyType<DashboardtypesPostableDashboardV2DTO>,
+ signal?: AbortSignal,
+) => {
+ return GeneratedAPIInstance<CreateDashboardV2201>({
+ url: `/api/v2/dashboards`,
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ data: dashboardtypesPostableDashboardV2DTO,
+ signal,
+ });
+};
+
+export const getCreateDashboardV2MutationOptions = <
+ TError = ErrorType<RenderErrorResponseDTO>,
+ TContext = unknown,
+>(options?: {
+ mutation?: UseMutationOptions<
+ Awaited<ReturnType<typeof createDashboardV2>>,
+ TError,
+ { data?: BodyType<DashboardtypesPostableDashboardV2DTO> },
+ TContext
+ >;
+}): UseMutationOptions<
+ Awaited<ReturnType<typeof createDashboardV2>>,
+ TError,
+ { data?: BodyType<DashboardtypesPostableDashboardV2DTO> },
+ TContext
+> => {
+ const mutationKey = ['createDashboardV2'];
+ const { mutation: mutationOptions } = options
+ ? options.mutation &&
+ 'mutationKey' in options.mutation &&
+ options.mutation.mutationKey
+ ? options
+ : { ...options, mutation: { ...options.mutation, mutationKey } }
+ : { mutation: { mutationKey } };
+
+ const mutationFn: MutationFunction<
+ Awaited<ReturnType<typeof createDashboardV2>>,
+ { data?: BodyType<DashboardtypesPostableDashboardV2DTO> }
+ > = (props) => {
+ const { data } = props ?? {};
+
+ return createDashboardV2(data);
+ };
+
+ return { mutationFn, ...mutationOptions };
+};
+
+export type CreateDashboardV2MutationResult = NonNullable<
+ Awaited<ReturnType<typeof createDashboardV2>>
+>;
+export type CreateDashboardV2MutationBody =
+ | BodyType<DashboardtypesPostableDashboardV2DTO>
+ | undefined;
+export type CreateDashboardV2MutationError = ErrorType<RenderErrorResponseDTO>;
+
+/**
+ * @summary Create dashboard (v2)
+ */
+export const useCreateDashboardV2 = <
+ TError = ErrorType<RenderErrorResponseDTO>,
+ TContext = unknown,
+>(options?: {
+ mutation?: UseMutationOptions<
+ Awaited<ReturnType<typeof createDashboardV2>>,
+ TError,
+ { data?: BodyType<DashboardtypesPostableDashboardV2DTO> },
+ TContext
+ >;
+}): UseMutationResult<
+ Awaited<ReturnType<typeof createDashboardV2>>,
+ TError,
+ { data?: BodyType<DashboardtypesPostableDashboardV2DTO> },
+ TContext
+> => {
+ return useMutation(getCreateDashboardV2MutationOptions(options));
+};
+/**
+ * This endpoint returns a v2-shape dashboard.
+ * @summary Get dashboard (v2)
+ */
+export const getDashboardV2 = (
+ { id }: GetDashboardV2PathParameters,
+ signal?: AbortSignal,
+) => {
+ return GeneratedAPIInstance<GetDashboardV2200>({
+ url: `/api/v2/dashboards/${id}`,
+ method: 'GET',
+ signal,
+ });
+};
+
+export const getGetDashboardV2QueryKey = ({
+ id,
+}: GetDashboardV2PathParameters) => {
+ return [`/api/v2/dashboards/${id}`] as const;
+};
+
+export const getGetDashboardV2QueryOptions = <
+ TData = Awaited<ReturnType<typeof getDashboardV2>>,
+ TError = ErrorType<RenderErrorResponseDTO>,
+>(
+ { id }: GetDashboardV2PathParameters,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited<ReturnType<typeof getDashboardV2>>,
+ TError,
+ TData
+ >;
+ },
+) => {
+ const { query: queryOptions } = options ?? {};
+
+ const queryKey = queryOptions?.queryKey ?? getGetDashboardV2QueryKey({ id });
+
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getDashboardV2>>> = ({
+ signal,
+ }) => getDashboardV2({ id }, signal);
+
+ return {
+ queryKey,
+ queryFn,
+ enabled: !!id,
+ ...queryOptions,
+ } as UseQueryOptions<
+ Awaited<ReturnType<typeof getDashboardV2>>,
+ TError,
+ TData
+ > & { queryKey: QueryKey };
+};
+
+export type GetDashboardV2QueryResult = NonNullable<
+ Awaited<ReturnType<typeof getDashboardV2>>
+>;
+export type GetDashboardV2QueryError = ErrorType<RenderErrorResponseDTO>;
+
+/**
+ * @summary Get dashboard (v2)
+ */
+
+export function useGetDashboardV2<
+ TData = Awaited<ReturnType<typeof getDashboardV2>>,
+ TError = ErrorType<RenderErrorResponseDTO>,
+>(
+ { id }: GetDashboardV2PathParameters,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited<ReturnType<typeof getDashboardV2>>,
+ TError,
+ TData
+ >;
+ },
+): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
+ const queryOptions = getGetDashboardV2QueryOptions({ id }, options);
+
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
+ queryKey: QueryKey;
+ };
+
+ return { ...query, queryKey: queryOptions.queryKey };
+}
+
+/**
+ * @summary Get dashboard (v2)
+ */
+export const invalidateGetDashboardV2 = async (
+ queryClient: QueryClient,
+ { id }: GetDashboardV2PathParameters,
+ options?: InvalidateOptions,
+): Promise<QueryClient> => {
+ await queryClient.invalidateQueries(
+ { queryKey: getGetDashboardV2QueryKey({ id }) },
+ options,
+ );
+
+ return queryClient;
+};
diff --git a/frontend/src/api/generated/services/sigNoz.schemas.ts b/frontend/src/api/generated/services/sigNoz.schemas.ts
index 7391ad79ad..b1a028d3bc 100644
--- a/frontend/src/api/generated/services/sigNoz.schemas.ts
+++ b/frontend/src/api/generated/services/sigNoz.schemas.ts
@@ -2909,6 +2909,24 @@ export interface CloudintegrationtypesUpdatableServiceDTO {
config: CloudintegrationtypesServiceConfigDTO;
}
+export interface CommonDisplayDTO {
+ /**
+ * @type string
+ */
+ description?: string;
+ /**
+ * @type string
+ */
+ name?: string;
+}
+
+export interface CommonJSONRefDTO {
+ /**
+ * @type string
+ */
+ $ref?: string;
+}
+
export interface ConfigReceiverDTO {
/**
* @type array
@@ -3007,1439 +3025,2415 @@ export interface CoretypesPatchableObjectsDTO {
deletions: CoretypesObjectGroupDTO[] | null;
}
-export enum DashboardtypesSourceDTO {
- user = 'user',
- system = 'system',
- integration = 'integration',
-}
-export interface DashboardtypesDashboardDTO {
+export interface DashboardGridItemDTO {
+ content?: CommonJSONRefDTO;
/**
- * @type string
- * @format date-time
+ * @type integer
*/
- createdAt?: string;
+ height?: number;
/**
- * @type string
+ * @type integer
*/
- createdBy?: string;
- data?: DashboardtypesStorableDashboardDataDTO;
+ width?: number;
/**
- * @type string
+ * @type integer
*/
- id?: string;
+ x?: number;
+ /**
+ * @type integer
+ */
+ y?: number;
+}
+
+export interface DashboardGridLayoutCollapseDTO {
/**
* @type boolean
*/
- locked?: boolean;
+ open?: boolean;
+}
+
+export interface DashboardGridLayoutDisplayDTO {
+ collapse?: DashboardGridLayoutCollapseDTO;
/**
* @type string
*/
- org_id?: string;
- source?: DashboardtypesSourceDTO;
+ title?: string;
+}
+
+export interface DashboardGridLayoutSpecDTO {
+ display?: DashboardGridLayoutDisplayDTO;
/**
- * @type string
- * @format date-time
+ * @type array,null
*/
- updatedAt?: string;
+ items?: DashboardGridItemDTO[] | null;
/**
* @type string
*/
- updatedBy?: string;
+ repeatVariable?: string;
}
-export interface DashboardtypesGettablePublicDasbhboardDTO {
- /**
- * @type string
- */
- defaultTimeRange?: string;
+export interface VariableDisplayDTO {
/**
* @type string
*/
- publicPath?: string;
+ description?: string;
/**
* @type boolean
*/
- timeRangeEnabled?: boolean;
-}
-
-export interface DashboardtypesGettablePublicDashboardDataDTO {
- dashboard?: DashboardtypesDashboardDTO;
- publicDashboard?: DashboardtypesGettablePublicDasbhboardDTO;
-}
-
-export interface DashboardtypesPostablePublicDashboardDTO {
+ hidden?: boolean;
/**
* @type string
*/
- defaultTimeRange?: string;
+ name?: string;
+}
+
+export interface DashboardTextVariableSpecDTO {
/**
* @type boolean
*/
- timeRangeEnabled?: boolean;
-}
-
-export interface DashboardtypesUpdatablePublicDashboardDTO {
+ constant?: boolean;
+ display?: VariableDisplayDTO;
/**
* @type string
*/
- defaultTimeRange?: string;
+ name?: string;
/**
- * @type boolean
+ * @type string
*/
- timeRangeEnabled?: boolean;
+ value?: string;
}
-export type FactoryResponseDTOServicesAnyOf = { [key: string]: string[] };
-
-/**
- * @nullable
- */
-export type FactoryResponseDTOServices = FactoryResponseDTOServicesAnyOf | null;
-
-export interface FactoryResponseDTO {
+export interface DashboardtypesAxesDTO {
/**
* @type boolean
*/
- healthy?: boolean;
+ isLogScale?: boolean;
/**
- * @type object,null
+ * @type number,null
*/
- services?: FactoryResponseDTOServices;
+ softMax?: number | null;
+ /**
+ * @type number,null
+ */
+ softMin?: number | null;
}
-export type FeaturetypesGettableFeatureDTOVariantsAnyOf = {
- [key: string]: unknown;
+export enum DashboardtypesPrecisionOptionDTO {
+ NUMBER_0 = '0',
+ NUMBER_1 = '1',
+ NUMBER_2 = '2',
+ NUMBER_3 = '3',
+ NUMBER_4 = '4',
+ full = 'full',
+}
+export interface DashboardtypesPanelFormattingDTO {
+ decimalPrecision?: DashboardtypesPrecisionOptionDTO;
+ /**
+ * @type string
+ */
+ unit?: string;
+}
+
+export enum DashboardtypesLegendPositionDTO {
+ bottom = 'bottom',
+ right = 'right',
+}
+export type DashboardtypesLegendDTOCustomColorsAnyOf = {
+ [key: string]: string;
};
/**
* @nullable
*/
-export type FeaturetypesGettableFeatureDTOVariants =
- FeaturetypesGettableFeatureDTOVariantsAnyOf | null;
+export type DashboardtypesLegendDTOCustomColors =
+ DashboardtypesLegendDTOCustomColorsAnyOf | null;
-export interface FeaturetypesGettableFeatureDTO {
- /**
- * @type string
- */
- defaultVariant?: string;
+export interface DashboardtypesLegendDTO {
/**
- * @type string
+ * @type object,null
*/
- description?: string;
+ customColors?: DashboardtypesLegendDTOCustomColors;
+ position?: DashboardtypesLegendPositionDTO;
+}
+
+export interface DashboardtypesThresholdWithLabelDTO {
/**
* @type string
*/
- kind?: string;
+ color: string;
/**
* @type string
*/
- name?: string;
- resolvedValue?: unknown;
+ label: string;
/**
* @type string
*/
- stage?: string;
+ unit?: string;
/**
- * @type object,null
+ * @type number
+ * @format double
*/
- variants?: FeaturetypesGettableFeatureDTOVariants;
+ value: number;
}
-export interface GatewaytypesGettableCreatedIngestionKeyDTO {
+export enum DashboardtypesTimePreferenceDTO {
+ global_time = 'global_time',
+ last_5_min = 'last_5_min',
+ last_15_min = 'last_15_min',
+ last_30_min = 'last_30_min',
+ last_1_hr = 'last_1_hr',
+ last_6_hr = 'last_6_hr',
+ last_1_day = 'last_1_day',
+ last_3_days = 'last_3_days',
+ last_1_week = 'last_1_week',
+ last_1_month = 'last_1_month',
+}
+export interface DashboardtypesBarChartVisualizationDTO {
/**
- * @type string
+ * @type boolean
*/
- id: string;
+ fillSpans?: boolean;
/**
- * @type string
+ * @type boolean
*/
- value: string;
+ stackedBarChart?: boolean;
+ timePreference?: DashboardtypesTimePreferenceDTO;
}
-export interface GatewaytypesGettableCreatedIngestionKeyLimitDTO {
+export interface DashboardtypesBarChartPanelSpecDTO {
+ axes?: DashboardtypesAxesDTO;
+ formatting?: DashboardtypesPanelFormattingDTO;
+ legend?: DashboardtypesLegendDTO;
/**
- * @type string
+ * @type array,null
*/
- id: string;
+ thresholds?: DashboardtypesThresholdWithLabelDTO[] | null;
+ visualization?: DashboardtypesBarChartVisualizationDTO;
}
-export interface GatewaytypesPaginationDTO {
- /**
- * @type integer
- */
- page?: number;
- /**
- * @type integer
- */
- pages?: number;
+export interface DashboardtypesBasicVisualizationDTO {
+ timePreference?: DashboardtypesTimePreferenceDTO;
+}
+
+export interface Querybuildertypesv5LogAggregationDTO {
/**
- * @type integer
+ * @type string
*/
- per_page?: number;
+ alias?: string;
/**
- * @type integer
+ * @type string
*/
- total?: number;
+ expression?: string;
}
-export interface GatewaytypesLimitValueDTO {
+export interface Querybuildertypesv5FilterDTO {
/**
- * @type integer,null
+ * @type string
*/
- count?: number | null;
+ expression?: string;
+}
+
+export interface Querybuildertypesv5FunctionArgDTO {
/**
- * @type integer,null
+ * @type string
*/
- size?: number | null;
+ name?: string;
+ value?: unknown;
}
-export interface GatewaytypesLimitConfigDTO {
- day?: GatewaytypesLimitValueDTO;
- second?: GatewaytypesLimitValueDTO;
+export enum Querybuildertypesv5FunctionNameDTO {
+ cutoffmin = 'cutoffmin',
+ cutoffmax = 'cutoffmax',
+ clampmin = 'clampmin',
+ clampmax = 'clampmax',
+ absolute = 'absolute',
+ runningdiff = 'runningdiff',
+ log2 = 'log2',
+ log10 = 'log10',
+ cumulativesum = 'cumulativesum',
+ ewma3 = 'ewma3',
+ ewma5 = 'ewma5',
+ ewma7 = 'ewma7',
+ median3 = 'median3',
+ median5 = 'median5',
+ median7 = 'median7',
+ timeshift = 'timeshift',
+ anomaly = 'anomaly',
+ fillzero = 'fillzero',
}
-
-export interface GatewaytypesLimitMetricValueDTO {
- /**
- * @type integer
- * @format int64
- */
- count?: number;
+export interface Querybuildertypesv5FunctionDTO {
/**
- * @type integer
- * @format int64
+ * @type array
*/
- size?: number;
+ args?: Querybuildertypesv5FunctionArgDTO[];
+ name?: Querybuildertypesv5FunctionNameDTO;
}
-export interface GatewaytypesLimitMetricDTO {
- day?: GatewaytypesLimitMetricValueDTO;
- second?: GatewaytypesLimitMetricValueDTO;
+export enum TelemetrytypesFieldContextDTO {
+ metric = 'metric',
+ log = 'log',
+ span = 'span',
+ resource = 'resource',
+ attribute = 'attribute',
+ body = 'body',
}
-
-export interface GatewaytypesLimitDTO {
- config?: GatewaytypesLimitConfigDTO;
+export enum TelemetrytypesFieldDataTypeDTO {
+ string = 'string',
+ bool = 'bool',
+ float64 = 'float64',
+ int64 = 'int64',
+ number = 'number',
+}
+export enum TelemetrytypesSignalDTO {
+ traces = 'traces',
+ logs = 'logs',
+ metrics = 'metrics',
+}
+export interface Querybuildertypesv5GroupByKeyDTO {
/**
* @type string
- * @format date-time
*/
- created_at?: string;
+ description?: string;
+ fieldContext?: TelemetrytypesFieldContextDTO;
+ fieldDataType?: TelemetrytypesFieldDataTypeDTO;
/**
* @type string
*/
- id?: string;
+ name: string;
+ signal?: TelemetrytypesSignalDTO;
/**
* @type string
*/
- key_id?: string;
- metric?: GatewaytypesLimitMetricDTO;
+ unit?: string;
+}
+
+export interface Querybuildertypesv5HavingDTO {
/**
* @type string
*/
- signal?: string;
+ expression?: string;
+}
+
+export interface Querybuildertypesv5LimitByDTO {
/**
* @type array,null
*/
- tags?: string[] | null;
+ keys?: string[] | null;
/**
* @type string
- * @format date-time
*/
- updated_at?: string;
+ value?: string;
}
-export interface GatewaytypesIngestionKeyDTO {
+export enum Querybuildertypesv5OrderDirectionDTO {
+ asc = 'asc',
+ desc = 'desc',
+}
+export interface Querybuildertypesv5OrderByKeyDTO {
/**
* @type string
- * @format date-time
*/
- created_at?: string;
+ description?: string;
+ fieldContext?: TelemetrytypesFieldContextDTO;
+ fieldDataType?: TelemetrytypesFieldDataTypeDTO;
/**
* @type string
- * @format date-time
*/
- expires_at?: string;
+ name: string;
+ signal?: TelemetrytypesSignalDTO;
/**
* @type string
*/
- id?: string;
- /**
- * @type array,null
- */
- limits?: GatewaytypesLimitDTO[] | null;
+ unit?: string;
+}
+
+export interface Querybuildertypesv5OrderByDTO {
+ direction?: Querybuildertypesv5OrderDirectionDTO;
+ key?: Querybuildertypesv5OrderByKeyDTO;
+}
+
+/**
+ * Step interval. Accepts a Go duration string (e.g., "60s", "1m", "1h") or a number representing seconds (e.g., 60).
+ */
+export type Querybuildertypesv5StepDTO = string | number;
+
+export interface Querybuildertypesv5SecondaryAggregationDTO {
/**
* @type string
*/
- name?: string;
- /**
- * @type array,null
- */
- tags?: string[] | null;
+ alias?: string;
/**
* @type string
- * @format date-time
*/
- updated_at?: string;
+ expression?: string;
/**
- * @type string
+ * @type array
*/
- value?: string;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[];
/**
- * @type string
+ * @type integer
*/
- workspace_id?: string;
-}
-
-export interface GatewaytypesGettableIngestionKeysDTO {
- _pagination?: GatewaytypesPaginationDTO;
+ limit?: number;
+ limitBy?: Querybuildertypesv5LimitByDTO;
/**
- * @type array,null
+ * @type array
*/
- keys?: GatewaytypesIngestionKeyDTO[] | null;
+ order?: Querybuildertypesv5OrderByDTO[];
+ stepInterval?: Querybuildertypesv5StepDTO;
}
-export interface GatewaytypesPostableIngestionKeyDTO {
+export interface TelemetrytypesTelemetryFieldKeyDTO {
/**
* @type string
- * @format date-time
*/
- expires_at?: string;
+ description?: string;
+ fieldContext?: TelemetrytypesFieldContextDTO;
+ fieldDataType?: TelemetrytypesFieldDataTypeDTO;
/**
* @type string
*/
name: string;
- /**
- * @type array,null
- */
- tags?: string[] | null;
-}
-
-export interface GatewaytypesPostableIngestionKeyLimitDTO {
- config?: GatewaytypesLimitConfigDTO;
+ signal?: TelemetrytypesSignalDTO;
/**
* @type string
*/
- signal?: string;
- /**
- * @type array,null
- */
- tags?: string[] | null;
+ unit?: string;
}
-export interface GatewaytypesUpdatableIngestionKeyLimitDTO {
- config: GatewaytypesLimitConfigDTO;
- /**
- * @type array,null
- */
- tags?: string[] | null;
+export enum TelemetrytypesSourceDTO {
+ meter = 'meter',
}
-
-export interface GlobaltypesAPIKeyConfigDTO {
+export interface Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5LogAggregationDTO {
/**
- * @type boolean
+ * @type array
*/
- enabled?: boolean;
-}
-
-export interface GlobaltypesImpersonationConfigDTO {
+ aggregations?: Querybuildertypesv5LogAggregationDTO[];
/**
- * @type boolean
+ * @type string
*/
- enabled?: boolean;
-}
-
-export interface GlobaltypesTokenizerConfigDTO {
+ cursor?: string;
/**
* @type boolean
*/
- enabled?: boolean;
-}
-
-export interface GlobaltypesIdentNConfigDTO {
- apikey?: GlobaltypesAPIKeyConfigDTO;
- impersonation?: GlobaltypesImpersonationConfigDTO;
- tokenizer?: GlobaltypesTokenizerConfigDTO;
-}
-
-export interface GlobaltypesConfigDTO {
+ disabled?: boolean;
+ filter?: Querybuildertypesv5FilterDTO;
/**
- * @type string,null
+ * @type array
*/
- ai_assistant_url: string | null;
+ functions?: Querybuildertypesv5FunctionDTO[];
/**
- * @type string
+ * @type array
*/
- external_url: string;
- identN?: GlobaltypesIdentNConfigDTO;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[];
+ having?: Querybuildertypesv5HavingDTO;
/**
* @type string
*/
- ingestion_url: string;
- /**
- * @type string,null
- */
- mcp_url: string | null;
-}
-
-export type InframonitoringtypesClusterRecordDTOMetaAnyOf = {
- [key: string]: string;
-};
-
-/**
- * @nullable
- */
-export type InframonitoringtypesClusterRecordDTOMeta =
- InframonitoringtypesClusterRecordDTOMetaAnyOf | null;
-
-export interface InframonitoringtypesNodeCountsByReadinessDTO {
- /**
- * @type integer
- */
- notReady: number;
+ legend?: string;
/**
* @type integer
*/
- ready: number;
-}
-
-export interface InframonitoringtypesPodCountsByPhaseDTO {
+ limit?: number;
+ limitBy?: Querybuildertypesv5LimitByDTO;
/**
- * @type integer
+ * @type string
*/
- failed: number;
+ name?: string;
/**
* @type integer
*/
- pending: number;
+ offset?: number;
/**
- * @type integer
+ * @type array
*/
- running: number;
+ order?: Querybuildertypesv5OrderByDTO[];
/**
- * @type integer
+ * @type array
*/
- succeeded: number;
+ secondaryAggregations?: Querybuildertypesv5SecondaryAggregationDTO[];
/**
- * @type integer
+ * @type array
*/
- unknown: number;
+ selectFields?: TelemetrytypesTelemetryFieldKeyDTO[];
+ signal?: TelemetrytypesSignalDTO;
+ source?: TelemetrytypesSourceDTO;
+ stepInterval?: Querybuildertypesv5StepDTO;
}
-export interface InframonitoringtypesClusterRecordDTO {
+export interface MetrictypesComparisonSpaceAggregationParamDTO {
/**
- * @type number
- * @format double
+ * @type string
*/
- clusterCPU: number;
+ operator: string;
/**
* @type number
* @format double
*/
- clusterCPUAllocatable: number;
+ threshold: number;
+}
+
+export enum Querybuildertypesv5ReduceToDTO {
+ sum = 'sum',
+ count = 'count',
+ avg = 'avg',
+ min = 'min',
+ max = 'max',
+ last = 'last',
+ median = 'median',
+}
+export enum MetrictypesSpaceAggregationDTO {
+ sum = 'sum',
+ avg = 'avg',
+ min = 'min',
+ max = 'max',
+ count = 'count',
+ p50 = 'p50',
+ p75 = 'p75',
+ p90 = 'p90',
+ p95 = 'p95',
+ p99 = 'p99',
+}
+export enum MetrictypesTemporalityDTO {
+ delta = 'delta',
+ cumulative = 'cumulative',
+ unspecified = 'unspecified',
+}
+export enum MetrictypesTimeAggregationDTO {
+ latest = 'latest',
+ sum = 'sum',
+ avg = 'avg',
+ min = 'min',
+ max = 'max',
+ count = 'count',
+ count_distinct = 'count_distinct',
+ rate = 'rate',
+ increase = 'increase',
+}
+export interface Querybuildertypesv5MetricAggregationDTO {
+ comparisonSpaceAggregationParam?: MetrictypesComparisonSpaceAggregationParamDTO;
/**
- * @type number
- * @format double
+ * @type string
*/
- clusterMemory: number;
+ metricName?: string;
+ reduceTo?: Querybuildertypesv5ReduceToDTO;
+ spaceAggregation?: MetrictypesSpaceAggregationDTO;
+ temporality?: MetrictypesTemporalityDTO;
+ timeAggregation?: MetrictypesTimeAggregationDTO;
+}
+
+export interface Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5MetricAggregationDTO {
/**
- * @type number
- * @format double
+ * @type array
*/
- clusterMemoryAllocatable: number;
+ aggregations?: Querybuildertypesv5MetricAggregationDTO[];
/**
* @type string
*/
- clusterName: string;
+ cursor?: string;
/**
- * @type object,null
+ * @type boolean
*/
- meta: InframonitoringtypesClusterRecordDTOMeta;
- nodeCountsByReadiness: InframonitoringtypesNodeCountsByReadinessDTO;
- podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
-}
-
-export interface InframonitoringtypesRequiredMetricsCheckDTO {
+ disabled?: boolean;
+ filter?: Querybuildertypesv5FilterDTO;
/**
- * @type array,null
+ * @type array
*/
- missingMetrics: string[] | null;
-}
-
-export enum InframonitoringtypesResponseTypeDTO {
- list = 'list',
- grouped_list = 'grouped_list',
-}
-export interface Querybuildertypesv5QueryWarnDataAdditionalDTO {
+ functions?: Querybuildertypesv5FunctionDTO[];
/**
- * @type string
+ * @type array
*/
- message?: string;
-}
-
-export interface Querybuildertypesv5QueryWarnDataDTO {
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[];
+ having?: Querybuildertypesv5HavingDTO;
/**
* @type string
*/
- message?: string;
+ legend?: string;
+ /**
+ * @type integer
+ */
+ limit?: number;
+ limitBy?: Querybuildertypesv5LimitByDTO;
/**
* @type string
*/
- url?: string;
+ name?: string;
/**
- * @type array
+ * @type integer
*/
- warnings?: Querybuildertypesv5QueryWarnDataAdditionalDTO[];
-}
-
-export interface InframonitoringtypesClustersDTO {
+ offset?: number;
/**
- * @type boolean
+ * @type array
*/
- endTimeBeforeRetention: boolean;
+ order?: Querybuildertypesv5OrderByDTO[];
/**
* @type array
*/
- records: InframonitoringtypesClusterRecordDTO[];
- requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
+ secondaryAggregations?: Querybuildertypesv5SecondaryAggregationDTO[];
/**
- * @type integer
+ * @type array
*/
- total: number;
- type: InframonitoringtypesResponseTypeDTO;
- warning?: Querybuildertypesv5QueryWarnDataDTO;
+ selectFields?: TelemetrytypesTelemetryFieldKeyDTO[];
+ signal?: TelemetrytypesSignalDTO;
+ source?: TelemetrytypesSourceDTO;
+ stepInterval?: Querybuildertypesv5StepDTO;
}
-export type InframonitoringtypesDaemonSetRecordDTOMetaAnyOf = {
- [key: string]: string;
-};
-
-/**
- * @nullable
- */
-export type InframonitoringtypesDaemonSetRecordDTOMeta =
- InframonitoringtypesDaemonSetRecordDTOMetaAnyOf | null;
-
-export interface InframonitoringtypesDaemonSetRecordDTO {
+export interface Querybuildertypesv5TraceAggregationDTO {
/**
- * @type integer
+ * @type string
*/
- currentNodes: number;
+ alias?: string;
/**
- * @type number
- * @format double
+ * @type string
*/
- daemonSetCPU: number;
+ expression?: string;
+}
+
+export interface Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5TraceAggregationDTO {
/**
- * @type number
- * @format double
+ * @type array
*/
- daemonSetCPULimit: number;
+ aggregations?: Querybuildertypesv5TraceAggregationDTO[];
/**
- * @type number
- * @format double
+ * @type string
*/
- daemonSetCPURequest: number;
+ cursor?: string;
/**
- * @type number
- * @format double
+ * @type boolean
*/
- daemonSetMemory: number;
+ disabled?: boolean;
+ filter?: Querybuildertypesv5FilterDTO;
/**
- * @type number
- * @format double
+ * @type array
*/
- daemonSetMemoryLimit: number;
+ functions?: Querybuildertypesv5FunctionDTO[];
/**
- * @type number
- * @format double
+ * @type array
*/
- daemonSetMemoryRequest: number;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[];
+ having?: Querybuildertypesv5HavingDTO;
/**
* @type string
*/
- daemonSetName: string;
+ legend?: string;
/**
* @type integer
*/
- desiredNodes: number;
+ limit?: number;
+ limitBy?: Querybuildertypesv5LimitByDTO;
/**
- * @type object,null
+ * @type string
*/
- meta: InframonitoringtypesDaemonSetRecordDTOMeta;
- podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
-}
-
-export interface InframonitoringtypesDaemonSetsDTO {
+ name?: string;
/**
- * @type boolean
+ * @type integer
*/
- endTimeBeforeRetention: boolean;
+ offset?: number;
/**
* @type array
*/
- records: InframonitoringtypesDaemonSetRecordDTO[];
- requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
+ order?: Querybuildertypesv5OrderByDTO[];
/**
- * @type integer
+ * @type array
*/
- total: number;
- type: InframonitoringtypesResponseTypeDTO;
- warning?: Querybuildertypesv5QueryWarnDataDTO;
+ secondaryAggregations?: Querybuildertypesv5SecondaryAggregationDTO[];
+ /**
+ * @type array
+ */
+ selectFields?: TelemetrytypesTelemetryFieldKeyDTO[];
+ signal?: TelemetrytypesSignalDTO;
+ source?: TelemetrytypesSourceDTO;
+ stepInterval?: Querybuildertypesv5StepDTO;
}
-export type InframonitoringtypesDeploymentRecordDTOMetaAnyOf = {
- [key: string]: string;
-};
-
-/**
- * @nullable
- */
-export type InframonitoringtypesDeploymentRecordDTOMeta =
- InframonitoringtypesDeploymentRecordDTOMetaAnyOf | null;
+export type DashboardtypesBuilderQuerySpecDTO =
+ | Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5LogAggregationDTO
+ | Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5MetricAggregationDTO
+ | Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5TraceAggregationDTO;
-export interface InframonitoringtypesDeploymentRecordDTO {
- /**
- * @type integer
- */
- availablePods: number;
- /**
- * @type number
- * @format double
- */
- deploymentCPU: number;
- /**
- * @type number
- * @format double
- */
- deploymentCPULimit: number;
+export enum DashboardtypesComparisonOperatorDTO {
+ above = 'above',
+ below = 'below',
+ above_or_equal = 'above_or_equal',
+ below_or_equal = 'below_or_equal',
+ equal = 'equal',
+ not_equal = 'not_equal',
+}
+export enum DashboardtypesThresholdFormatDTO {
+ text = 'text',
+ background = 'background',
+}
+export interface DashboardtypesComparisonThresholdDTO {
/**
- * @type number
- * @format double
+ * @type string
*/
- deploymentCPURequest: number;
+ color: string;
+ format?: DashboardtypesThresholdFormatDTO;
+ operator?: DashboardtypesComparisonOperatorDTO;
/**
- * @type number
- * @format double
+ * @type string
*/
- deploymentMemory: number;
+ unit?: string;
/**
* @type number
* @format double
*/
- deploymentMemoryLimit: number;
+ value: number;
+}
+
+export interface DashboardtypesCustomVariableSpecDTO {
/**
- * @type number
- * @format double
+ * @type string
*/
- deploymentMemoryRequest: number;
+ customValue: string;
+}
+
+export enum DashboardtypesSourceDTO {
+ user = 'user',
+ system = 'system',
+ integration = 'integration',
+}
+export interface DashboardtypesDashboardDTO {
/**
* @type string
+ * @format date-time
*/
- deploymentName: string;
+ createdAt?: string;
/**
- * @type integer
+ * @type string
*/
- desiredPods: number;
+ createdBy?: string;
+ data?: DashboardtypesStorableDashboardDataDTO;
/**
- * @type object,null
+ * @type string
*/
- meta: InframonitoringtypesDeploymentRecordDTOMeta;
- podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
-}
-
-export interface InframonitoringtypesDeploymentsDTO {
+ id?: string;
/**
* @type boolean
*/
- endTimeBeforeRetention: boolean;
+ locked?: boolean;
/**
- * @type array
+ * @type string
*/
- records: InframonitoringtypesDeploymentRecordDTO[];
- requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
+ org_id?: string;
+ source?: DashboardtypesSourceDTO;
/**
- * @type integer
+ * @type string
+ * @format date-time
*/
- total: number;
- type: InframonitoringtypesResponseTypeDTO;
- warning?: Querybuildertypesv5QueryWarnDataDTO;
-}
-
-export enum InframonitoringtypesHostStatusDTO {
- active = 'active',
- inactive = 'inactive',
- '' = '',
-}
-export interface InframonitoringtypesHostFilterDTO {
+ updatedAt?: string;
/**
* @type string
*/
- expression?: string;
- filterByStatus?: InframonitoringtypesHostStatusDTO;
+ updatedBy?: string;
}
-export type InframonitoringtypesHostRecordDTOMetaAnyOf = {
- [key: string]: string;
+export enum DashboardtypesDatasourcePluginVariantStructDTOKind {
+ 'signoz/Datasource' = 'signoz/Datasource',
+}
+export type DashboardtypesDatasourcePluginVariantStructDTOSpecAnyOf = {
+ [key: string]: unknown;
};
/**
* @nullable
*/
-export type InframonitoringtypesHostRecordDTOMeta =
- InframonitoringtypesHostRecordDTOMetaAnyOf | null;
+export type DashboardtypesDatasourcePluginVariantStructDTOSpec =
+ DashboardtypesDatasourcePluginVariantStructDTOSpecAnyOf | null;
-export interface InframonitoringtypesHostRecordDTO {
+export interface DashboardtypesDatasourcePluginVariantStructDTO {
/**
- * @type integer
+ * @enum signoz/Datasource
+ * @type string
*/
- activeHostCount: number;
+ kind: DashboardtypesDatasourcePluginVariantStructDTOKind;
/**
- * @type number
- * @format double
+ * @type object,null
*/
- cpu: number;
- /**
- * @type number
- * @format double
- */
- diskUsage: number;
- /**
- * @type string
- */
- hostName: string;
- /**
- * @type integer
- */
- inactiveHostCount: number;
- /**
- * @type number
- * @format double
- */
- load15: number;
- /**
- * @type number
- * @format double
- */
- memory: number;
- /**
- * @type object,null
- */
- meta: InframonitoringtypesHostRecordDTOMeta;
- status: InframonitoringtypesHostStatusDTO;
- /**
- * @type number
- * @format double
- */
- wait: number;
+ spec: DashboardtypesDatasourcePluginVariantStructDTOSpec;
}
-export interface InframonitoringtypesHostsDTO {
+export type DashboardtypesDatasourcePluginDTO =
+ DashboardtypesDatasourcePluginVariantStructDTO;
+
+export interface DashboardtypesDatasourceSpecDTO {
/**
* @type boolean
*/
- endTimeBeforeRetention: boolean;
- /**
- * @type array
- */
- records: InframonitoringtypesHostRecordDTO[];
- requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
- /**
- * @type integer
- */
- total: number;
- type: InframonitoringtypesResponseTypeDTO;
- warning?: Querybuildertypesv5QueryWarnDataDTO;
+ default?: boolean;
+ display?: CommonDisplayDTO;
+ plugin?: DashboardtypesDatasourcePluginDTO;
}
-export type InframonitoringtypesJobRecordDTOMetaAnyOf = {
- [key: string]: string;
+export type DashboardtypesDashboardSpecDTODatasources = {
+ [key: string]: DashboardtypesDatasourceSpecDTO;
};
-/**
- * @nullable
- */
-export type InframonitoringtypesJobRecordDTOMeta =
- InframonitoringtypesJobRecordDTOMetaAnyOf | null;
-
-export interface InframonitoringtypesJobRecordDTO {
- /**
- * @type integer
- */
- activePods: number;
- /**
- * @type integer
- */
- desiredSuccessfulPods: number;
- /**
- * @type integer
- */
- failedPods: number;
+export interface V1PanelDisplayDTO {
/**
- * @type number
- * @format double
+ * @type string
*/
- jobCPU: number;
+ description?: string;
/**
- * @type number
- * @format double
+ * @type string
*/
- jobCPULimit: number;
+ name?: string;
+}
+
+export interface V1LinkDTO {
/**
- * @type number
- * @format double
+ * @type string
*/
- jobCPURequest: number;
+ name?: string;
/**
- * @type number
- * @format double
+ * @type boolean
*/
- jobMemory: number;
+ renderVariables?: boolean;
/**
- * @type number
- * @format double
+ * @type boolean
*/
- jobMemoryLimit: number;
+ targetBlank?: boolean;
/**
- * @type number
- * @format double
+ * @type string
*/
- jobMemoryRequest: number;
+ tooltip?: string;
/**
* @type string
*/
- jobName: string;
+ url?: string;
+}
+
+export enum DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTimeSeriesPanelSpecDTOKind {
+ 'signoz/TimeSeriesPanel' = 'signoz/TimeSeriesPanel',
+}
+export enum DashboardtypesFillModeDTO {
+ solid = 'solid',
+ gradient = 'gradient',
+ none = 'none',
+}
+export enum DashboardtypesLineInterpolationDTO {
+ linear = 'linear',
+ spline = 'spline',
+ step_after = 'step_after',
+ step_before = 'step_before',
+}
+export enum DashboardtypesLineStyleDTO {
+ solid = 'solid',
+ dashed = 'dashed',
+}
+export interface DashboardtypesSpanGapsDTO {
/**
- * @type object,null
+ * @type string
*/
- meta: InframonitoringtypesJobRecordDTOMeta;
- podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
+ fillLessThan?: string;
/**
- * @type integer
+ * @type boolean
*/
- successfulPods: number;
+ fillOnlyBelow?: boolean;
}
-export interface InframonitoringtypesJobsDTO {
+export interface DashboardtypesTimeSeriesChartAppearanceDTO {
+ fillMode?: DashboardtypesFillModeDTO;
+ lineInterpolation?: DashboardtypesLineInterpolationDTO;
+ lineStyle?: DashboardtypesLineStyleDTO;
/**
* @type boolean
*/
- endTimeBeforeRetention: boolean;
- /**
- * @type array
- */
- records: InframonitoringtypesJobRecordDTO[];
- requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
- /**
- * @type integer
- */
- total: number;
- type: InframonitoringtypesResponseTypeDTO;
- warning?: Querybuildertypesv5QueryWarnDataDTO;
+ showPoints?: boolean;
+ spanGaps?: DashboardtypesSpanGapsDTO;
}
-export type InframonitoringtypesNamespaceRecordDTOMetaAnyOf = {
- [key: string]: string;
-};
-
-/**
- * @nullable
- */
-export type InframonitoringtypesNamespaceRecordDTOMeta =
- InframonitoringtypesNamespaceRecordDTOMetaAnyOf | null;
-
-export interface InframonitoringtypesNamespaceRecordDTO {
+export interface DashboardtypesTimeSeriesVisualizationDTO {
/**
- * @type object,null
+ * @type boolean
*/
- meta: InframonitoringtypesNamespaceRecordDTOMeta;
+ fillSpans?: boolean;
+ timePreference?: DashboardtypesTimePreferenceDTO;
+}
+
+export interface DashboardtypesTimeSeriesPanelSpecDTO {
+ axes?: DashboardtypesAxesDTO;
+ chartAppearance?: DashboardtypesTimeSeriesChartAppearanceDTO;
+ formatting?: DashboardtypesPanelFormattingDTO;
+ legend?: DashboardtypesLegendDTO;
/**
- * @type number
- * @format double
+ * @type array,null
*/
- namespaceCPU: number;
+ thresholds?: DashboardtypesThresholdWithLabelDTO[] | null;
+ visualization?: DashboardtypesTimeSeriesVisualizationDTO;
+}
+
+export interface DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTimeSeriesPanelSpecDTO {
/**
- * @type number
- * @format double
+ * @enum signoz/TimeSeriesPanel
+ * @type string
*/
- namespaceMemory: number;
+ kind: DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTimeSeriesPanelSpecDTOKind;
+ spec: DashboardtypesTimeSeriesPanelSpecDTO;
+}
+
+export enum DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBarChartPanelSpecDTOKind {
+ 'signoz/BarChartPanel' = 'signoz/BarChartPanel',
+}
+export interface DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBarChartPanelSpecDTO {
/**
+ * @enum signoz/BarChartPanel
* @type string
*/
- namespaceName: string;
- podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
+ kind: DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBarChartPanelSpecDTOKind;
+ spec: DashboardtypesBarChartPanelSpecDTO;
}
-export interface InframonitoringtypesNamespacesDTO {
+export enum DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesNumberPanelSpecDTOKind {
+ 'signoz/NumberPanel' = 'signoz/NumberPanel',
+}
+export interface DashboardtypesNumberPanelSpecDTO {
+ formatting?: DashboardtypesPanelFormattingDTO;
/**
- * @type boolean
+ * @type array,null
*/
- endTimeBeforeRetention: boolean;
+ thresholds?: DashboardtypesComparisonThresholdDTO[] | null;
+ visualization?: DashboardtypesBasicVisualizationDTO;
+}
+
+export interface DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesNumberPanelSpecDTO {
/**
- * @type array
+ * @enum signoz/NumberPanel
+ * @type string
*/
- records: InframonitoringtypesNamespaceRecordDTO[];
- requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
+ kind: DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesNumberPanelSpecDTOKind;
+ spec: DashboardtypesNumberPanelSpecDTO;
+}
+
+export enum DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesPieChartPanelSpecDTOKind {
+ 'signoz/PieChartPanel' = 'signoz/PieChartPanel',
+}
+export interface DashboardtypesPieChartPanelSpecDTO {
+ formatting?: DashboardtypesPanelFormattingDTO;
+ legend?: DashboardtypesLegendDTO;
+ visualization?: DashboardtypesBasicVisualizationDTO;
+}
+
+export interface DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesPieChartPanelSpecDTO {
/**
- * @type integer
+ * @enum signoz/PieChartPanel
+ * @type string
*/
- total: number;
- type: InframonitoringtypesResponseTypeDTO;
- warning?: Querybuildertypesv5QueryWarnDataDTO;
+ kind: DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesPieChartPanelSpecDTOKind;
+ spec: DashboardtypesPieChartPanelSpecDTO;
}
-export enum InframonitoringtypesNodeConditionDTO {
- ready = 'ready',
- not_ready = 'not_ready',
- no_data = 'no_data',
+export enum DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTablePanelSpecDTOKind {
+ 'signoz/TablePanel' = 'signoz/TablePanel',
}
-export type InframonitoringtypesNodeRecordDTOMetaAnyOf = {
+export type DashboardtypesTableFormattingDTOColumnUnitsAnyOf = {
[key: string]: string;
};
/**
* @nullable
*/
-export type InframonitoringtypesNodeRecordDTOMeta =
- InframonitoringtypesNodeRecordDTOMetaAnyOf | null;
+export type DashboardtypesTableFormattingDTOColumnUnits =
+ DashboardtypesTableFormattingDTOColumnUnitsAnyOf | null;
-export interface InframonitoringtypesNodeRecordDTO {
- condition: InframonitoringtypesNodeConditionDTO;
+export interface DashboardtypesTableFormattingDTO {
/**
* @type object,null
*/
- meta: InframonitoringtypesNodeRecordDTOMeta;
+ columnUnits?: DashboardtypesTableFormattingDTOColumnUnits;
+ decimalPrecision?: DashboardtypesPrecisionOptionDTO;
+}
+
+export interface DashboardtypesTableThresholdDTO {
/**
- * @type number
- * @format double
+ * @type string
*/
- nodeCPU: number;
+ color: string;
/**
- * @type number
- * @format double
+ * @type string
*/
- nodeCPUAllocatable: number;
- nodeCountsByReadiness: InframonitoringtypesNodeCountsByReadinessDTO;
+ columnName: string;
+ format?: DashboardtypesThresholdFormatDTO;
+ operator?: DashboardtypesComparisonOperatorDTO;
/**
- * @type number
- * @format double
+ * @type string
*/
- nodeMemory: number;
+ unit?: string;
/**
* @type number
* @format double
*/
- nodeMemoryAllocatable: number;
+ value: number;
+}
+
+export interface DashboardtypesTablePanelSpecDTO {
+ formatting?: DashboardtypesTableFormattingDTO;
+ /**
+ * @type array,null
+ */
+ thresholds?: DashboardtypesTableThresholdDTO[] | null;
+ visualization?: DashboardtypesBasicVisualizationDTO;
+}
+
+export interface DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTablePanelSpecDTO {
/**
+ * @enum signoz/TablePanel
* @type string
*/
- nodeName: string;
- podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
+ kind: DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTablePanelSpecDTOKind;
+ spec: DashboardtypesTablePanelSpecDTO;
}
-export interface InframonitoringtypesNodesDTO {
+export enum DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesHistogramPanelSpecDTOKind {
+ 'signoz/HistogramPanel' = 'signoz/HistogramPanel',
+}
+export interface DashboardtypesHistogramBucketsDTO {
/**
- * @type boolean
+ * @type number,null
*/
- endTimeBeforeRetention: boolean;
+ bucketCount?: number | null;
/**
- * @type array
+ * @type number,null
*/
- records: InframonitoringtypesNodeRecordDTO[];
- requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
+ bucketWidth?: number | null;
/**
- * @type integer
+ * @type boolean
*/
- total: number;
- type: InframonitoringtypesResponseTypeDTO;
- warning?: Querybuildertypesv5QueryWarnDataDTO;
+ mergeAllActiveQueries?: boolean;
}
-export enum InframonitoringtypesPodPhaseDTO {
- pending = 'pending',
- running = 'running',
- succeeded = 'succeeded',
- failed = 'failed',
- unknown = 'unknown',
- no_data = 'no_data',
+export interface DashboardtypesHistogramPanelSpecDTO {
+ histogramBuckets?: DashboardtypesHistogramBucketsDTO;
+ legend?: DashboardtypesLegendDTO;
}
-export type InframonitoringtypesPodRecordDTOMetaAnyOf = {
- [key: string]: string;
-};
-
-/**
- * @nullable
- */
-export type InframonitoringtypesPodRecordDTOMeta =
- InframonitoringtypesPodRecordDTOMetaAnyOf | null;
-export interface InframonitoringtypesPodRecordDTO {
+export interface DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesHistogramPanelSpecDTO {
/**
- * @type object,null
+ * @enum signoz/HistogramPanel
+ * @type string
*/
- meta: InframonitoringtypesPodRecordDTOMeta;
+ kind: DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesHistogramPanelSpecDTOKind;
+ spec: DashboardtypesHistogramPanelSpecDTO;
+}
+
+export enum DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesListPanelSpecDTOKind {
+ 'signoz/ListPanel' = 'signoz/ListPanel',
+}
+export interface DashboardtypesListPanelSpecDTO {
/**
- * @type integer
- * @format int64
+ * @type array
*/
- podAge: number;
+ selectFields?: TelemetrytypesTelemetryFieldKeyDTO[];
+}
+
+export interface DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesListPanelSpecDTO {
/**
- * @type number
- * @format double
+ * @enum signoz/ListPanel
+ * @type string
+ */
+ kind: DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesListPanelSpecDTOKind;
+ spec: DashboardtypesListPanelSpecDTO;
+}
+
+export type DashboardtypesPanelPluginDTO =
+ | DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTimeSeriesPanelSpecDTO
+ | DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBarChartPanelSpecDTO
+ | DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesNumberPanelSpecDTO
+ | DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesPieChartPanelSpecDTO
+ | DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesTablePanelSpecDTO
+ | DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesHistogramPanelSpecDTO
+ | DashboardtypesPanelPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesListPanelSpecDTO;
+
+export enum DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBuilderQuerySpecDTOKind {
+ 'signoz/BuilderQuery' = 'signoz/BuilderQuery',
+}
+export interface DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBuilderQuerySpecDTO {
+ /**
+ * @enum signoz/BuilderQuery
+ * @type string
+ */
+ kind: DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBuilderQuerySpecDTOKind;
+ spec: DashboardtypesBuilderQuerySpecDTO;
+}
+
+export enum DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5CompositeQueryDTOKind {
+ 'signoz/CompositeQuery' = 'signoz/CompositeQuery',
+}
+export enum Querybuildertypesv5QueryTypeDTO {
+ builder_query = 'builder_query',
+ builder_formula = 'builder_formula',
+ builder_trace_operator = 'builder_trace_operator',
+ clickhouse_sql = 'clickhouse_sql',
+ promql = 'promql',
+}
+export interface Querybuildertypesv5QueryEnvelopeBuilderTraceDTO {
+ spec?: Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5TraceAggregationDTO;
+ type?: Querybuildertypesv5QueryTypeDTO;
+}
+
+export interface Querybuildertypesv5QueryEnvelopeBuilderLogDTO {
+ spec?: Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5LogAggregationDTO;
+ type?: Querybuildertypesv5QueryTypeDTO;
+}
+
+export interface Querybuildertypesv5QueryEnvelopeBuilderMetricDTO {
+ spec?: Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5MetricAggregationDTO;
+ type?: Querybuildertypesv5QueryTypeDTO;
+}
+
+export interface Querybuildertypesv5QueryBuilderFormulaDTO {
+ /**
+ * @type boolean
+ */
+ disabled?: boolean;
+ /**
+ * @type string
+ */
+ expression?: string;
+ /**
+ * @type array
+ */
+ functions?: Querybuildertypesv5FunctionDTO[];
+ having?: Querybuildertypesv5HavingDTO;
+ /**
+ * @type string
+ */
+ legend?: string;
+ /**
+ * @type integer
+ */
+ limit?: number;
+ /**
+ * @type string
+ */
+ name?: string;
+ /**
+ * @type array
+ */
+ order?: Querybuildertypesv5OrderByDTO[];
+}
+
+export interface Querybuildertypesv5QueryEnvelopeFormulaDTO {
+ spec?: Querybuildertypesv5QueryBuilderFormulaDTO;
+ type?: Querybuildertypesv5QueryTypeDTO;
+}
+
+export interface Querybuildertypesv5QueryBuilderTraceOperatorDTO {
+ /**
+ * @type array
+ */
+ aggregations?: Querybuildertypesv5TraceAggregationDTO[];
+ /**
+ * @type string
+ */
+ cursor?: string;
+ /**
+ * @type boolean
+ */
+ disabled?: boolean;
+ /**
+ * @type string
+ */
+ expression?: string;
+ filter?: Querybuildertypesv5FilterDTO;
+ /**
+ * @type array
+ */
+ functions?: Querybuildertypesv5FunctionDTO[];
+ /**
+ * @type array
+ */
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[];
+ having?: Querybuildertypesv5HavingDTO;
+ /**
+ * @type string
+ */
+ legend?: string;
+ /**
+ * @type integer
+ */
+ limit?: number;
+ /**
+ * @type string
+ */
+ name?: string;
+ /**
+ * @type integer
+ */
+ offset?: number;
+ /**
+ * @type array
+ */
+ order?: Querybuildertypesv5OrderByDTO[];
+ /**
+ * @type string
+ */
+ returnSpansFrom?: string;
+ /**
+ * @type array
+ */
+ selectFields?: TelemetrytypesTelemetryFieldKeyDTO[];
+ stepInterval?: Querybuildertypesv5StepDTO;
+}
+
+export interface Querybuildertypesv5QueryEnvelopeTraceOperatorDTO {
+ spec?: Querybuildertypesv5QueryBuilderTraceOperatorDTO;
+ type?: Querybuildertypesv5QueryTypeDTO;
+}
+
+export interface Querybuildertypesv5PromQueryDTO {
+ /**
+ * @type boolean
+ */
+ disabled?: boolean;
+ /**
+ * @type string
+ */
+ legend?: string;
+ /**
+ * @type string
+ */
+ name?: string;
+ /**
+ * @type string
+ */
+ query?: string;
+ /**
+ * @type boolean
+ */
+ stats?: boolean;
+ step?: Querybuildertypesv5StepDTO;
+}
+
+export interface Querybuildertypesv5QueryEnvelopePromQLDTO {
+ spec?: Querybuildertypesv5PromQueryDTO;
+ type?: Querybuildertypesv5QueryTypeDTO;
+}
+
+export interface Querybuildertypesv5ClickHouseQueryDTO {
+ /**
+ * @type boolean
+ */
+ disabled?: boolean;
+ /**
+ * @type string
+ */
+ legend?: string;
+ /**
+ * @type string
+ */
+ name?: string;
+ /**
+ * @type string
+ */
+ query?: string;
+}
+
+export interface Querybuildertypesv5QueryEnvelopeClickHouseSQLDTO {
+ spec?: Querybuildertypesv5ClickHouseQueryDTO;
+ type?: Querybuildertypesv5QueryTypeDTO;
+}
+
+export type Querybuildertypesv5QueryEnvelopeDTO =
+ | (Querybuildertypesv5QueryEnvelopeBuilderTraceDTO & {
+ spec?: unknown;
+ type?: Querybuildertypesv5QueryTypeDTO;
+ })
+ | (Querybuildertypesv5QueryEnvelopeBuilderLogDTO & {
+ spec?: unknown;
+ type?: Querybuildertypesv5QueryTypeDTO;
+ })
+ | (Querybuildertypesv5QueryEnvelopeBuilderMetricDTO & {
+ spec?: unknown;
+ type?: Querybuildertypesv5QueryTypeDTO;
+ })
+ | (Querybuildertypesv5QueryEnvelopeFormulaDTO & {
+ spec?: unknown;
+ type?: Querybuildertypesv5QueryTypeDTO;
+ })
+ | (Querybuildertypesv5QueryEnvelopeTraceOperatorDTO & {
+ spec?: unknown;
+ type?: Querybuildertypesv5QueryTypeDTO;
+ })
+ | (Querybuildertypesv5QueryEnvelopePromQLDTO & {
+ spec?: unknown;
+ type?: Querybuildertypesv5QueryTypeDTO;
+ })
+ | (Querybuildertypesv5QueryEnvelopeClickHouseSQLDTO & {
+ spec?: unknown;
+ type?: Querybuildertypesv5QueryTypeDTO;
+ });
+
+/**
+ * Composite query containing one or more query envelopes. Each query envelope specifies its type and corresponding spec.
+ */
+export interface Querybuildertypesv5CompositeQueryDTO {
+ /**
+ * @type array,null
+ */
+ queries?: Querybuildertypesv5QueryEnvelopeDTO[] | null;
+}
+
+export interface DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5CompositeQueryDTO {
+ /**
+ * @enum signoz/CompositeQuery
+ * @type string
+ */
+ kind: DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5CompositeQueryDTOKind;
+ spec: Querybuildertypesv5CompositeQueryDTO;
+}
+
+export enum DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderFormulaDTOKind {
+ 'signoz/Formula' = 'signoz/Formula',
+}
+export interface DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderFormulaDTO {
+ /**
+ * @enum signoz/Formula
+ * @type string
+ */
+ kind: DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderFormulaDTOKind;
+ spec: Querybuildertypesv5QueryBuilderFormulaDTO;
+}
+
+export enum DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5PromQueryDTOKind {
+ 'signoz/PromQLQuery' = 'signoz/PromQLQuery',
+}
+export interface DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5PromQueryDTO {
+ /**
+ * @enum signoz/PromQLQuery
+ * @type string
+ */
+ kind: DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5PromQueryDTOKind;
+ spec: Querybuildertypesv5PromQueryDTO;
+}
+
+export enum DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5ClickHouseQueryDTOKind {
+ 'signoz/ClickHouseSQL' = 'signoz/ClickHouseSQL',
+}
+export interface DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5ClickHouseQueryDTO {
+ /**
+ * @enum signoz/ClickHouseSQL
+ * @type string
+ */
+ kind: DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5ClickHouseQueryDTOKind;
+ spec: Querybuildertypesv5ClickHouseQueryDTO;
+}
+
+export enum DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderTraceOperatorDTOKind {
+ 'signoz/TraceOperator' = 'signoz/TraceOperator',
+}
+export interface DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderTraceOperatorDTO {
+ /**
+ * @enum signoz/TraceOperator
+ * @type string
+ */
+ kind: DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderTraceOperatorDTOKind;
+ spec: Querybuildertypesv5QueryBuilderTraceOperatorDTO;
+}
+
+export type DashboardtypesQueryPluginDTO =
+ | DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesDashboardtypesBuilderQuerySpecDTO
+ | DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5CompositeQueryDTO
+ | DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderFormulaDTO
+ | DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5PromQueryDTO
+ | DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5ClickHouseQueryDTO
+ | DashboardtypesQueryPluginVariantGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5QueryBuilderTraceOperatorDTO;
+
+export interface DashboardtypesQuerySpecDTO {
+ /**
+ * @type string
+ */
+ name?: string;
+ plugin?: DashboardtypesQueryPluginDTO;
+}
+
+export interface DashboardtypesQueryDTO {
+ /**
+ * @type string
+ */
+ kind?: string;
+ spec?: DashboardtypesQuerySpecDTO;
+}
+
+export interface DashboardtypesPanelSpecDTO {
+ display?: V1PanelDisplayDTO;
+ /**
+ * @type array
+ */
+ links?: V1LinkDTO[];
+ plugin?: DashboardtypesPanelPluginDTO;
+ /**
+ * @type array
+ */
+ queries?: DashboardtypesQueryDTO[];
+}
+
+export interface DashboardtypesPanelDTO {
+ /**
+ * @type string
+ */
+ kind?: string;
+ spec?: DashboardtypesPanelSpecDTO;
+}
+
+export type DashboardtypesDashboardSpecDTOPanelsAnyOf = {
+ [key: string]: DashboardtypesPanelDTO;
+};
+
+/**
+ * @nullable
+ */
+export type DashboardtypesDashboardSpecDTOPanels =
+ DashboardtypesDashboardSpecDTOPanelsAnyOf | null;
+
+export enum DashboardtypesLayoutEnvelopeGithubComPersesPersesPkgModelApiV1DashboardGridLayoutSpecDTOKind {
+ Grid = 'Grid',
+}
+export interface DashboardtypesLayoutEnvelopeGithubComPersesPersesPkgModelApiV1DashboardGridLayoutSpecDTO {
+ /**
+ * @enum Grid
+ * @type string
+ */
+ kind: DashboardtypesLayoutEnvelopeGithubComPersesPersesPkgModelApiV1DashboardGridLayoutSpecDTOKind;
+ spec: DashboardGridLayoutSpecDTO;
+}
+
+export type DashboardtypesLayoutDTO =
+ DashboardtypesLayoutEnvelopeGithubComPersesPersesPkgModelApiV1DashboardGridLayoutSpecDTO;
+
+export enum DashboardtypesVariableEnvelopeGithubComSigNozSignozPkgTypesDashboardtypesListVariableSpecDTOKind {
+ ListVariable = 'ListVariable',
+}
+export interface VariableDefaultValueDTO {
+ [key: string]: unknown;
+}
+
+export enum DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesDynamicVariableSpecDTOKind {
+ 'signoz/DynamicVariable' = 'signoz/DynamicVariable',
+}
+export interface DashboardtypesDynamicVariableSpecDTO {
+ /**
+ * @type string
+ */
+ name: string;
+ signal?: TelemetrytypesSignalDTO;
+}
+
+export interface DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesDynamicVariableSpecDTO {
+ /**
+ * @enum signoz/DynamicVariable
+ * @type string
+ */
+ kind: DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesDynamicVariableSpecDTOKind;
+ spec: DashboardtypesDynamicVariableSpecDTO;
+}
+
+export enum DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesQueryVariableSpecDTOKind {
+ 'signoz/QueryVariable' = 'signoz/QueryVariable',
+}
+export interface DashboardtypesQueryVariableSpecDTO {
+ /**
+ * @type string
+ */
+ queryValue: string;
+}
+
+export interface DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesQueryVariableSpecDTO {
+ /**
+ * @enum signoz/QueryVariable
+ * @type string
+ */
+ kind: DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesQueryVariableSpecDTOKind;
+ spec: DashboardtypesQueryVariableSpecDTO;
+}
+
+export enum DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesCustomVariableSpecDTOKind {
+ 'signoz/CustomVariable' = 'signoz/CustomVariable',
+}
+export interface DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesCustomVariableSpecDTO {
+ /**
+ * @enum signoz/CustomVariable
+ * @type string
+ */
+ kind: DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesCustomVariableSpecDTOKind;
+ spec: DashboardtypesCustomVariableSpecDTO;
+}
+
+export type DashboardtypesVariablePluginDTO =
+ | DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesDynamicVariableSpecDTO
+ | DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesQueryVariableSpecDTO
+ | DashboardtypesVariablePluginVariantGithubComSigNozSignozPkgTypesDashboardtypesCustomVariableSpecDTO;
+
+export interface DashboardtypesListVariableSpecDTO {
+ /**
+ * @type boolean
+ */
+ allowAllValue?: boolean;
+ /**
+ * @type boolean
+ */
+ allowMultiple?: boolean;
+ /**
+ * @type string
+ */
+ capturingRegexp?: string;
+ /**
+ * @type string
+ */
+ customAllValue?: string;
+ defaultValue?: VariableDefaultValueDTO;
+ display?: VariableDisplayDTO;
+ /**
+ * @type string
+ */
+ name?: string;
+ plugin?: DashboardtypesVariablePluginDTO;
+ /**
+ * @type string,null
+ */
+ sort?: string | null;
+}
+
+export interface DashboardtypesVariableEnvelopeGithubComSigNozSignozPkgTypesDashboardtypesListVariableSpecDTO {
+ /**
+ * @enum ListVariable
+ * @type string
+ */
+ kind: DashboardtypesVariableEnvelopeGithubComSigNozSignozPkgTypesDashboardtypesListVariableSpecDTOKind;
+ spec: DashboardtypesListVariableSpecDTO;
+}
+
+export enum DashboardtypesVariableEnvelopeGithubComPersesPersesPkgModelApiV1DashboardTextVariableSpecDTOKind {
+ TextVariable = 'TextVariable',
+}
+export interface DashboardtypesVariableEnvelopeGithubComPersesPersesPkgModelApiV1DashboardTextVariableSpecDTO {
+ /**
+ * @enum TextVariable
+ * @type string
+ */
+ kind: DashboardtypesVariableEnvelopeGithubComPersesPersesPkgModelApiV1DashboardTextVariableSpecDTOKind;
+ spec: DashboardTextVariableSpecDTO;
+}
+
+export type DashboardtypesVariableDTO =
+ | DashboardtypesVariableEnvelopeGithubComSigNozSignozPkgTypesDashboardtypesListVariableSpecDTO
+ | DashboardtypesVariableEnvelopeGithubComPersesPersesPkgModelApiV1DashboardTextVariableSpecDTO;
+
+export interface DashboardtypesDashboardSpecDTO {
+ /**
+ * @type object
+ */
+ datasources?: DashboardtypesDashboardSpecDTODatasources;
+ display?: CommonDisplayDTO;
+ /**
+ * @type string
+ */
+ duration?: string;
+ /**
+ * @type array,null
+ */
+ layouts?: DashboardtypesLayoutDTO[] | null;
+ /**
+ * @type array
+ */
+ links?: V1LinkDTO[];
+ /**
+ * @type object,null
+ */
+ panels?: DashboardtypesDashboardSpecDTOPanels;
+ /**
+ * @type string
+ */
+ refreshInterval?: string;
+ /**
+ * @type array
+ */
+ variables?: DashboardtypesVariableDTO[];
+}
+
+export enum DashboardtypesDatasourcePluginKindDTO {
+ 'signoz/Datasource' = 'signoz/Datasource',
+}
+export interface TagtypesPostableTagDTO {
+ /**
+ * @type string
+ */
+ key: string;
+ /**
+ * @type string
+ */
+ value: string;
+}
+
+export interface DashboardtypesGettableDashboardV2DTO {
+ /**
+ * @type string
+ * @format date-time
+ */
+ createdAt?: string;
+ /**
+ * @type string
+ */
+ createdBy?: string;
+ /**
+ * @type string
+ */
+ id: string;
+ /**
+ * @type string
+ */
+ image?: string;
+ /**
+ * @type boolean
+ */
+ locked: boolean;
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type string
+ */
+ orgId: string;
+ /**
+ * @type string
+ */
+ schemaVersion: string;
+ source: DashboardtypesSourceDTO;
+ spec: DashboardtypesDashboardSpecDTO;
+ /**
+ * @type array,null
+ */
+ tags: TagtypesPostableTagDTO[] | null;
+ /**
+ * @type string
+ * @format date-time
+ */
+ updatedAt?: string;
+ /**
+ * @type string
+ */
+ updatedBy?: string;
+}
+
+export interface DashboardtypesGettablePublicDasbhboardDTO {
+ /**
+ * @type string
+ */
+ defaultTimeRange?: string;
+ /**
+ * @type string
+ */
+ publicPath?: string;
+ /**
+ * @type boolean
+ */
+ timeRangeEnabled?: boolean;
+}
+
+export interface DashboardtypesGettablePublicDashboardDataDTO {
+ dashboard?: DashboardtypesDashboardDTO;
+ publicDashboard?: DashboardtypesGettablePublicDasbhboardDTO;
+}
+
+export enum DashboardtypesPanelPluginKindDTO {
+ 'signoz/TimeSeriesPanel' = 'signoz/TimeSeriesPanel',
+ 'signoz/BarChartPanel' = 'signoz/BarChartPanel',
+ 'signoz/NumberPanel' = 'signoz/NumberPanel',
+ 'signoz/PieChartPanel' = 'signoz/PieChartPanel',
+ 'signoz/TablePanel' = 'signoz/TablePanel',
+ 'signoz/HistogramPanel' = 'signoz/HistogramPanel',
+ 'signoz/ListPanel' = 'signoz/ListPanel',
+}
+export interface DashboardtypesPostableDashboardV2DTO {
+ /**
+ * @type boolean
+ */
+ generateName?: boolean;
+ /**
+ * @type string
+ */
+ image?: string;
+ /**
+ * @type string
+ */
+ name?: string;
+ /**
+ * @type string
+ */
+ schemaVersion: string;
+ spec: DashboardtypesDashboardSpecDTO;
+ /**
+ * @type array,null
+ */
+ tags: TagtypesPostableTagDTO[] | null;
+}
+
+export interface DashboardtypesPostablePublicDashboardDTO {
+ /**
+ * @type string
+ */
+ defaultTimeRange?: string;
+ /**
+ * @type boolean
+ */
+ timeRangeEnabled?: boolean;
+}
+
+export enum DashboardtypesQueryPluginKindDTO {
+ 'signoz/BuilderQuery' = 'signoz/BuilderQuery',
+ 'signoz/CompositeQuery' = 'signoz/CompositeQuery',
+ 'signoz/Formula' = 'signoz/Formula',
+ 'signoz/PromQLQuery' = 'signoz/PromQLQuery',
+ 'signoz/ClickHouseSQL' = 'signoz/ClickHouseSQL',
+ 'signoz/TraceOperator' = 'signoz/TraceOperator',
+}
+export interface DashboardtypesUpdatablePublicDashboardDTO {
+ /**
+ * @type string
+ */
+ defaultTimeRange?: string;
+ /**
+ * @type boolean
+ */
+ timeRangeEnabled?: boolean;
+}
+
+export enum DashboardtypesVariablePluginKindDTO {
+ 'signoz/DynamicVariable' = 'signoz/DynamicVariable',
+ 'signoz/QueryVariable' = 'signoz/QueryVariable',
+ 'signoz/CustomVariable' = 'signoz/CustomVariable',
+}
+export type FactoryResponseDTOServicesAnyOf = { [key: string]: string[] };
+
+/**
+ * @nullable
+ */
+export type FactoryResponseDTOServices = FactoryResponseDTOServicesAnyOf | null;
+
+export interface FactoryResponseDTO {
+ /**
+ * @type boolean
+ */
+ healthy?: boolean;
+ /**
+ * @type object,null
+ */
+ services?: FactoryResponseDTOServices;
+}
+
+export type FeaturetypesGettableFeatureDTOVariantsAnyOf = {
+ [key: string]: unknown;
+};
+
+/**
+ * @nullable
+ */
+export type FeaturetypesGettableFeatureDTOVariants =
+ FeaturetypesGettableFeatureDTOVariantsAnyOf | null;
+
+export interface FeaturetypesGettableFeatureDTO {
+ /**
+ * @type string
+ */
+ defaultVariant?: string;
+ /**
+ * @type string
+ */
+ description?: string;
+ /**
+ * @type string
+ */
+ kind?: string;
+ /**
+ * @type string
+ */
+ name?: string;
+ resolvedValue?: unknown;
+ /**
+ * @type string
+ */
+ stage?: string;
+ /**
+ * @type object,null
+ */
+ variants?: FeaturetypesGettableFeatureDTOVariants;
+}
+
+export interface GatewaytypesGettableCreatedIngestionKeyDTO {
+ /**
+ * @type string
+ */
+ id: string;
+ /**
+ * @type string
+ */
+ value: string;
+}
+
+export interface GatewaytypesGettableCreatedIngestionKeyLimitDTO {
+ /**
+ * @type string
+ */
+ id: string;
+}
+
+export interface GatewaytypesPaginationDTO {
+ /**
+ * @type integer
+ */
+ page?: number;
+ /**
+ * @type integer
+ */
+ pages?: number;
+ /**
+ * @type integer
+ */
+ per_page?: number;
+ /**
+ * @type integer
+ */
+ total?: number;
+}
+
+export interface GatewaytypesLimitValueDTO {
+ /**
+ * @type integer,null
+ */
+ count?: number | null;
+ /**
+ * @type integer,null
+ */
+ size?: number | null;
+}
+
+export interface GatewaytypesLimitConfigDTO {
+ day?: GatewaytypesLimitValueDTO;
+ second?: GatewaytypesLimitValueDTO;
+}
+
+export interface GatewaytypesLimitMetricValueDTO {
+ /**
+ * @type integer
+ * @format int64
+ */
+ count?: number;
+ /**
+ * @type integer
+ * @format int64
+ */
+ size?: number;
+}
+
+export interface GatewaytypesLimitMetricDTO {
+ day?: GatewaytypesLimitMetricValueDTO;
+ second?: GatewaytypesLimitMetricValueDTO;
+}
+
+export interface GatewaytypesLimitDTO {
+ config?: GatewaytypesLimitConfigDTO;
+ /**
+ * @type string
+ * @format date-time
+ */
+ created_at?: string;
+ /**
+ * @type string
+ */
+ id?: string;
+ /**
+ * @type string
+ */
+ key_id?: string;
+ metric?: GatewaytypesLimitMetricDTO;
+ /**
+ * @type string
+ */
+ signal?: string;
+ /**
+ * @type array,null
+ */
+ tags?: string[] | null;
+ /**
+ * @type string
+ * @format date-time
+ */
+ updated_at?: string;
+}
+
+export interface GatewaytypesIngestionKeyDTO {
+ /**
+ * @type string
+ * @format date-time
+ */
+ created_at?: string;
+ /**
+ * @type string
+ * @format date-time
*/
- podCPU: number;
+ expires_at?: string;
/**
- * @type number
- * @format double
+ * @type string
*/
- podCPULimit: number;
+ id?: string;
/**
- * @type number
- * @format double
+ * @type array,null
*/
- podCPURequest: number;
- podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
+ limits?: GatewaytypesLimitDTO[] | null;
/**
- * @type number
- * @format double
+ * @type string
*/
- podMemory: number;
+ name?: string;
/**
- * @type number
- * @format double
+ * @type array,null
*/
- podMemoryLimit: number;
+ tags?: string[] | null;
/**
- * @type number
- * @format double
+ * @type string
+ * @format date-time
*/
- podMemoryRequest: number;
- podPhase: InframonitoringtypesPodPhaseDTO;
+ updated_at?: string;
/**
* @type string
*/
- podUID: string;
+ value?: string;
+ /**
+ * @type string
+ */
+ workspace_id?: string;
}
-export interface InframonitoringtypesPodsDTO {
+export interface GatewaytypesGettableIngestionKeysDTO {
+ _pagination?: GatewaytypesPaginationDTO;
/**
- * @type boolean
+ * @type array,null
*/
- endTimeBeforeRetention: boolean;
+ keys?: GatewaytypesIngestionKeyDTO[] | null;
+}
+
+export interface GatewaytypesPostableIngestionKeyDTO {
/**
- * @type array
+ * @type string
+ * @format date-time
*/
- records: InframonitoringtypesPodRecordDTO[];
- requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
+ expires_at?: string;
/**
- * @type integer
+ * @type string
*/
- total: number;
- type: InframonitoringtypesResponseTypeDTO;
- warning?: Querybuildertypesv5QueryWarnDataDTO;
+ name: string;
+ /**
+ * @type array,null
+ */
+ tags?: string[] | null;
}
-export interface Querybuildertypesv5FilterDTO {
+export interface GatewaytypesPostableIngestionKeyLimitDTO {
+ config?: GatewaytypesLimitConfigDTO;
/**
* @type string
*/
- expression?: string;
+ signal?: string;
+ /**
+ * @type array,null
+ */
+ tags?: string[] | null;
}
-export enum TelemetrytypesFieldContextDTO {
- metric = 'metric',
- log = 'log',
- span = 'span',
- resource = 'resource',
- attribute = 'attribute',
- body = 'body',
-}
-export enum TelemetrytypesFieldDataTypeDTO {
- string = 'string',
- bool = 'bool',
- float64 = 'float64',
- int64 = 'int64',
- number = 'number',
-}
-export enum TelemetrytypesSignalDTO {
- traces = 'traces',
- logs = 'logs',
- metrics = 'metrics',
+export interface GatewaytypesUpdatableIngestionKeyLimitDTO {
+ config: GatewaytypesLimitConfigDTO;
+ /**
+ * @type array,null
+ */
+ tags?: string[] | null;
}
-export interface Querybuildertypesv5GroupByKeyDTO {
+
+export interface GlobaltypesAPIKeyConfigDTO {
/**
- * @type string
+ * @type boolean
*/
- description?: string;
- fieldContext?: TelemetrytypesFieldContextDTO;
- fieldDataType?: TelemetrytypesFieldDataTypeDTO;
+ enabled?: boolean;
+}
+
+export interface GlobaltypesImpersonationConfigDTO {
/**
- * @type string
+ * @type boolean
*/
- name: string;
- signal?: TelemetrytypesSignalDTO;
+ enabled?: boolean;
+}
+
+export interface GlobaltypesTokenizerConfigDTO {
/**
- * @type string
+ * @type boolean
*/
- unit?: string;
+ enabled?: boolean;
}
-export enum Querybuildertypesv5OrderDirectionDTO {
- asc = 'asc',
- desc = 'desc',
+export interface GlobaltypesIdentNConfigDTO {
+ apikey?: GlobaltypesAPIKeyConfigDTO;
+ impersonation?: GlobaltypesImpersonationConfigDTO;
+ tokenizer?: GlobaltypesTokenizerConfigDTO;
}
-export interface Querybuildertypesv5OrderByKeyDTO {
+
+export interface GlobaltypesConfigDTO {
/**
- * @type string
+ * @type string,null
*/
- description?: string;
- fieldContext?: TelemetrytypesFieldContextDTO;
- fieldDataType?: TelemetrytypesFieldDataTypeDTO;
+ ai_assistant_url: string | null;
/**
* @type string
*/
- name: string;
- signal?: TelemetrytypesSignalDTO;
+ external_url: string;
+ identN?: GlobaltypesIdentNConfigDTO;
/**
* @type string
*/
- unit?: string;
+ ingestion_url: string;
+ /**
+ * @type string,null
+ */
+ mcp_url: string | null;
}
-export interface Querybuildertypesv5OrderByDTO {
- direction?: Querybuildertypesv5OrderDirectionDTO;
- key?: Querybuildertypesv5OrderByKeyDTO;
+export type InframonitoringtypesClusterRecordDTOMetaAnyOf = {
+ [key: string]: string;
+};
+
+/**
+ * @nullable
+ */
+export type InframonitoringtypesClusterRecordDTOMeta =
+ InframonitoringtypesClusterRecordDTOMetaAnyOf | null;
+
+export interface InframonitoringtypesNodeCountsByReadinessDTO {
+ /**
+ * @type integer
+ */
+ notReady: number;
+ /**
+ * @type integer
+ */
+ ready: number;
}
-export interface InframonitoringtypesPostableClustersDTO {
+export interface InframonitoringtypesPodCountsByPhaseDTO {
/**
* @type integer
- * @format int64
*/
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
+ failed: number;
/**
- * @type array,null
+ * @type integer
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+ pending: number;
/**
* @type integer
*/
- limit: number;
+ running: number;
/**
* @type integer
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ succeeded: number;
/**
* @type integer
- * @format int64
*/
- start: number;
+ unknown: number;
}
-export interface InframonitoringtypesPostableDaemonSetsDTO {
+export interface InframonitoringtypesClusterRecordDTO {
/**
- * @type integer
- * @format int64
+ * @type number
+ * @format double
*/
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
+ clusterCPU: number;
+ /**
+ * @type number
+ * @format double
+ */
+ clusterCPUAllocatable: number;
+ /**
+ * @type number
+ * @format double
+ */
+ clusterMemory: number;
+ /**
+ * @type number
+ * @format double
+ */
+ clusterMemoryAllocatable: number;
+ /**
+ * @type string
+ */
+ clusterName: string;
+ /**
+ * @type object,null
+ */
+ meta: InframonitoringtypesClusterRecordDTOMeta;
+ nodeCountsByReadiness: InframonitoringtypesNodeCountsByReadinessDTO;
+ podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
+}
+
+export interface InframonitoringtypesRequiredMetricsCheckDTO {
/**
* @type array,null
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+ missingMetrics: string[] | null;
+}
+
+export enum InframonitoringtypesResponseTypeDTO {
+ list = 'list',
+ grouped_list = 'grouped_list',
+}
+export interface Querybuildertypesv5QueryWarnDataAdditionalDTO {
/**
- * @type integer
+ * @type string
+ */
+ message?: string;
+}
+
+export interface Querybuildertypesv5QueryWarnDataDTO {
+ /**
+ * @type string
+ */
+ message?: string;
+ /**
+ * @type string
+ */
+ url?: string;
+ /**
+ * @type array
+ */
+ warnings?: Querybuildertypesv5QueryWarnDataAdditionalDTO[];
+}
+
+export interface InframonitoringtypesClustersDTO {
+ /**
+ * @type boolean
*/
- limit: number;
+ endTimeBeforeRetention: boolean;
/**
- * @type integer
+ * @type array
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ records: InframonitoringtypesClusterRecordDTO[];
+ requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
* @type integer
- * @format int64
*/
- start: number;
+ total: number;
+ type: InframonitoringtypesResponseTypeDTO;
+ warning?: Querybuildertypesv5QueryWarnDataDTO;
}
-export interface InframonitoringtypesPostableDeploymentsDTO {
+export type InframonitoringtypesDaemonSetRecordDTOMetaAnyOf = {
+ [key: string]: string;
+};
+
+/**
+ * @nullable
+ */
+export type InframonitoringtypesDaemonSetRecordDTOMeta =
+ InframonitoringtypesDaemonSetRecordDTOMetaAnyOf | null;
+
+export interface InframonitoringtypesDaemonSetRecordDTO {
/**
* @type integer
- * @format int64
*/
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
+ currentNodes: number;
/**
- * @type array,null
+ * @type number
+ * @format double
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+ daemonSetCPU: number;
/**
- * @type integer
+ * @type number
+ * @format double
*/
- limit: number;
+ daemonSetCPULimit: number;
/**
- * @type integer
+ * @type number
+ * @format double
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ daemonSetCPURequest: number;
/**
- * @type integer
- * @format int64
+ * @type number
+ * @format double
*/
- start: number;
-}
-
-export interface InframonitoringtypesPostableHostsDTO {
+ daemonSetMemory: number;
/**
- * @type integer
- * @format int64
+ * @type number
+ * @format double
*/
- end: number;
- filter?: InframonitoringtypesHostFilterDTO;
+ daemonSetMemoryLimit: number;
/**
- * @type array,null
+ * @type number
+ * @format double
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+ daemonSetMemoryRequest: number;
/**
- * @type integer
+ * @type string
*/
- limit: number;
+ daemonSetName: string;
/**
* @type integer
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ desiredNodes: number;
/**
- * @type integer
- * @format int64
+ * @type object,null
*/
- start: number;
+ meta: InframonitoringtypesDaemonSetRecordDTOMeta;
+ podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
}
-export interface InframonitoringtypesPostableJobsDTO {
- /**
- * @type integer
- * @format int64
- */
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
- /**
- * @type array,null
- */
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+export interface InframonitoringtypesDaemonSetsDTO {
/**
- * @type integer
+ * @type boolean
*/
- limit: number;
+ endTimeBeforeRetention: boolean;
/**
- * @type integer
+ * @type array
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ records: InframonitoringtypesDaemonSetRecordDTO[];
+ requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
* @type integer
- * @format int64
*/
- start: number;
+ total: number;
+ type: InframonitoringtypesResponseTypeDTO;
+ warning?: Querybuildertypesv5QueryWarnDataDTO;
}
-export interface InframonitoringtypesPostableNamespacesDTO {
+export type InframonitoringtypesDeploymentRecordDTOMetaAnyOf = {
+ [key: string]: string;
+};
+
+/**
+ * @nullable
+ */
+export type InframonitoringtypesDeploymentRecordDTOMeta =
+ InframonitoringtypesDeploymentRecordDTOMetaAnyOf | null;
+
+export interface InframonitoringtypesDeploymentRecordDTO {
/**
* @type integer
- * @format int64
*/
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
+ availablePods: number;
/**
- * @type array,null
+ * @type number
+ * @format double
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+ deploymentCPU: number;
/**
- * @type integer
+ * @type number
+ * @format double
*/
- limit: number;
+ deploymentCPULimit: number;
/**
- * @type integer
+ * @type number
+ * @format double
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ deploymentCPURequest: number;
/**
- * @type integer
- * @format int64
+ * @type number
+ * @format double
*/
- start: number;
-}
-
-export interface InframonitoringtypesPostableNodesDTO {
+ deploymentMemory: number;
/**
- * @type integer
- * @format int64
+ * @type number
+ * @format double
*/
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
+ deploymentMemoryLimit: number;
/**
- * @type array,null
+ * @type number
+ * @format double
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+ deploymentMemoryRequest: number;
/**
- * @type integer
+ * @type string
*/
- limit: number;
+ deploymentName: string;
/**
* @type integer
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ desiredPods: number;
/**
- * @type integer
- * @format int64
+ * @type object,null
*/
- start: number;
+ meta: InframonitoringtypesDeploymentRecordDTOMeta;
+ podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
}
-export interface InframonitoringtypesPostablePodsDTO {
- /**
- * @type integer
- * @format int64
- */
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
+export interface InframonitoringtypesDeploymentsDTO {
/**
- * @type array,null
+ * @type boolean
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+ endTimeBeforeRetention: boolean;
/**
- * @type integer
+ * @type array
*/
- limit: number;
+ records: InframonitoringtypesDeploymentRecordDTO[];
+ requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
* @type integer
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ total: number;
+ type: InframonitoringtypesResponseTypeDTO;
+ warning?: Querybuildertypesv5QueryWarnDataDTO;
+}
+
+export enum InframonitoringtypesHostStatusDTO {
+ active = 'active',
+ inactive = 'inactive',
+ '' = '',
+}
+export interface InframonitoringtypesHostFilterDTO {
/**
- * @type integer
- * @format int64
+ * @type string
*/
- start: number;
+ expression?: string;
+ filterByStatus?: InframonitoringtypesHostStatusDTO;
}
-export interface InframonitoringtypesPostableStatefulSetsDTO {
+export type InframonitoringtypesHostRecordDTOMetaAnyOf = {
+ [key: string]: string;
+};
+
+/**
+ * @nullable
+ */
+export type InframonitoringtypesHostRecordDTOMeta =
+ InframonitoringtypesHostRecordDTOMetaAnyOf | null;
+
+export interface InframonitoringtypesHostRecordDTO {
/**
* @type integer
- * @format int64
*/
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
+ activeHostCount: number;
/**
- * @type array,null
+ * @type number
+ * @format double
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+ cpu: number;
/**
- * @type integer
+ * @type number
+ * @format double
*/
- limit: number;
+ diskUsage: number;
/**
- * @type integer
+ * @type string
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ hostName: string;
/**
* @type integer
- * @format int64
*/
- start: number;
-}
-
-export interface InframonitoringtypesPostableVolumesDTO {
+ inactiveHostCount: number;
/**
- * @type integer
- * @format int64
+ * @type number
+ * @format double
+ */
+ load15: number;
+ /**
+ * @type number
+ * @format double
+ */
+ memory: number;
+ /**
+ * @type object,null
*/
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
+ meta: InframonitoringtypesHostRecordDTOMeta;
+ status: InframonitoringtypesHostStatusDTO;
/**
- * @type array,null
+ * @type number
+ * @format double
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
+ wait: number;
+}
+
+export interface InframonitoringtypesHostsDTO {
/**
- * @type integer
+ * @type boolean
*/
- limit: number;
+ endTimeBeforeRetention: boolean;
/**
- * @type integer
+ * @type array
*/
- offset?: number;
- orderBy?: Querybuildertypesv5OrderByDTO;
+ records: InframonitoringtypesHostRecordDTO[];
+ requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
* @type integer
- * @format int64
*/
- start: number;
+ total: number;
+ type: InframonitoringtypesResponseTypeDTO;
+ warning?: Querybuildertypesv5QueryWarnDataDTO;
}
-export type InframonitoringtypesStatefulSetRecordDTOMetaAnyOf = {
+export type InframonitoringtypesJobRecordDTOMetaAnyOf = {
[key: string]: string;
};
/**
* @nullable
*/
-export type InframonitoringtypesStatefulSetRecordDTOMeta =
- InframonitoringtypesStatefulSetRecordDTOMetaAnyOf | null;
+export type InframonitoringtypesJobRecordDTOMeta =
+ InframonitoringtypesJobRecordDTOMetaAnyOf | null;
-export interface InframonitoringtypesStatefulSetRecordDTO {
+export interface InframonitoringtypesJobRecordDTO {
/**
* @type integer
*/
- currentPods: number;
+ activePods: number;
/**
* @type integer
*/
- desiredPods: number;
+ desiredSuccessfulPods: number;
/**
- * @type object,null
+ * @type integer
*/
- meta: InframonitoringtypesStatefulSetRecordDTOMeta;
- podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
+ failedPods: number;
/**
* @type number
* @format double
*/
- statefulSetCPU: number;
+ jobCPU: number;
/**
* @type number
* @format double
*/
- statefulSetCPULimit: number;
+ jobCPULimit: number;
/**
* @type number
* @format double
*/
- statefulSetCPURequest: number;
+ jobCPURequest: number;
/**
* @type number
* @format double
*/
- statefulSetMemory: number;
+ jobMemory: number;
/**
* @type number
* @format double
*/
- statefulSetMemoryLimit: number;
+ jobMemoryLimit: number;
/**
* @type number
* @format double
*/
- statefulSetMemoryRequest: number;
+ jobMemoryRequest: number;
/**
* @type string
*/
- statefulSetName: string;
+ jobName: string;
+ /**
+ * @type object,null
+ */
+ meta: InframonitoringtypesJobRecordDTOMeta;
+ podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
+ /**
+ * @type integer
+ */
+ successfulPods: number;
}
-export interface InframonitoringtypesStatefulSetsDTO {
+export interface InframonitoringtypesJobsDTO {
/**
* @type boolean
*/
@@ -4447,7 +5441,7 @@ export interface InframonitoringtypesStatefulSetsDTO {
/**
* @type array
*/
- records: InframonitoringtypesStatefulSetRecordDTO[];
+ records: InframonitoringtypesJobRecordDTO[];
requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
* @type integer
@@ -4457,58 +5451,39 @@ export interface InframonitoringtypesStatefulSetsDTO {
warning?: Querybuildertypesv5QueryWarnDataDTO;
}
-export type InframonitoringtypesVolumeRecordDTOMetaAnyOf = {
+export type InframonitoringtypesNamespaceRecordDTOMetaAnyOf = {
[key: string]: string;
};
/**
* @nullable
*/
-export type InframonitoringtypesVolumeRecordDTOMeta =
- InframonitoringtypesVolumeRecordDTOMetaAnyOf | null;
+export type InframonitoringtypesNamespaceRecordDTOMeta =
+ InframonitoringtypesNamespaceRecordDTOMetaAnyOf | null;
-export interface InframonitoringtypesVolumeRecordDTO {
+export interface InframonitoringtypesNamespaceRecordDTO {
/**
* @type object,null
*/
- meta: InframonitoringtypesVolumeRecordDTOMeta;
- /**
- * @type string
- */
- persistentVolumeClaimName: string;
- /**
- * @type number
- * @format double
- */
- volumeAvailable: number;
- /**
- * @type number
- * @format double
- */
- volumeCapacity: number;
- /**
- * @type number
- * @format double
- */
- volumeInodes: number;
+ meta: InframonitoringtypesNamespaceRecordDTOMeta;
/**
* @type number
* @format double
*/
- volumeInodesFree: number;
+ namespaceCPU: number;
/**
* @type number
* @format double
*/
- volumeInodesUsed: number;
+ namespaceMemory: number;
/**
- * @type number
- * @format double
+ * @type string
*/
- volumeUsage: number;
+ namespaceName: string;
+ podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
}
-export interface InframonitoringtypesVolumesDTO {
+export interface InframonitoringtypesNamespacesDTO {
/**
* @type boolean
*/
@@ -4516,7 +5491,7 @@ export interface InframonitoringtypesVolumesDTO {
/**
* @type array
*/
- records: InframonitoringtypesVolumeRecordDTO[];
+ records: InframonitoringtypesNamespaceRecordDTO[];
requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
* @type integer
@@ -4526,164 +5501,185 @@ export interface InframonitoringtypesVolumesDTO {
warning?: Querybuildertypesv5QueryWarnDataDTO;
}
+export enum InframonitoringtypesNodeConditionDTO {
+ ready = 'ready',
+ not_ready = 'not_ready',
+ no_data = 'no_data',
+}
+export type InframonitoringtypesNodeRecordDTOMetaAnyOf = {
+ [key: string]: string;
+};
+
/**
* @nullable
*/
-export type LlmpricingruletypesStringSliceDTO = string[] | null;
+export type InframonitoringtypesNodeRecordDTOMeta =
+ InframonitoringtypesNodeRecordDTOMetaAnyOf | null;
-export enum LlmpricingruletypesLLMPricingRuleCacheModeDTO {
- subtract = 'subtract',
- additive = 'additive',
- unknown = 'unknown',
-}
-export interface LlmpricingruletypesLLMPricingCacheCostsDTO {
- mode: LlmpricingruletypesLLMPricingRuleCacheModeDTO;
+export interface InframonitoringtypesNodeRecordDTO {
+ condition: InframonitoringtypesNodeConditionDTO;
/**
- * @type number
- * @format double
+ * @type object,null
*/
- read?: number;
+ meta: InframonitoringtypesNodeRecordDTOMeta;
/**
* @type number
* @format double
*/
- write?: number;
-}
-
-export interface LlmpricingruletypesLLMRulePricingDTO {
- cache?: LlmpricingruletypesLLMPricingCacheCostsDTO;
+ nodeCPU: number;
/**
* @type number
* @format double
*/
- input: number;
+ nodeCPUAllocatable: number;
+ nodeCountsByReadiness: InframonitoringtypesNodeCountsByReadinessDTO;
/**
* @type number
* @format double
*/
- output: number;
-}
-
-export enum LlmpricingruletypesLLMPricingRuleUnitDTO {
- per_million_tokens = 'per_million_tokens',
-}
-export interface LlmpricingruletypesLLMPricingRuleDTO {
- /**
- * @type string
- * @format date-time
- */
- createdAt?: string;
- /**
- * @type string
- */
- createdBy?: string;
+ nodeMemory: number;
/**
- * @type boolean
+ * @type number
+ * @format double
*/
- enabled: boolean;
+ nodeMemoryAllocatable: number;
/**
* @type string
*/
- id: string;
+ nodeName: string;
+ podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
+}
+
+export interface InframonitoringtypesNodesDTO {
/**
* @type boolean
*/
- isOverride: boolean;
+ endTimeBeforeRetention: boolean;
/**
- * @type string
+ * @type array
*/
- modelName: string;
- modelPattern: LlmpricingruletypesStringSliceDTO | null;
+ records: InframonitoringtypesNodeRecordDTO[];
+ requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
- * @type string
+ * @type integer
*/
- orgId: string;
- pricing: LlmpricingruletypesLLMRulePricingDTO;
+ total: number;
+ type: InframonitoringtypesResponseTypeDTO;
+ warning?: Querybuildertypesv5QueryWarnDataDTO;
+}
+
+export enum InframonitoringtypesPodPhaseDTO {
+ pending = 'pending',
+ running = 'running',
+ succeeded = 'succeeded',
+ failed = 'failed',
+ unknown = 'unknown',
+ no_data = 'no_data',
+}
+export type InframonitoringtypesPodRecordDTOMetaAnyOf = {
+ [key: string]: string;
+};
+
+/**
+ * @nullable
+ */
+export type InframonitoringtypesPodRecordDTOMeta =
+ InframonitoringtypesPodRecordDTOMetaAnyOf | null;
+
+export interface InframonitoringtypesPodRecordDTO {
/**
- * @type string
+ * @type object,null
*/
- provider: string;
+ meta: InframonitoringtypesPodRecordDTOMeta;
/**
- * @type string
+ * @type integer
+ * @format int64
*/
- sourceId?: string;
+ podAge: number;
/**
- * @type string,null
- * @format date-time
+ * @type number
+ * @format double
*/
- syncedAt?: string | null;
- unit: LlmpricingruletypesLLMPricingRuleUnitDTO;
+ podCPU: number;
/**
- * @type string
- * @format date-time
+ * @type number
+ * @format double
*/
- updatedAt?: string;
+ podCPULimit: number;
/**
- * @type string
+ * @type number
+ * @format double
*/
- updatedBy?: string;
-}
-
-export interface LlmpricingruletypesGettablePricingRulesDTO {
+ podCPURequest: number;
+ podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
/**
- * @type array,null
+ * @type number
+ * @format double
*/
- items: LlmpricingruletypesLLMPricingRuleDTO[] | null;
+ podMemory: number;
/**
- * @type integer
+ * @type number
+ * @format double
*/
- limit: number;
+ podMemoryLimit: number;
/**
- * @type integer
+ * @type number
+ * @format double
*/
- offset: number;
+ podMemoryRequest: number;
+ podPhase: InframonitoringtypesPodPhaseDTO;
/**
- * @type integer
+ * @type string
*/
- total: number;
+ podUID: string;
}
-export interface LlmpricingruletypesUpdatableLLMPricingRuleDTO {
+export interface InframonitoringtypesPodsDTO {
/**
* @type boolean
*/
- enabled: boolean;
+ endTimeBeforeRetention: boolean;
/**
- * @type string,null
+ * @type array
*/
- id?: string | null;
+ records: InframonitoringtypesPodRecordDTO[];
+ requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
- * @type boolean,null
+ * @type integer
*/
- isOverride?: boolean | null;
+ total: number;
+ type: InframonitoringtypesResponseTypeDTO;
+ warning?: Querybuildertypesv5QueryWarnDataDTO;
+}
+
+export interface InframonitoringtypesPostableClustersDTO {
/**
- * @type string
+ * @type integer
+ * @format int64
*/
- modelName: string;
+ end: number;
+ filter?: Querybuildertypesv5FilterDTO;
/**
* @type array,null
*/
- modelPattern: string[] | null;
- pricing: LlmpricingruletypesLLMRulePricingDTO;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
- * @type string
+ * @type integer
*/
- provider: string;
+ limit: number;
/**
- * @type string,null
+ * @type integer
*/
- sourceId?: string | null;
- unit: LlmpricingruletypesLLMPricingRuleUnitDTO;
-}
-
-export interface LlmpricingruletypesUpdatableLLMPricingRulesDTO {
+ offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
/**
- * @type array,null
+ * @type integer
+ * @format int64
*/
- rules: LlmpricingruletypesUpdatableLLMPricingRuleDTO[] | null;
+ start: number;
}
-export interface MetricsexplorertypesInspectMetricsRequestDTO {
+export interface InframonitoringtypesPostableDaemonSetsDTO {
/**
* @type integer
* @format int64
@@ -4691,279 +5687,225 @@ export interface MetricsexplorertypesInspectMetricsRequestDTO {
end: number;
filter?: Querybuildertypesv5FilterDTO;
/**
- * @type string
+ * @type array,null
*/
- metricName: string;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
* @type integer
- * @format int64
- */
- start: number;
-}
-
-export interface TelemetrytypesTelemetryFieldKeyDTO {
- /**
- * @type string
- */
- description?: string;
- fieldContext?: TelemetrytypesFieldContextDTO;
- fieldDataType?: TelemetrytypesFieldDataTypeDTO;
- /**
- * @type string
*/
- name: string;
- signal?: TelemetrytypesSignalDTO;
+ limit: number;
/**
- * @type string
+ * @type integer
*/
- unit?: string;
-}
-
-export interface Querybuildertypesv5LabelDTO {
- key?: TelemetrytypesTelemetryFieldKeyDTO;
- value?: unknown;
-}
-
-export interface Querybuildertypesv5BucketDTO {
+ offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
/**
- * @type number
- * @format double
+ * @type integer
+ * @format int64
*/
- step?: number;
+ start: number;
}
-export interface Querybuildertypesv5TimeSeriesValueDTO {
- bucket?: Querybuildertypesv5BucketDTO;
- /**
- * @type boolean
- */
- partial?: boolean;
+export interface InframonitoringtypesPostableDeploymentsDTO {
/**
* @type integer
* @format int64
*/
- timestamp?: number;
- /**
- * @type number
- * @format double
- */
- value?: number;
+ end: number;
+ filter?: Querybuildertypesv5FilterDTO;
/**
- * @type array
+ * @type array,null
*/
- values?: number[];
-}
-
-export interface Querybuildertypesv5TimeSeriesDTO {
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
- * @type array
+ * @type integer
*/
- labels?: Querybuildertypesv5LabelDTO[];
+ limit: number;
/**
- * @type array,null
+ * @type integer
*/
- values?: Querybuildertypesv5TimeSeriesValueDTO[] | null;
-}
-
-export interface MetricsexplorertypesInspectMetricsResponseDTO {
+ offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
/**
- * @type array,null
+ * @type integer
+ * @format int64
*/
- series: Querybuildertypesv5TimeSeriesDTO[] | null;
+ start: number;
}
-export enum MetrictypesTemporalityDTO {
- delta = 'delta',
- cumulative = 'cumulative',
- unspecified = 'unspecified',
-}
-export enum MetrictypesTypeDTO {
- gauge = 'gauge',
- sum = 'sum',
- histogram = 'histogram',
- summary = 'summary',
- exponentialhistogram = 'exponentialhistogram',
-}
-export interface MetricsexplorertypesListMetricDTO {
+export interface InframonitoringtypesPostableHostsDTO {
/**
- * @type string
+ * @type integer
+ * @format int64
*/
- description: string;
+ end: number;
+ filter?: InframonitoringtypesHostFilterDTO;
/**
- * @type boolean
+ * @type array,null
*/
- isMonotonic: boolean;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
- * @type string
+ * @type integer
*/
- metricName: string;
- temporality: MetrictypesTemporalityDTO;
- type: MetrictypesTypeDTO;
+ limit: number;
/**
- * @type string
+ * @type integer
*/
- unit: string;
-}
-
-export interface MetricsexplorertypesListMetricsResponseDTO {
+ offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
/**
- * @type array,null
+ * @type integer
+ * @format int64
*/
- metrics: MetricsexplorertypesListMetricDTO[] | null;
+ start: number;
}
-export interface MetricsexplorertypesMetricAlertDTO {
- /**
- * @type string
- */
- alertId: string;
+export interface InframonitoringtypesPostableJobsDTO {
/**
- * @type string
+ * @type integer
+ * @format int64
*/
- alertName: string;
-}
-
-export interface MetricsexplorertypesMetricAlertsResponseDTO {
+ end: number;
+ filter?: Querybuildertypesv5FilterDTO;
/**
* @type array,null
*/
- alerts: MetricsexplorertypesMetricAlertDTO[] | null;
-}
-
-export interface MetricsexplorertypesMetricAttributeDTO {
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
- * @type string
+ * @type integer
*/
- key: string;
+ limit: number;
/**
* @type integer
- * @minimum 0
*/
- valueCount: number;
+ offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
/**
- * @type array,null
+ * @type integer
+ * @format int64
*/
- values: string[] | null;
+ start: number;
}
-export interface MetricsexplorertypesMetricAttributesResponseDTO {
- /**
- * @type array,null
- */
- attributes: MetricsexplorertypesMetricAttributeDTO[] | null;
+export interface InframonitoringtypesPostableNamespacesDTO {
/**
* @type integer
* @format int64
*/
- totalKeys: number;
-}
-
-export interface MetricsexplorertypesMetricDashboardDTO {
+ end: number;
+ filter?: Querybuildertypesv5FilterDTO;
/**
- * @type string
+ * @type array,null
*/
- dashboardId: string;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
- * @type string
+ * @type integer
*/
- dashboardName: string;
+ limit: number;
/**
- * @type string
+ * @type integer
*/
- widgetId: string;
+ offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
/**
- * @type string
+ * @type integer
+ * @format int64
*/
- widgetName: string;
+ start: number;
}
-export interface MetricsexplorertypesMetricDashboardsResponseDTO {
+export interface InframonitoringtypesPostableNodesDTO {
/**
- * @type array,null
+ * @type integer
+ * @format int64
*/
- dashboards: MetricsexplorertypesMetricDashboardDTO[] | null;
-}
-
-export interface MetricsexplorertypesMetricHighlightsResponseDTO {
+ end: number;
+ filter?: Querybuildertypesv5FilterDTO;
/**
- * @type integer
- * @minimum 0
+ * @type array,null
*/
- activeTimeSeries: number;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
* @type integer
- * @minimum 0
*/
- dataPoints: number;
+ limit: number;
/**
* @type integer
- * @minimum 0
*/
- lastReceived: number;
+ offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
/**
* @type integer
- * @minimum 0
+ * @format int64
*/
- totalTimeSeries: number;
+ start: number;
}
-export interface MetricsexplorertypesMetricMetadataDTO {
+export interface InframonitoringtypesPostablePodsDTO {
/**
- * @type string
+ * @type integer
+ * @format int64
*/
- description: string;
+ end: number;
+ filter?: Querybuildertypesv5FilterDTO;
/**
- * @type boolean
+ * @type array,null
*/
- isMonotonic: boolean;
- temporality: MetrictypesTemporalityDTO;
- type: MetrictypesTypeDTO;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
- * @type string
+ * @type integer
*/
- unit: string;
-}
-
-export interface MetricsexplorertypesMetricsOnboardingResponseDTO {
+ limit: number;
/**
- * @type boolean
+ * @type integer
*/
- hasMetrics: boolean;
+ offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
+ /**
+ * @type integer
+ * @format int64
+ */
+ start: number;
}
-export interface MetricsexplorertypesStatDTO {
+export interface InframonitoringtypesPostableStatefulSetsDTO {
/**
- * @type string
+ * @type integer
+ * @format int64
*/
- description: string;
+ end: number;
+ filter?: Querybuildertypesv5FilterDTO;
/**
- * @type string
+ * @type array,null
*/
- metricName: string;
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
* @type integer
- * @minimum 0
*/
- samples: number;
+ limit: number;
/**
* @type integer
- * @minimum 0
*/
- timeseries: number;
- type: MetrictypesTypeDTO;
+ offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
/**
- * @type string
+ * @type integer
+ * @format int64
*/
- unit: string;
+ start: number;
}
-export interface MetricsexplorertypesStatsRequestDTO {
+export interface InframonitoringtypesPostableVolumesDTO {
/**
* @type integer
* @format int64
*/
end: number;
filter?: Querybuildertypesv5FilterDTO;
+ /**
+ * @type array,null
+ */
+ groupBy?: Querybuildertypesv5GroupByKeyDTO[] | null;
/**
* @type integer
*/
@@ -4980,784 +5922,811 @@ export interface MetricsexplorertypesStatsRequestDTO {
start: number;
}
-export interface MetricsexplorertypesStatsResponseDTO {
+export type InframonitoringtypesStatefulSetRecordDTOMetaAnyOf = {
+ [key: string]: string;
+};
+
+/**
+ * @nullable
+ */
+export type InframonitoringtypesStatefulSetRecordDTOMeta =
+ InframonitoringtypesStatefulSetRecordDTOMetaAnyOf | null;
+
+export interface InframonitoringtypesStatefulSetRecordDTO {
/**
- * @type array,null
+ * @type integer
*/
- metrics: MetricsexplorertypesStatDTO[] | null;
+ currentPods: number;
/**
* @type integer
- * @minimum 0
*/
- total: number;
-}
-
-export interface MetricsexplorertypesTreemapEntryDTO {
+ desiredPods: number;
/**
- * @type string
+ * @type object,null
*/
- metricName: string;
+ meta: InframonitoringtypesStatefulSetRecordDTOMeta;
+ podCountsByPhase: InframonitoringtypesPodCountsByPhaseDTO;
/**
* @type number
* @format double
*/
- percentage: number;
+ statefulSetCPU: number;
/**
- * @type integer
- * @minimum 0
+ * @type number
+ * @format double
*/
- totalValue: number;
+ statefulSetCPULimit: number;
+ /**
+ * @type number
+ * @format double
+ */
+ statefulSetCPURequest: number;
+ /**
+ * @type number
+ * @format double
+ */
+ statefulSetMemory: number;
+ /**
+ * @type number
+ * @format double
+ */
+ statefulSetMemoryLimit: number;
+ /**
+ * @type number
+ * @format double
+ */
+ statefulSetMemoryRequest: number;
+ /**
+ * @type string
+ */
+ statefulSetName: string;
}
-export enum MetricsexplorertypesTreemapModeDTO {
- timeseries = 'timeseries',
- samples = 'samples',
-}
-export interface MetricsexplorertypesTreemapRequestDTO {
+export interface InframonitoringtypesStatefulSetsDTO {
/**
- * @type integer
- * @format int64
+ * @type boolean
*/
- end: number;
- filter?: Querybuildertypesv5FilterDTO;
+ endTimeBeforeRetention: boolean;
/**
- * @type integer
+ * @type array
*/
- limit: number;
- mode: MetricsexplorertypesTreemapModeDTO;
+ records: InframonitoringtypesStatefulSetRecordDTO[];
+ requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
* @type integer
- * @format int64
*/
- start: number;
+ total: number;
+ type: InframonitoringtypesResponseTypeDTO;
+ warning?: Querybuildertypesv5QueryWarnDataDTO;
}
-export interface MetricsexplorertypesTreemapResponseDTO {
+export type InframonitoringtypesVolumeRecordDTOMetaAnyOf = {
+ [key: string]: string;
+};
+
+/**
+ * @nullable
+ */
+export type InframonitoringtypesVolumeRecordDTOMeta =
+ InframonitoringtypesVolumeRecordDTOMetaAnyOf | null;
+
+export interface InframonitoringtypesVolumeRecordDTO {
/**
- * @type array,null
+ * @type object,null
*/
- samples: MetricsexplorertypesTreemapEntryDTO[] | null;
+ meta: InframonitoringtypesVolumeRecordDTOMeta;
/**
- * @type array,null
+ * @type string
*/
- timeseries: MetricsexplorertypesTreemapEntryDTO[] | null;
+ persistentVolumeClaimName: string;
+ /**
+ * @type number
+ * @format double
+ */
+ volumeAvailable: number;
+ /**
+ * @type number
+ * @format double
+ */
+ volumeCapacity: number;
+ /**
+ * @type number
+ * @format double
+ */
+ volumeInodes: number;
+ /**
+ * @type number
+ * @format double
+ */
+ volumeInodesFree: number;
+ /**
+ * @type number
+ * @format double
+ */
+ volumeInodesUsed: number;
+ /**
+ * @type number
+ * @format double
+ */
+ volumeUsage: number;
}
-export interface MetricsexplorertypesUpdateMetricMetadataRequestDTO {
+export interface InframonitoringtypesVolumesDTO {
/**
- * @type string
+ * @type boolean
*/
- description: string;
+ endTimeBeforeRetention: boolean;
/**
- * @type boolean
+ * @type array
*/
- isMonotonic: boolean;
+ records: InframonitoringtypesVolumeRecordDTO[];
+ requiredMetricsCheck: InframonitoringtypesRequiredMetricsCheckDTO;
/**
- * @type string
+ * @type integer
*/
- metricName: string;
- temporality: MetrictypesTemporalityDTO;
- type: MetrictypesTypeDTO;
+ total: number;
+ type: InframonitoringtypesResponseTypeDTO;
+ warning?: Querybuildertypesv5QueryWarnDataDTO;
+}
+
+/**
+ * @nullable
+ */
+export type LlmpricingruletypesStringSliceDTO = string[] | null;
+
+export enum LlmpricingruletypesLLMPricingRuleCacheModeDTO {
+ subtract = 'subtract',
+ additive = 'additive',
+ unknown = 'unknown',
+}
+export interface LlmpricingruletypesLLMPricingCacheCostsDTO {
+ mode: LlmpricingruletypesLLMPricingRuleCacheModeDTO;
/**
- * @type string
+ * @type number
+ * @format double
*/
- unit: string;
+ read?: number;
+ /**
+ * @type number
+ * @format double
+ */
+ write?: number;
}
-export interface MetrictypesComparisonSpaceAggregationParamDTO {
+export interface LlmpricingruletypesLLMRulePricingDTO {
+ cache?: LlmpricingruletypesLLMPricingCacheCostsDTO;
/**
- * @type string
+ * @type number
+ * @format double
*/
- operator: string;
+ input: number;
/**
* @type number
* @format double
*/
- threshold: number;
+ output: number;
}
-export enum MetrictypesSpaceAggregationDTO {
- sum = 'sum',
- avg = 'avg',
- min = 'min',
- max = 'max',
- count = 'count',
- p50 = 'p50',
- p75 = 'p75',
- p90 = 'p90',
- p95 = 'p95',
- p99 = 'p99',
-}
-export enum MetrictypesTimeAggregationDTO {
- latest = 'latest',
- sum = 'sum',
- avg = 'avg',
- min = 'min',
- max = 'max',
- count = 'count',
- count_distinct = 'count_distinct',
- rate = 'rate',
- increase = 'increase',
-}
-export interface PreferencetypesValueDTO {
- [key: string]: unknown;
+export enum LlmpricingruletypesLLMPricingRuleUnitDTO {
+ per_million_tokens = 'per_million_tokens',
}
-
-export interface PreferencetypesPreferenceDTO {
+export interface LlmpricingruletypesLLMPricingRuleDTO {
/**
- * @type array,null
+ * @type string
+ * @format date-time
*/
- allowedScopes?: string[] | null;
+ createdAt?: string;
/**
- * @type array,null
+ * @type string
*/
- allowedValues?: string[] | null;
- defaultValue?: PreferencetypesValueDTO;
+ createdBy?: string;
/**
- * @type string
+ * @type boolean
*/
- description?: string;
+ enabled: boolean;
/**
* @type string
*/
- name?: string;
- value?: PreferencetypesValueDTO;
+ id: string;
/**
- * @type string
+ * @type boolean
*/
- valueType?: string;
-}
-
-export interface PreferencetypesUpdatablePreferenceDTO {
- value?: unknown;
-}
-
-export interface PromotetypesWrappedIndexDTO {
- fieldDataType?: TelemetrytypesFieldDataTypeDTO;
+ isOverride: boolean;
/**
- * @type integer
+ * @type string
*/
- granularity?: number;
+ modelName: string;
+ modelPattern: LlmpricingruletypesStringSliceDTO | null;
/**
* @type string
*/
- type?: string;
-}
-
-export interface PromotetypesPromotePathDTO {
+ orgId: string;
+ pricing: LlmpricingruletypesLLMRulePricingDTO;
/**
- * @type array
+ * @type string
*/
- indexes?: PromotetypesWrappedIndexDTO[];
+ provider: string;
/**
* @type string
*/
- path?: string;
+ sourceId?: string;
/**
- * @type boolean
+ * @type string,null
+ * @format date-time
*/
- promote?: boolean;
-}
-
-export type Querybuildertypesv5AggregationBucketDTOMeta = {
+ syncedAt?: string | null;
+ unit: LlmpricingruletypesLLMPricingRuleUnitDTO;
/**
* @type string
+ * @format date-time
*/
- unit?: string;
-};
-
-export interface Querybuildertypesv5AggregationBucketDTO {
+ updatedAt?: string;
/**
* @type string
*/
- alias?: string;
+ updatedBy?: string;
+}
+
+export interface LlmpricingruletypesGettablePricingRulesDTO {
/**
- * @type array
+ * @type array,null
*/
- anomalyScores?: Querybuildertypesv5TimeSeriesDTO[];
+ items: LlmpricingruletypesLLMPricingRuleDTO[] | null;
/**
* @type integer
*/
- index?: number;
+ limit: number;
/**
- * @type array
+ * @type integer
*/
- lowerBoundSeries?: Querybuildertypesv5TimeSeriesDTO[];
+ offset: number;
/**
- * @type object
+ * @type integer
*/
- meta?: Querybuildertypesv5AggregationBucketDTOMeta;
+ total: number;
+}
+
+export interface LlmpricingruletypesUpdatableLLMPricingRuleDTO {
/**
- * @type array
+ * @type boolean
*/
- predictedSeries?: Querybuildertypesv5TimeSeriesDTO[];
+ enabled: boolean;
/**
- * @type array,null
+ * @type string,null
*/
- series?: Querybuildertypesv5TimeSeriesDTO[] | null;
+ id?: string | null;
/**
- * @type array
+ * @type boolean,null
*/
- upperBoundSeries?: Querybuildertypesv5TimeSeriesDTO[];
-}
-
-export interface Querybuildertypesv5ClickHouseQueryDTO {
+ isOverride?: boolean | null;
/**
- * @type boolean
+ * @type string
*/
- disabled?: boolean;
+ modelName: string;
/**
- * @type string
+ * @type array,null
*/
- legend?: string;
+ modelPattern: string[] | null;
+ pricing: LlmpricingruletypesLLMRulePricingDTO;
/**
* @type string
*/
- name?: string;
+ provider: string;
/**
- * @type string
+ * @type string,null
*/
- query?: string;
+ sourceId?: string | null;
+ unit: LlmpricingruletypesLLMPricingRuleUnitDTO;
}
-export type Querybuildertypesv5ColumnDescriptorDTOMeta = {
+export interface LlmpricingruletypesUpdatableLLMPricingRulesDTO {
/**
- * @type string
+ * @type array,null
*/
- unit?: string;
-};
-
-export enum Querybuildertypesv5ColumnTypeDTO {
- group = 'group',
- aggregation = 'aggregation',
+ rules: LlmpricingruletypesUpdatableLLMPricingRuleDTO[] | null;
}
-export interface Querybuildertypesv5ColumnDescriptorDTO {
+
+export interface MetricsexplorertypesInspectMetricsRequestDTO {
/**
* @type integer
* @format int64
*/
- aggregationIndex?: number;
- columnType?: Querybuildertypesv5ColumnTypeDTO;
+ end: number;
+ filter?: Querybuildertypesv5FilterDTO;
/**
* @type string
*/
- description?: string;
- fieldContext?: TelemetrytypesFieldContextDTO;
- fieldDataType?: TelemetrytypesFieldDataTypeDTO;
+ metricName: string;
/**
- * @type object
+ * @type integer
+ * @format int64
*/
- meta?: Querybuildertypesv5ColumnDescriptorDTOMeta;
+ start: number;
+}
+
+export interface Querybuildertypesv5LabelDTO {
+ key?: TelemetrytypesTelemetryFieldKeyDTO;
+ value?: unknown;
+}
+
+export interface Querybuildertypesv5BucketDTO {
/**
- * @type string
+ * @type number
+ * @format double
*/
- name: string;
+ step?: number;
+}
+
+export interface Querybuildertypesv5TimeSeriesValueDTO {
+ bucket?: Querybuildertypesv5BucketDTO;
/**
- * @type string
+ * @type boolean
*/
- queryName?: string;
- signal?: TelemetrytypesSignalDTO;
+ partial?: boolean;
/**
- * @type string
+ * @type integer
+ * @format int64
*/
- unit?: string;
-}
-
-export interface Querybuildertypesv5TraceAggregationDTO {
+ timestamp?: number;
/**
- * @type string
+ * @type number
+ * @format double
*/
- alias?: string;
+ value?: number;
/**
- * @type string
+ * @type array
*/
- expression?: string;
+ values?: number[];
}
-export interface Querybuildertypesv5FunctionArgDTO {
+export interface Querybuildertypesv5TimeSeriesDTO {
/**
- * @type string
+ * @type array
*/
- name?: string;
- value?: unknown;
+ labels?: Querybuildertypesv5LabelDTO[];
+ /**
+ * @type array,null
+ */
+ values?: Querybuildertypesv5TimeSeriesValueDTO[] | null;
}
-export enum Querybuildertypesv5FunctionNameDTO {
- cutoffmin = 'cutoffmin',
- cutoffmax = 'cutoffmax',
- clampmin = 'clampmin',
- clampmax = 'clampmax',
- absolute = 'absolute',
- runningdiff = 'runningdiff',
- log2 = 'log2',
- log10 = 'log10',
- cumulativesum = 'cumulativesum',
- ewma3 = 'ewma3',
- ewma5 = 'ewma5',
- ewma7 = 'ewma7',
- median3 = 'median3',
- median5 = 'median5',
- median7 = 'median7',
- timeshift = 'timeshift',
- anomaly = 'anomaly',
- fillzero = 'fillzero',
-}
-export interface Querybuildertypesv5FunctionDTO {
+export interface MetricsexplorertypesInspectMetricsResponseDTO {
/**
- * @type array
+ * @type array,null
*/
- args?: Querybuildertypesv5FunctionArgDTO[];
- name?: Querybuildertypesv5FunctionNameDTO;
+ series: Querybuildertypesv5TimeSeriesDTO[] | null;
+}
+
+export enum MetrictypesTypeDTO {
+ gauge = 'gauge',
+ sum = 'sum',
+ histogram = 'histogram',
+ summary = 'summary',
+ exponentialhistogram = 'exponentialhistogram',
}
-
-export interface Querybuildertypesv5HavingDTO {
+export interface MetricsexplorertypesListMetricDTO {
/**
* @type string
*/
- expression?: string;
-}
-
-export interface Querybuildertypesv5LimitByDTO {
+ description: string;
/**
- * @type array,null
+ * @type boolean
*/
- keys?: string[] | null;
+ isMonotonic: boolean;
/**
* @type string
*/
- value?: string;
+ metricName: string;
+ temporality: MetrictypesTemporalityDTO;
+ type: MetrictypesTypeDTO;
+ /**
+ * @type string
+ */
+ unit: string;
}
-/**
- * Step interval. Accepts a Go duration string (e.g., "60s", "1m", "1h") or a number representing seconds (e.g., 60).
- */
-export type Querybuildertypesv5StepDTO = string | number;
+export interface MetricsexplorertypesListMetricsResponseDTO {
+ /**
+ * @type array,null
+ */
+ metrics: MetricsexplorertypesListMetricDTO[] | null;
+}
-export interface Querybuildertypesv5SecondaryAggregationDTO {
+export interface MetricsexplorertypesMetricAlertDTO {
/**
* @type string
*/
- alias?: string;
+ alertId: string;
/**
* @type string
*/
- expression?: string;
+ alertName: string;
+}
+
+export interface MetricsexplorertypesMetricAlertsResponseDTO {
/**
- * @type array
+ * @type array,null
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[];
+ alerts: MetricsexplorertypesMetricAlertDTO[] | null;
+}
+
+export interface MetricsexplorertypesMetricAttributeDTO {
+ /**
+ * @type string
+ */
+ key: string;
/**
* @type integer
+ * @minimum 0
*/
- limit?: number;
- limitBy?: Querybuildertypesv5LimitByDTO;
+ valueCount: number;
/**
- * @type array
+ * @type array,null
*/
- order?: Querybuildertypesv5OrderByDTO[];
- stepInterval?: Querybuildertypesv5StepDTO;
+ values: string[] | null;
}
-export enum TelemetrytypesSourceDTO {
- meter = 'meter',
-}
-export interface Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5TraceAggregationDTO {
- /**
- * @type array
- */
- aggregations?: Querybuildertypesv5TraceAggregationDTO[];
+export interface MetricsexplorertypesMetricAttributesResponseDTO {
/**
- * @type string
+ * @type array,null
*/
- cursor?: string;
+ attributes: MetricsexplorertypesMetricAttributeDTO[] | null;
/**
- * @type boolean
+ * @type integer
+ * @format int64
*/
- disabled?: boolean;
- filter?: Querybuildertypesv5FilterDTO;
+ totalKeys: number;
+}
+
+export interface MetricsexplorertypesMetricDashboardDTO {
/**
- * @type array
+ * @type string
*/
- functions?: Querybuildertypesv5FunctionDTO[];
+ dashboardId: string;
/**
- * @type array
+ * @type string
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[];
- having?: Querybuildertypesv5HavingDTO;
+ dashboardName: string;
/**
* @type string
*/
- legend?: string;
+ widgetId: string;
/**
- * @type integer
+ * @type string
*/
- limit?: number;
- limitBy?: Querybuildertypesv5LimitByDTO;
+ widgetName: string;
+}
+
+export interface MetricsexplorertypesMetricDashboardsResponseDTO {
/**
- * @type string
+ * @type array,null
*/
- name?: string;
+ dashboards: MetricsexplorertypesMetricDashboardDTO[] | null;
+}
+
+export interface MetricsexplorertypesMetricHighlightsResponseDTO {
/**
* @type integer
+ * @minimum 0
*/
- offset?: number;
+ activeTimeSeries: number;
/**
- * @type array
+ * @type integer
+ * @minimum 0
*/
- order?: Querybuildertypesv5OrderByDTO[];
+ dataPoints: number;
/**
- * @type array
+ * @type integer
+ * @minimum 0
*/
- secondaryAggregations?: Querybuildertypesv5SecondaryAggregationDTO[];
+ lastReceived: number;
/**
- * @type array
+ * @type integer
+ * @minimum 0
*/
- selectFields?: TelemetrytypesTelemetryFieldKeyDTO[];
- signal?: TelemetrytypesSignalDTO;
- source?: TelemetrytypesSourceDTO;
- stepInterval?: Querybuildertypesv5StepDTO;
-}
-
-export enum Querybuildertypesv5QueryTypeDTO {
- builder_query = 'builder_query',
- builder_formula = 'builder_formula',
- builder_trace_operator = 'builder_trace_operator',
- clickhouse_sql = 'clickhouse_sql',
- promql = 'promql',
-}
-export interface Querybuildertypesv5QueryEnvelopeBuilderTraceDTO {
- spec?: Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5TraceAggregationDTO;
- type?: Querybuildertypesv5QueryTypeDTO;
+ totalTimeSeries: number;
}
-export interface Querybuildertypesv5LogAggregationDTO {
+export interface MetricsexplorertypesMetricMetadataDTO {
/**
* @type string
*/
- alias?: string;
+ description: string;
+ /**
+ * @type boolean
+ */
+ isMonotonic: boolean;
+ temporality: MetrictypesTemporalityDTO;
+ type: MetrictypesTypeDTO;
/**
* @type string
*/
- expression?: string;
+ unit: string;
}
-export interface Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5LogAggregationDTO {
+export interface MetricsexplorertypesMetricsOnboardingResponseDTO {
/**
- * @type array
+ * @type boolean
*/
- aggregations?: Querybuildertypesv5LogAggregationDTO[];
+ hasMetrics: boolean;
+}
+
+export interface MetricsexplorertypesStatDTO {
/**
* @type string
*/
- cursor?: string;
+ description: string;
/**
- * @type boolean
+ * @type string
*/
- disabled?: boolean;
- filter?: Querybuildertypesv5FilterDTO;
+ metricName: string;
/**
- * @type array
+ * @type integer
+ * @minimum 0
*/
- functions?: Querybuildertypesv5FunctionDTO[];
+ samples: number;
/**
- * @type array
+ * @type integer
+ * @minimum 0
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[];
- having?: Querybuildertypesv5HavingDTO;
+ timeseries: number;
+ type: MetrictypesTypeDTO;
/**
* @type string
*/
- legend?: string;
+ unit: string;
+}
+
+export interface MetricsexplorertypesStatsRequestDTO {
/**
* @type integer
+ * @format int64
*/
- limit?: number;
- limitBy?: Querybuildertypesv5LimitByDTO;
+ end: number;
+ filter?: Querybuildertypesv5FilterDTO;
/**
- * @type string
+ * @type integer
*/
- name?: string;
+ limit: number;
/**
* @type integer
*/
offset?: number;
+ orderBy?: Querybuildertypesv5OrderByDTO;
/**
- * @type array
+ * @type integer
+ * @format int64
*/
- order?: Querybuildertypesv5OrderByDTO[];
+ start: number;
+}
+
+export interface MetricsexplorertypesStatsResponseDTO {
/**
- * @type array
+ * @type array,null
*/
- secondaryAggregations?: Querybuildertypesv5SecondaryAggregationDTO[];
+ metrics: MetricsexplorertypesStatDTO[] | null;
/**
- * @type array
+ * @type integer
+ * @minimum 0
*/
- selectFields?: TelemetrytypesTelemetryFieldKeyDTO[];
- signal?: TelemetrytypesSignalDTO;
- source?: TelemetrytypesSourceDTO;
- stepInterval?: Querybuildertypesv5StepDTO;
-}
-
-export interface Querybuildertypesv5QueryEnvelopeBuilderLogDTO {
- spec?: Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5LogAggregationDTO;
- type?: Querybuildertypesv5QueryTypeDTO;
+ total: number;
}
-export enum Querybuildertypesv5ReduceToDTO {
- sum = 'sum',
- count = 'count',
- avg = 'avg',
- min = 'min',
- max = 'max',
- last = 'last',
- median = 'median',
-}
-export interface Querybuildertypesv5MetricAggregationDTO {
- comparisonSpaceAggregationParam?: MetrictypesComparisonSpaceAggregationParamDTO;
+export interface MetricsexplorertypesTreemapEntryDTO {
/**
* @type string
*/
- metricName?: string;
- reduceTo?: Querybuildertypesv5ReduceToDTO;
- spaceAggregation?: MetrictypesSpaceAggregationDTO;
- temporality?: MetrictypesTemporalityDTO;
- timeAggregation?: MetrictypesTimeAggregationDTO;
-}
-
-export interface Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5MetricAggregationDTO {
+ metricName: string;
/**
- * @type array
+ * @type number
+ * @format double
*/
- aggregations?: Querybuildertypesv5MetricAggregationDTO[];
+ percentage: number;
/**
- * @type string
+ * @type integer
+ * @minimum 0
*/
- cursor?: string;
+ totalValue: number;
+}
+
+export enum MetricsexplorertypesTreemapModeDTO {
+ timeseries = 'timeseries',
+ samples = 'samples',
+}
+export interface MetricsexplorertypesTreemapRequestDTO {
/**
- * @type boolean
+ * @type integer
+ * @format int64
*/
- disabled?: boolean;
+ end: number;
filter?: Querybuildertypesv5FilterDTO;
/**
- * @type array
+ * @type integer
*/
- functions?: Querybuildertypesv5FunctionDTO[];
+ limit: number;
+ mode: MetricsexplorertypesTreemapModeDTO;
/**
- * @type array
+ * @type integer
+ * @format int64
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[];
- having?: Querybuildertypesv5HavingDTO;
+ start: number;
+}
+
+export interface MetricsexplorertypesTreemapResponseDTO {
/**
- * @type string
+ * @type array,null
*/
- legend?: string;
+ samples: MetricsexplorertypesTreemapEntryDTO[] | null;
/**
- * @type integer
+ * @type array,null
*/
- limit?: number;
- limitBy?: Querybuildertypesv5LimitByDTO;
+ timeseries: MetricsexplorertypesTreemapEntryDTO[] | null;
+}
+
+export interface MetricsexplorertypesUpdateMetricMetadataRequestDTO {
/**
* @type string
*/
- name?: string;
- /**
- * @type integer
- */
- offset?: number;
+ description: string;
/**
- * @type array
+ * @type boolean
*/
- order?: Querybuildertypesv5OrderByDTO[];
+ isMonotonic: boolean;
/**
- * @type array
+ * @type string
*/
- secondaryAggregations?: Querybuildertypesv5SecondaryAggregationDTO[];
+ metricName: string;
+ temporality: MetrictypesTemporalityDTO;
+ type: MetrictypesTypeDTO;
/**
- * @type array
+ * @type string
*/
- selectFields?: TelemetrytypesTelemetryFieldKeyDTO[];
- signal?: TelemetrytypesSignalDTO;
- source?: TelemetrytypesSourceDTO;
- stepInterval?: Querybuildertypesv5StepDTO;
+ unit: string;
}
-export interface Querybuildertypesv5QueryEnvelopeBuilderMetricDTO {
- spec?: Querybuildertypesv5QueryBuilderQueryGithubComSigNozSignozPkgTypesQuerybuildertypesQuerybuildertypesv5MetricAggregationDTO;
- type?: Querybuildertypesv5QueryTypeDTO;
+export interface PreferencetypesValueDTO {
+ [key: string]: unknown;
}
-export interface Querybuildertypesv5QueryBuilderFormulaDTO {
+export interface PreferencetypesPreferenceDTO {
/**
- * @type boolean
+ * @type array,null
*/
- disabled?: boolean;
+ allowedScopes?: string[] | null;
+ /**
+ * @type array,null
+ */
+ allowedValues?: string[] | null;
+ defaultValue?: PreferencetypesValueDTO;
/**
* @type string
*/
- expression?: string;
+ description?: string;
/**
- * @type array
+ * @type string
*/
- functions?: Querybuildertypesv5FunctionDTO[];
- having?: Querybuildertypesv5HavingDTO;
+ name?: string;
+ value?: PreferencetypesValueDTO;
/**
* @type string
*/
- legend?: string;
+ valueType?: string;
+}
+
+export interface PreferencetypesUpdatablePreferenceDTO {
+ value?: unknown;
+}
+
+export interface PromotetypesWrappedIndexDTO {
+ fieldDataType?: TelemetrytypesFieldDataTypeDTO;
/**
* @type integer
*/
- limit?: number;
+ granularity?: number;
/**
* @type string
*/
- name?: string;
- /**
- * @type array
- */
- order?: Querybuildertypesv5OrderByDTO[];
-}
-
-export interface Querybuildertypesv5QueryEnvelopeFormulaDTO {
- spec?: Querybuildertypesv5QueryBuilderFormulaDTO;
- type?: Querybuildertypesv5QueryTypeDTO;
+ type?: string;
}
-export interface Querybuildertypesv5QueryBuilderTraceOperatorDTO {
+export interface PromotetypesPromotePathDTO {
/**
* @type array
*/
- aggregations?: Querybuildertypesv5TraceAggregationDTO[];
+ indexes?: PromotetypesWrappedIndexDTO[];
/**
* @type string
*/
- cursor?: string;
+ path?: string;
/**
* @type boolean
*/
- disabled?: boolean;
+ promote?: boolean;
+}
+
+export type Querybuildertypesv5AggregationBucketDTOMeta = {
/**
* @type string
*/
- expression?: string;
- filter?: Querybuildertypesv5FilterDTO;
+ unit?: string;
+};
+
+export interface Querybuildertypesv5AggregationBucketDTO {
/**
- * @type array
+ * @type string
*/
- functions?: Querybuildertypesv5FunctionDTO[];
+ alias?: string;
/**
* @type array
*/
- groupBy?: Querybuildertypesv5GroupByKeyDTO[];
- having?: Querybuildertypesv5HavingDTO;
- /**
- * @type string
- */
- legend?: string;
+ anomalyScores?: Querybuildertypesv5TimeSeriesDTO[];
/**
* @type integer
*/
- limit?: number;
+ index?: number;
/**
- * @type string
+ * @type array
*/
- name?: string;
+ lowerBoundSeries?: Querybuildertypesv5TimeSeriesDTO[];
/**
- * @type integer
+ * @type object
*/
- offset?: number;
+ meta?: Querybuildertypesv5AggregationBucketDTOMeta;
/**
* @type array
*/
- order?: Querybuildertypesv5OrderByDTO[];
+ predictedSeries?: Querybuildertypesv5TimeSeriesDTO[];
/**
- * @type string
+ * @type array,null
*/
- returnSpansFrom?: string;
+ series?: Querybuildertypesv5TimeSeriesDTO[] | null;
/**
* @type array
*/
- selectFields?: TelemetrytypesTelemetryFieldKeyDTO[];
- stepInterval?: Querybuildertypesv5StepDTO;
+ upperBoundSeries?: Querybuildertypesv5TimeSeriesDTO[];
}
-export interface Querybuildertypesv5QueryEnvelopeTraceOperatorDTO {
- spec?: Querybuildertypesv5QueryBuilderTraceOperatorDTO;
- type?: Querybuildertypesv5QueryTypeDTO;
-}
+export type Querybuildertypesv5ColumnDescriptorDTOMeta = {
+ /**
+ * @type string
+ */
+ unit?: string;
+};
-export interface Querybuildertypesv5PromQueryDTO {
+export enum Querybuildertypesv5ColumnTypeDTO {
+ group = 'group',
+ aggregation = 'aggregation',
+}
+export interface Querybuildertypesv5ColumnDescriptorDTO {
/**
- * @type boolean
+ * @type integer
+ * @format int64
*/
- disabled?: boolean;
+ aggregationIndex?: number;
+ columnType?: Querybuildertypesv5ColumnTypeDTO;
/**
* @type string
*/
- legend?: string;
+ description?: string;
+ fieldContext?: TelemetrytypesFieldContextDTO;
+ fieldDataType?: TelemetrytypesFieldDataTypeDTO;
/**
- * @type string
+ * @type object
*/
- name?: string;
+ meta?: Querybuildertypesv5ColumnDescriptorDTOMeta;
/**
* @type string
*/
- query?: string;
+ name: string;
/**
- * @type boolean
+ * @type string
*/
- stats?: boolean;
- step?: Querybuildertypesv5StepDTO;
-}
-
-export interface Querybuildertypesv5QueryEnvelopePromQLDTO {
- spec?: Querybuildertypesv5PromQueryDTO;
- type?: Querybuildertypesv5QueryTypeDTO;
-}
-
-export interface Querybuildertypesv5QueryEnvelopeClickHouseSQLDTO {
- spec?: Querybuildertypesv5ClickHouseQueryDTO;
- type?: Querybuildertypesv5QueryTypeDTO;
-}
-
-export type Querybuildertypesv5QueryEnvelopeDTO =
- | (Querybuildertypesv5QueryEnvelopeBuilderTraceDTO & {
- spec?: unknown;
- type?: Querybuildertypesv5QueryTypeDTO;
- })
- | (Querybuildertypesv5QueryEnvelopeBuilderLogDTO & {
- spec?: unknown;
- type?: Querybuildertypesv5QueryTypeDTO;
- })
- | (Querybuildertypesv5QueryEnvelopeBuilderMetricDTO & {
- spec?: unknown;
- type?: Querybuildertypesv5QueryTypeDTO;
- })
- | (Querybuildertypesv5QueryEnvelopeFormulaDTO & {
- spec?: unknown;
- type?: Querybuildertypesv5QueryTypeDTO;
- })
- | (Querybuildertypesv5QueryEnvelopeTraceOperatorDTO & {
- spec?: unknown;
- type?: Querybuildertypesv5QueryTypeDTO;
- })
- | (Querybuildertypesv5QueryEnvelopePromQLDTO & {
- spec?: unknown;
- type?: Querybuildertypesv5QueryTypeDTO;
- })
- | (Querybuildertypesv5QueryEnvelopeClickHouseSQLDTO & {
- spec?: unknown;
- type?: Querybuildertypesv5QueryTypeDTO;
- });
-
-/**
- * Composite query containing one or more query envelopes. Each query envelope specifies its type and corresponding spec.
- */
-export interface Querybuildertypesv5CompositeQueryDTO {
+ queryName?: string;
+ signal?: TelemetrytypesSignalDTO;
/**
- * @type array,null
+ * @type string
*/
- queries?: Querybuildertypesv5QueryEnvelopeDTO[] | null;
+ unit?: string;
}
export type Querybuildertypesv5ExecStatsDTOStepIntervals = {
@@ -8420,6 +9389,25 @@ export type GetUserPreference200 = {
export type UpdateUserPreferencePathParameters = {
name: string;
};
+export type CreateDashboardV2201 = {
+ data: DashboardtypesGettableDashboardV2DTO;
+ /**
+ * @type string
+ */
+ status: string;
+};
+
+export type GetDashboardV2PathParameters = {
+ id: string;
+};
+export type GetDashboardV2200 = {
+ data: DashboardtypesGettableDashboardV2DTO;
+ /**
+ * @type string
+ */
+ status: string;
+};
+
export type GetFeatures200 = {
/**
* @type array
diff --git a/pkg/apiserver/signozapiserver/dashboard.go b/pkg/apiserver/signozapiserver/dashboard.go
index ac4c6dcc52..70b3555135 100644
--- a/pkg/apiserver/signozapiserver/dashboard.go
+++ b/pkg/apiserver/signozapiserver/dashboard.go
@@ -14,6 +14,40 @@ import (
)
func (provider *provider) addDashboardRoutes(router *mux.Router) error {
+ if err := router.Handle("/api/v2/dashboards", handler.New(provider.authzMiddleware.EditAccess(provider.dashboardHandler.CreateV2), handler.OpenAPIDef{
+ ID: "CreateDashboardV2",
+ Tags: []string{"dashboard"},
+ Summary: "Create dashboard (v2)",
+ Description: "This endpoint creates a dashboard in the v2 format that follows Perses spec.",
+ Request: new(dashboardtypes.PostableDashboardV2),
+ RequestContentType: "application/json",
+ Response: new(dashboardtypes.GettableDashboardV2),
+ ResponseContentType: "application/json",
+ SuccessStatusCode: http.StatusCreated,
+ ErrorStatusCodes: []int{},
+ Deprecated: false,
+ SecuritySchemes: newSecuritySchemes(types.RoleEditor),
+ })).Methods(http.MethodPost).GetError(); err != nil {
+ return err
+ }
+
+ if err := router.Handle("/api/v2/dashboards/{id}", handler.New(provider.authzMiddleware.ViewAccess(provider.dashboardHandler.GetV2), handler.OpenAPIDef{
+ ID: "GetDashboardV2",
+ Tags: []string{"dashboard"},
+ Summary: "Get dashboard (v2)",
+ Description: "This endpoint returns a v2-shape dashboard.",
+ Request: nil,
+ RequestContentType: "",
+ Response: new(dashboardtypes.GettableDashboardV2),
+ ResponseContentType: "application/json",
+ SuccessStatusCode: http.StatusOK,
+ ErrorStatusCodes: []int{},
+ Deprecated: false,
+ SecuritySchemes: newSecuritySchemes(types.RoleViewer),
+ })).Methods(http.MethodGet).GetError(); err != nil {
+ return err
+ }
+
if err := router.Handle("/api/v1/dashboards/{id}/public", handler.New(provider.authzMiddleware.AdminAccess(provider.dashboardHandler.CreatePublic), handler.OpenAPIDef{
ID: "CreatePublicDashboard",
Tags: []string{"dashboard"},
diff --git a/pkg/modules/dashboard/dashboard.go b/pkg/modules/dashboard/dashboard.go
index 3df527ec7b..f98e79f428 100644
--- a/pkg/modules/dashboard/dashboard.go
+++ b/pkg/modules/dashboard/dashboard.go
@@ -52,6 +52,14 @@ type Module interface {
GetByMetricNames(ctx context.Context, orgID valuer.UUID, metricNames []string) (map[string][]map[string]string, error)
statsreporter.StatsCollector
+
+ // ════════════════════════════════════════════════════════════════════════
+ // v2 dashboard methods
+ // ════════════════════════════════════════════════════════════════════════
+
+ CreateV2(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, source dashboardtypes.Source, postable dashboardtypes.PostableDashboardV2) (*dashboardtypes.DashboardV2, error)
+
+ GetV2(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.DashboardV2, error)
}
type Handler interface {
@@ -74,4 +82,11 @@ type Handler interface {
LockUnlock(http.ResponseWriter, *http.Request)
Delete(http.ResponseWriter, *http.Request)
+
+ // ════════════════════════════════════════════════════════════════════════
+ // v2 dashboard methods
+ // ════════════════════════════════════════════════════════════════════════
+ CreateV2(http.ResponseWriter, *http.Request)
+
+ GetV2(http.ResponseWriter, *http.Request)
}
diff --git a/pkg/modules/dashboard/impldashboard/module.go b/pkg/modules/dashboard/impldashboard/module.go
index a2c3584813..2accb044ca 100644
--- a/pkg/modules/dashboard/impldashboard/module.go
+++ b/pkg/modules/dashboard/impldashboard/module.go
@@ -10,6 +10,7 @@ import (
"github.com/SigNoz/signoz/pkg/factory"
"github.com/SigNoz/signoz/pkg/modules/dashboard"
"github.com/SigNoz/signoz/pkg/modules/organization"
+ "github.com/SigNoz/signoz/pkg/modules/tag"
"github.com/SigNoz/signoz/pkg/queryparser"
"github.com/SigNoz/signoz/pkg/types"
"github.com/SigNoz/signoz/pkg/types/coretypes"
@@ -24,9 +25,10 @@ type module struct {
analytics analytics.Analytics
orgGetter organization.Getter
queryParser queryparser.QueryParser
+ tagModule tag.Module
}
-func NewModule(store dashboardtypes.Store, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser) dashboard.Module {
+func NewModule(store dashboardtypes.Store, settings factory.ProviderSettings, analytics analytics.Analytics, orgGetter organization.Getter, queryParser queryparser.QueryParser, tagModule tag.Module) dashboard.Module {
scopedProviderSettings := factory.NewScopedProviderSettings(settings, "github.com/SigNoz/signoz/pkg/modules/dashboard/impldashboard")
return &module{
store: store,
@@ -34,6 +36,7 @@ func NewModule(store dashboardtypes.Store, settings factory.ProviderSettings, an
analytics: analytics,
orgGetter: orgGetter,
queryParser: queryParser,
+ tagModule: tagModule,
}
}
diff --git a/pkg/modules/dashboard/impldashboard/v2_handler.go b/pkg/modules/dashboard/impldashboard/v2_handler.go
new file mode 100644
index 0000000000..5fdfbf33bb
--- /dev/null
+++ b/pkg/modules/dashboard/impldashboard/v2_handler.go
@@ -0,0 +1,74 @@
+package impldashboard
+
+import (
+ "context"
+ "net/http"
+ "time"
+
+ "github.com/SigNoz/signoz/pkg/errors"
+ "github.com/SigNoz/signoz/pkg/http/binding"
+ "github.com/SigNoz/signoz/pkg/http/render"
+ "github.com/SigNoz/signoz/pkg/types/authtypes"
+ "github.com/SigNoz/signoz/pkg/types/dashboardtypes"
+ "github.com/SigNoz/signoz/pkg/valuer"
+ "github.com/gorilla/mux"
+)
+
+func (handler *handler) CreateV2(rw http.ResponseWriter, r *http.Request) {
+ ctx, cancel := context.WithTimeout(r.Context(), 10*time.Second)
+ defer cancel()
+
+ claims, err := authtypes.ClaimsFromContext(ctx)
+ if err != nil {
+ render.Error(rw, err)
+ return
+ }
+
+ orgID := valuer.MustNewUUID(claims.OrgID)
+
+ var req dashboardtypes.PostableDashboardV2
+ if err := binding.JSON.BindBody(r.Body, &req); err != nil {
+ render.Error(rw, err)
+ return
+ }
+
+ dashboard, err := handler.module.CreateV2(ctx, orgID, claims.Email, valuer.MustNewUUID(claims.IdentityID()), dashboardtypes.SourceUser, req)
+ if err != nil {
+ render.Error(rw, err)
+ return
+ }
+
+ render.Success(rw, http.StatusCreated, dashboard.ToGettableDashboardV2())
+}
+
+func (handler *handler) GetV2(rw http.ResponseWriter, r *http.Request) {
+ ctx, cancel := context.WithTimeout(r.Context(), 10*time.Second)
+ defer cancel()
+
+ claims, err := authtypes.ClaimsFromContext(ctx)
+ if err != nil {
+ render.Error(rw, err)
+ return
+ }
+
+ orgID := valuer.MustNewUUID(claims.OrgID)
+
+ id := mux.Vars(r)["id"]
+ if id == "" {
+ render.Error(rw, errors.Newf(errors.TypeInvalidInput, errors.CodeInvalidInput, "id is missing in the path"))
+ return
+ }
+ dashboardID, err := valuer.NewUUID(id)
+ if err != nil {
+ render.Error(rw, err)
+ return
+ }
+
+ dashboard, err := handler.module.GetV2(ctx, orgID, dashboardID)
+ if err != nil {
+ render.Error(rw, err)
+ return
+ }
+
+ render.Success(rw, http.StatusOK, dashboard.ToGettableDashboardV2())
+}
diff --git a/pkg/modules/dashboard/impldashboard/v2_module.go b/pkg/modules/dashboard/impldashboard/v2_module.go
new file mode 100644
index 0000000000..9aed581904
--- /dev/null
+++ b/pkg/modules/dashboard/impldashboard/v2_module.go
@@ -0,0 +1,57 @@
+package impldashboard
+
+import (
+ "context"
+
+ "github.com/SigNoz/signoz/pkg/errors"
+ "github.com/SigNoz/signoz/pkg/types/coretypes"
+ "github.com/SigNoz/signoz/pkg/types/dashboardtypes"
+ "github.com/SigNoz/signoz/pkg/valuer"
+)
+
+func (m *module) CreateV2(ctx context.Context, orgID valuer.UUID, createdBy string, creator valuer.UUID, source dashboardtypes.Source, postable dashboardtypes.PostableDashboardV2) (*dashboardtypes.DashboardV2, error) {
+ if !source.IsValid() {
+ return nil, errors.Newf(errors.TypeInvalidInput, dashboardtypes.ErrCodeDashboardInvalidSource, "invalid dashboard source %q, must be one of user, system, integration", source.StringValue())
+ }
+ if err := postable.Validate(); err != nil {
+ return nil, err
+ }
+
+ dashboard := postable.NewDashboardV2(orgID, createdBy, source)
+ var storableDashboard *dashboardtypes.StorableDashboard
+
+ err := m.store.RunInTx(ctx, func(ctx context.Context) error {
+ resolvedTags, err := m.tagModule.SyncTags(ctx, orgID, coretypes.KindDashboard, dashboard.ID, postable.Tags)
+ if err != nil {
+ return err
+ }
+ dashboard.Tags = resolvedTags
+
+ storable, err := dashboard.ToStorableDashboard()
+ if err != nil {
+ return err
+ }
+ storableDashboard = storable
+ return m.store.Create(ctx, storable)
+ })
+ if err != nil {
+ return nil, err
+ }
+
+ m.analytics.TrackUser(ctx, orgID.String(), creator.String(), "Dashboard Created", dashboardtypes.NewStatsFromStorableDashboards([]*dashboardtypes.StorableDashboard{storableDashboard}))
+ return dashboard, nil
+}
+
+func (module *module) GetV2(ctx context.Context, orgID valuer.UUID, id valuer.UUID) (*dashboardtypes.DashboardV2, error) {
+ storable, err := module.store.Get(ctx, orgID, id)
+ if err != nil {
+ return nil, err
+ }
+
+ tags, err := module.tagModule.ListForResource(ctx, orgID, coretypes.KindDashboard, id)
+ if err != nil {
+ return nil, err
+ }
+
+ return storable.ToDashboardV2(tags)
+}
diff --git a/pkg/signoz/handler_test.go b/pkg/signoz/handler_test.go
index c4ce299bc4..6d16c70f8a 100644
--- a/pkg/signoz/handler_test.go
+++ b/pkg/signoz/handler_test.go
@@ -49,7 +49,7 @@ func TestNewHandlers(t *testing.T) {
queryParser := queryparser.New(providerSettings)
require.NoError(t, err)
tagModule := impltag.NewModule(impltag.NewStore(sqlstore))
- dashboardModule := impldashboard.NewModule(impldashboard.NewStore(sqlstore), providerSettings, nil, orgGetter, queryParser)
+ dashboardModule := impldashboard.NewModule(impldashboard.NewStore(sqlstore), providerSettings, nil, orgGetter, queryParser, tagModule)
flagger, err := flagger.New(context.Background(), instrumentationtest.New().ToProviderSettings(), flagger.Config{}, flagger.MustNewRegistry())
require.NoError(t, err)
diff --git a/pkg/signoz/module_test.go b/pkg/signoz/module_test.go
index 81179a68f5..d4e9b728d7 100644
--- a/pkg/signoz/module_test.go
+++ b/pkg/signoz/module_test.go
@@ -50,7 +50,7 @@ func TestNewModules(t *testing.T) {
queryParser := queryparser.New(providerSettings)
require.NoError(t, err)
tagModule := impltag.NewModule(impltag.NewStore(sqlstore))
- dashboardModule := impldashboard.NewModule(impldashboard.NewStore(sqlstore), providerSettings, nil, orgGetter, queryParser)
+ dashboardModule := impldashboard.NewModule(impldashboard.NewStore(sqlstore), providerSettings, nil, orgGetter, queryParser, tagModule)
flagger, err := flagger.New(context.Background(), instrumentationtest.New().ToProviderSettings(), flagger.Config{}, flagger.MustNewRegistry())
require.NoError(t, err)
diff --git a/pkg/signoz/signoz.go b/pkg/signoz/signoz.go
index 211e53043d..0781050829 100644
--- a/pkg/signoz/signoz.go
+++ b/pkg/signoz/signoz.go
@@ -33,6 +33,7 @@ import (
"github.com/SigNoz/signoz/pkg/modules/rulestatehistory"
"github.com/SigNoz/signoz/pkg/modules/serviceaccount"
"github.com/SigNoz/signoz/pkg/modules/serviceaccount/implserviceaccount"
+ "github.com/SigNoz/signoz/pkg/modules/tag"
"github.com/SigNoz/signoz/pkg/modules/tag/impltag"
"github.com/SigNoz/signoz/pkg/modules/user/impluser"
"github.com/SigNoz/signoz/pkg/prometheus"
@@ -107,7 +108,7 @@ func New(
telemetrystoreProviderFactories factory.NamedMap[factory.ProviderFactory[telemetrystore.TelemetryStore, telemetrystore.Config]],
authNsCallback func(ctx context.Context, providerSettings factory.ProviderSettings, store authtypes.AuthNStore, licensing licensing.Licensing) (map[authtypes.AuthNProvider]authn.AuthN, error),
authzCallback func(context.Context, sqlstore.SQLStore, authz.Config, licensing.Licensing, []authz.OnBeforeRoleDelete) (factory.ProviderFactory[authz.AuthZ, authz.Config], error),
- dashboardModuleCallback func(sqlstore.SQLStore, factory.ProviderSettings, analytics.Analytics, organization.Getter, queryparser.QueryParser, querier.Querier, licensing.Licensing) dashboard.Module,
+ dashboardModuleCallback func(sqlstore.SQLStore, factory.ProviderSettings, analytics.Analytics, organization.Getter, queryparser.QueryParser, querier.Querier, licensing.Licensing, tag.Module) dashboard.Module,
gatewayProviderFactory func(licensing.Licensing) factory.ProviderFactory[gateway.Gateway, gateway.Config],
auditorProviderFactories func(licensing.Licensing) factory.NamedMap[factory.ProviderFactory[auditor.Auditor, auditor.Config]],
meterReporterProviderFactories func(context.Context, factory.ProviderSettings, flagger.Flagger, licensing.Licensing, telemetrystore.TelemetryStore, retention.Getter, organization.Getter, zeus.Zeus) (factory.NamedMap[factory.ProviderFactory[meterreporter.Reporter, meterreporter.Config]], string),
@@ -340,7 +341,7 @@ func New(
tagModule := impltag.NewModule(impltag.NewStore(sqlstore))
// Initialize dashboard module
- dashboard := dashboardModuleCallback(sqlstore, providerSettings, analytics, orgGetter, queryParser, querier, licensing)
+ dashboard := dashboardModuleCallback(sqlstore, providerSettings, analytics, orgGetter, queryParser, querier, licensing, tagModule)
// Initialize user getter
userGetter := impluser.NewGetter(userStore, userRoleStore, flagger)
diff --git a/pkg/types/dashboardtypes/perses_dashboard.go b/pkg/types/dashboardtypes/perses_dashboard.go
new file mode 100644
index 0000000000..d5511bdf06
--- /dev/null
+++ b/pkg/types/dashboardtypes/perses_dashboard.go
@@ -0,0 +1,320 @@
+package dashboardtypes
+
+import (
+ "bytes"
+ "crypto/rand"
+ "encoding/json"
+ "strings"
+ "time"
+
+ "github.com/SigNoz/signoz/pkg/errors"
+ "github.com/SigNoz/signoz/pkg/types"
+ "github.com/SigNoz/signoz/pkg/types/coretypes"
+ "github.com/SigNoz/signoz/pkg/types/tagtypes"
+ "github.com/SigNoz/signoz/pkg/valuer"
+ "github.com/perses/perses/pkg/model/api/v1/common"
+ "k8s.io/apimachinery/pkg/util/validation"
+)
+
+const (
+ SchemaVersion = "v6"
+ MaxTagsPerDashboard = 10
+ dashboardNameSuffixLen = 8
+)
+
+type DSLKey string
+
+const (
+ DSLKeyName DSLKey = "name"
+ DSLKeyDescription DSLKey = "description"
+ DSLKeyCreatedAt DSLKey = "created_at"
+ DSLKeyUpdatedAt DSLKey = "updated_at"
+ DSLKeyCreatedBy DSLKey = "created_by"
+ DSLKeyLocked DSLKey = "locked"
+ DSLKeyPublic DSLKey = "public"
+)
+
+// reservedDSLKeys are dashboard column-level filter names in the list-query DSL.
+// A tag whose key collides with one of these would make the DSL ambiguous, so
+// they're rejected (case-insensitively) at write time.
+var reservedDSLKeys = map[DSLKey]struct{}{
+ DSLKeyName: {},
+ DSLKeyDescription: {},
+ DSLKeyCreatedAt: {},
+ DSLKeyUpdatedAt: {},
+ DSLKeyCreatedBy: {},
+ DSLKeyLocked: {},
+ DSLKeyPublic: {},
+}
+
+type DashboardV2 struct {
+ types.Identifiable
+ types.TimeAuditable
+ types.UserAuditable
+
+ OrgID valuer.UUID `json:"orgId" required:"true"`
+ Locked bool `json:"locked" required:"true"`
+ Source Source `json:"source" required:"true"`
+
+ DashboardV2MetadataBase
+ Name string `json:"name" required:"true"`
+ Tags []*tagtypes.Tag `json:"tags" required:"true"`
+ Spec DashboardSpec `json:"spec" required:"true"`
+}
+
+type DashboardV2MetadataBase struct {
+ SchemaVersion string `json:"schemaVersion" required:"true"`
+ Image string `json:"image,omitempty"`
+}
+
+// ════════════════════════════════════════════════════════════════════════
+// Postable
+// ════════════════════════════════════════════════════════════════════════
+
+type PostableDashboardV2 struct {
+ DashboardV2MetadataBase
+ Name string `json:"name,omitempty"`
+ GenerateName bool `json:"generateName,omitempty"`
+ Tags []tagtypes.PostableTag `json:"tags" required:"true"`
+ Spec DashboardSpec `json:"spec" required:"true"`
+}
+
+func (postable PostableDashboardV2) NewDashboardV2(orgID valuer.UUID, createdBy string, source Source) *DashboardV2 {
+ now := time.Now()
+
+ name := postable.Name
+ if postable.GenerateName {
+ name = generateDashboardName(postable.Spec.Display.Name)
+ }
+
+ return &DashboardV2{
+ Identifiable: types.Identifiable{ID: valuer.GenerateUUID()},
+ TimeAuditable: types.TimeAuditable{CreatedAt: now, UpdatedAt: now},
+ UserAuditable: types.UserAuditable{CreatedBy: createdBy, UpdatedBy: createdBy},
+ OrgID: orgID,
+ Locked: source == SourceIntegration,
+ Source: source,
+ DashboardV2MetadataBase: postable.DashboardV2MetadataBase,
+ Name: name,
+ Tags: tagtypes.NewTagsFromPostableTags(orgID, coretypes.KindDashboard, postable.Tags),
+ Spec: postable.Spec,
+ }
+}
+
+func (p *PostableDashboardV2) UnmarshalJSON(data []byte) error {
+ dec := json.NewDecoder(bytes.NewReader(data))
+ dec.DisallowUnknownFields()
+ type alias PostableDashboardV2
+ var tmp alias
+ if err := dec.Decode(&tmp); err != nil {
+ return errors.WrapInvalidInputf(err, ErrCodeDashboardInvalidInput, "%s", err.Error())
+ }
+ *p = PostableDashboardV2(tmp)
+ if p.Spec.Display == nil {
+ p.Spec.Display = &common.Display{}
+ }
+ if !p.GenerateName && p.Spec.Display.Name == "" {
+ p.Spec.Display.Name = p.Name
+ }
+ return p.Validate()
+}
+
+func (p *PostableDashboardV2) Validate() error {
+ if p.SchemaVersion != SchemaVersion {
+ return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "schemaVersion must be %q, got %q", SchemaVersion, p.SchemaVersion)
+ }
+ if err := p.validateName(); err != nil {
+ return err
+ }
+ if err := p.validateTags(); err != nil {
+ return err
+ }
+ return p.Spec.Validate()
+}
+
+func (p *PostableDashboardV2) validateName() error {
+ if !p.GenerateName {
+ return validateDashboardName(p.Name)
+ }
+ if p.Name != "" {
+ return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "name must be empty when generateName is true, got %q", p.Name)
+ }
+ if p.Spec.Display == nil || p.Spec.Display.Name == "" {
+ return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "spec.display.name is required when generateName is true")
+ }
+ return nil
+}
+
+// Matches https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names.
+func validateDashboardName(name string) error {
+ if name == "" {
+ return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "name is required")
+ }
+ if errs := validation.IsDNS1123Label(name); len(errs) > 0 {
+ return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "name %q is invalid: %s", name, strings.Join(errs, "; "))
+ }
+ return nil
+}
+
+func generateDashboardName(displayName string) string {
+ const dns1123LabelMaxLen = 63
+ suffixAlphabet := []byte("abcdefghijklmnopqrstuvwxyz0123456789")
+
+ var b strings.Builder
+ b.Grow(len(displayName))
+ prevHyphen := false
+ for _, r := range strings.ToLower(displayName) {
+ switch {
+ case (r >= 'a' && r <= 'z') || (r >= '0' && r <= '9'):
+ b.WriteRune(r)
+ prevHyphen = false
+ case b.Len() > 0 && !prevHyphen:
+ b.WriteByte('-')
+ prevHyphen = true
+ }
+ }
+ prefix := strings.TrimRight(b.String(), "-")
+
+ suffix := make([]byte, dashboardNameSuffixLen)
+ if _, err := rand.Read(suffix); err != nil {
+ panic(errors.WrapInternalf(err, errors.CodeInternal, "read random for dashboard name suffix"))
+ }
+ for i := range suffix {
+ suffix[i] = suffixAlphabet[int(suffix[i])%len(suffixAlphabet)]
+ }
+
+ maxPrefix := dns1123LabelMaxLen - 1 - dashboardNameSuffixLen
+ if len(prefix) > maxPrefix {
+ prefix = strings.TrimRight(prefix[:maxPrefix], "-")
+ }
+ if prefix == "" {
+ return string(suffix)
+ }
+ return prefix + "-" + string(suffix)
+}
+
+func (p *PostableDashboardV2) validateTags() error {
+ if len(p.Tags) > MaxTagsPerDashboard {
+ return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "a dashboard can have at most %d tags", MaxTagsPerDashboard)
+ }
+ for _, tag := range p.Tags {
+ if _, reserved := reservedDSLKeys[DSLKey(strings.ToLower(strings.TrimSpace(tag.Key)))]; reserved {
+ return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "tag key %q is reserved", tag.Key)
+ }
+ }
+ return nil
+}
+
+// ════════════════════════════════════════════════════════════════════════
+// Gettable
+// ════════════════════════════════════════════════════════════════════════
+
+type GettableDashboardV2 struct {
+ types.Identifiable
+ types.TimeAuditable
+ types.UserAuditable
+
+ OrgID valuer.UUID `json:"orgId" required:"true"`
+ Locked bool `json:"locked" required:"true"`
+ Source Source `json:"source" required:"true"`
+
+ DashboardV2MetadataBase
+ Name string `json:"name" required:"true"`
+ Tags []*tagtypes.GettableTag `json:"tags" required:"true"`
+ Spec DashboardSpec `json:"spec" required:"true"`
+}
+
+func (d DashboardV2) ToGettableDashboardV2() GettableDashboardV2 {
+ return GettableDashboardV2{
+ Identifiable: d.Identifiable,
+ TimeAuditable: d.TimeAuditable,
+ UserAuditable: d.UserAuditable,
+ OrgID: d.OrgID,
+ Locked: d.Locked,
+ Source: d.Source,
+ DashboardV2MetadataBase: d.DashboardV2MetadataBase,
+ Name: d.Name,
+ Tags: tagtypes.NewGettableTagsFromTags(d.Tags),
+ Spec: d.Spec,
+ }
+}
+
+// ════════════════════════════════════════════════════════════════════════
+// Storable
+// ════════════════════════════════════════════════════════════════════════
+
+// StorableDashboardV2Data is exactly what serializes into the dashboard.data column.
+type StorableDashboardV2Data struct {
+ Metadata StorableDashboardV2Metadata `json:"metadata"`
+ Spec DashboardSpec `json:"spec"`
+}
+
+func (s StorableDashboardV2Data) toStorableDashboardData() (StorableDashboardData, error) {
+ raw, err := json.Marshal(s)
+ if err != nil {
+ return nil, errors.WrapInternalf(err, errors.CodeInternal, "marshal v2 dashboard data")
+ }
+ out := StorableDashboardData{}
+ if err := json.Unmarshal(raw, &out); err != nil {
+ return nil, errors.WrapInternalf(err, errors.CodeInternal, "unmarshal v2 dashboard data")
+ }
+ return out, nil
+}
+
+type StorableDashboardV2Metadata = DashboardV2MetadataBase
+
+// ════════════════════════════════════════════════════════════════════════
+// Convertors
+// ════════════════════════════════════════════════════════════════════════
+
+func (d *DashboardV2) ToStorableDashboard() (*StorableDashboard, error) {
+ storableDashboardV2Data := StorableDashboardV2Data{
+ Metadata: StorableDashboardV2Metadata{
+ SchemaVersion: d.SchemaVersion,
+ Image: d.Image,
+ },
+ Spec: d.Spec,
+ }
+
+ data, err := storableDashboardV2Data.toStorableDashboardData()
+ if err != nil {
+ return nil, err
+ }
+ return &StorableDashboard{
+ Identifiable: types.Identifiable{ID: d.ID},
+ TimeAuditable: d.TimeAuditable,
+ UserAuditable: d.UserAuditable,
+ OrgID: d.OrgID,
+ Locked: d.Locked,
+ Name: d.Name,
+ Data: data,
+ Source: d.Source,
+ }, nil
+}
+
+func (storable StorableDashboard) ToDashboardV2(tags []*tagtypes.Tag) (*DashboardV2, error) {
+ metadata, _ := storable.Data["metadata"].(map[string]any)
+ if metadata == nil || metadata["schemaVersion"] != SchemaVersion {
+ return nil, errors.Newf(errors.TypeUnsupported, ErrCodeDashboardInvalidData, "dashboard %s is not in %s schema", storable.ID, SchemaVersion)
+ }
+ raw, err := json.Marshal(storable.Data)
+ if err != nil {
+ return nil, errors.WrapInternalf(err, errors.CodeInternal, "marshal stored v2 dashboard data")
+ }
+ var stored StorableDashboardV2Data
+ if err := json.Unmarshal(raw, &stored); err != nil {
+ return nil, errors.WrapInternalf(err, errors.CodeInternal, "unmarshal stored v2 dashboard data")
+ }
+ return &DashboardV2{
+ Identifiable: storable.Identifiable,
+ TimeAuditable: storable.TimeAuditable,
+ UserAuditable: storable.UserAuditable,
+ OrgID: storable.OrgID,
+ Locked: storable.Locked,
+ Source: storable.Source,
+ DashboardV2MetadataBase: stored.Metadata,
+ Name: storable.Name,
+ Tags: tags,
+ Spec: stored.Spec,
+ }, nil
+}
diff --git a/pkg/types/dashboardtypes/perses_dashboard_convertors_test.go b/pkg/types/dashboardtypes/perses_dashboard_convertors_test.go
new file mode 100644
index 0000000000..b76d16c028
--- /dev/null
+++ b/pkg/types/dashboardtypes/perses_dashboard_convertors_test.go
@@ -0,0 +1,225 @@
+package dashboardtypes
+
+import (
+ "encoding/json"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/SigNoz/signoz/pkg/types"
+ "github.com/SigNoz/signoz/pkg/types/coretypes"
+ "github.com/SigNoz/signoz/pkg/types/tagtypes"
+ "github.com/SigNoz/signoz/pkg/valuer"
+ "github.com/perses/perses/pkg/model/api/v1/common"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func newTestDashboardV2(t *testing.T, orgID valuer.UUID, source Source) *DashboardV2 {
+ t.Helper()
+ createdAt := time.Date(2026, time.January, 1, 12, 0, 0, 0, time.UTC)
+ updatedAt := time.Date(2026, time.January, 2, 12, 0, 0, 0, time.UTC)
+
+ spec := DashboardSpec{
+ Panels: map[string]*Panel{
+ "p1": {
+ Kind: "Panel",
+ Spec: PanelSpec{
+ Plugin: PanelPlugin{
+ Kind: PanelKindTimeSeries,
+ Spec: &TimeSeriesPanelSpec{
+ Visualization: TimeSeriesVisualization{
+ BasicVisualization: BasicVisualization{TimePreference: TimePreferenceGlobalTime},
+ },
+ Formatting: PanelFormatting{DecimalPrecision: PrecisionOption2},
+ ChartAppearance: TimeSeriesChartAppearance{
+ LineInterpolation: LineInterpolationSpline,
+ LineStyle: LineStyleSolid,
+ FillMode: FillModeSolid,
+ SpanGaps: SpanGaps{FillLessThan: valuer.MustParseTextDuration("60s")},
+ },
+ Legend: Legend{Position: LegendPositionBottom},
+ },
+ },
+ Queries: []Query{
+ {
+ Kind: "TimeSeriesQuery",
+ Spec: QuerySpec{
+ Plugin: QueryPlugin{
+ Kind: QueryKindPromQL,
+ Spec: &PromQLQuerySpec{Name: "A", Query: "up"},
+ },
+ },
+ },
+ },
+ },
+ },
+ },
+ Layouts: []Layout{},
+ }
+
+ return &DashboardV2{
+ Identifiable: types.Identifiable{ID: valuer.GenerateUUID()},
+ TimeAuditable: types.TimeAuditable{CreatedAt: createdAt, UpdatedAt: updatedAt},
+ UserAuditable: types.UserAuditable{CreatedBy: "alice", UpdatedBy: "bob"},
+ OrgID: orgID,
+ Locked: true,
+ Source: source,
+ DashboardV2MetadataBase: DashboardV2MetadataBase{
+ SchemaVersion: SchemaVersion,
+ Image: "data:image/png;base64,abc",
+ },
+ Name: "production-overview",
+ Tags: []*tagtypes.Tag{
+ tagtypes.NewTag(orgID, coretypes.KindDashboard, "team", "platform"),
+ tagtypes.NewTag(orgID, coretypes.KindDashboard, "env", "prod"),
+ },
+ Spec: spec,
+ }
+}
+
+func TestPostableDashboardV2NewDashboardV2(t *testing.T) {
+ orgID := valuer.GenerateUUID()
+
+ cases := []struct {
+ scenario string
+ source Source
+ expectedLocked bool
+ }{
+ {
+ scenario: "user source is not locked",
+ source: SourceUser,
+ expectedLocked: false,
+ },
+ {
+ scenario: "system source is not locked",
+ source: SourceSystem,
+ expectedLocked: false,
+ },
+ {
+ scenario: "integration source is locked",
+ source: SourceIntegration,
+ expectedLocked: true,
+ },
+ }
+
+ for _, tc := range cases {
+ t.Run(tc.scenario, func(t *testing.T) {
+ postable := PostableDashboardV2{
+ DashboardV2MetadataBase: DashboardV2MetadataBase{
+ SchemaVersion: SchemaVersion,
+ Image: "img",
+ },
+ Name: "my-dashboard",
+ Tags: []tagtypes.PostableTag{
+ {Key: "team", Value: "platform"},
+ {Key: "env", Value: "prod"},
+ },
+ Spec: DashboardSpec{},
+ }
+
+ before := time.Now()
+ dashboard := postable.NewDashboardV2(orgID, "alice", tc.source)
+ after := time.Now()
+
+ require.NotNil(t, dashboard)
+ assert.False(t, dashboard.ID.IsZero(), "expected a freshly generated UUID")
+ assert.Equal(t, orgID, dashboard.OrgID)
+ assert.Equal(t, tc.source, dashboard.Source)
+ assert.Equal(t, tc.expectedLocked, dashboard.Locked)
+ assert.Equal(t, postable.DashboardV2MetadataBase, dashboard.DashboardV2MetadataBase)
+ assert.Equal(t, postable.Name, dashboard.Name)
+ assert.Equal(t, postable.Spec, dashboard.Spec)
+
+ assert.Equal(t, "alice", dashboard.CreatedBy)
+ assert.Equal(t, "alice", dashboard.UpdatedBy)
+ assert.True(t, dashboard.CreatedAt.Equal(dashboard.UpdatedAt), "createdAt should equal updatedAt on creation")
+ assert.False(t, dashboard.CreatedAt.Before(before), "createdAt should be >= before")
+ assert.False(t, dashboard.CreatedAt.After(after), "createdAt should be <= after")
+
+ require.Len(t, dashboard.Tags, 2, "expected 2 tags")
+ for i, expectedTag := range postable.Tags {
+ assert.Equal(t, expectedTag.Key, dashboard.Tags[i].Key)
+ assert.Equal(t, expectedTag.Value, dashboard.Tags[i].Value)
+ assert.Equal(t, orgID, dashboard.Tags[i].OrgID)
+ assert.Equal(t, coretypes.KindDashboard, dashboard.Tags[i].Kind)
+ assert.False(t, dashboard.Tags[i].ID.IsZero(), "tag should have a UUID")
+ }
+ })
+ }
+
+ t.Run("each invocation mints a distinct ID", func(t *testing.T) {
+ postable := PostableDashboardV2{
+ DashboardV2MetadataBase: DashboardV2MetadataBase{SchemaVersion: SchemaVersion},
+ Name: "x",
+ Spec: DashboardSpec{},
+ }
+
+ first := postable.NewDashboardV2(orgID, "alice", SourceUser)
+ second := postable.NewDashboardV2(orgID, "alice", SourceUser)
+ assert.NotEqual(t, first.ID, second.ID, "expected distinct UUIDs across invocations")
+ })
+
+ t.Run("generateName derives name from display.name with a random suffix", func(t *testing.T) {
+ postable := PostableDashboardV2{
+ DashboardV2MetadataBase: DashboardV2MetadataBase{SchemaVersion: SchemaVersion},
+ GenerateName: true,
+ Spec: DashboardSpec{
+ Display: &common.Display{Name: "My Dashboard!"},
+ },
+ }
+
+ dashboard := postable.NewDashboardV2(orgID, "alice", SourceUser)
+ assert.True(t, strings.HasPrefix(dashboard.Name, "my-dashboard-"), "expected slug prefix, got %q", dashboard.Name)
+ assert.Len(t, dashboard.Name, len("my-dashboard-")+dashboardNameSuffixLen)
+ })
+}
+
+func TestDashboardV2ToGettableDashboardV2(t *testing.T) {
+ orgID := valuer.GenerateUUID()
+
+ t.Run("copies all scalar fields and converts tags", func(t *testing.T) {
+ dashboard := newTestDashboardV2(t, orgID, SourceUser)
+
+ gettable := dashboard.ToGettableDashboardV2()
+
+ assert.Equal(t, dashboard.Identifiable, gettable.Identifiable)
+ assert.Equal(t, dashboard.TimeAuditable, gettable.TimeAuditable)
+ assert.Equal(t, dashboard.UserAuditable, gettable.UserAuditable)
+ assert.Equal(t, dashboard.OrgID, gettable.OrgID)
+ assert.Equal(t, dashboard.Locked, gettable.Locked)
+ assert.Equal(t, dashboard.Source, gettable.Source)
+ assert.Equal(t, dashboard.DashboardV2MetadataBase, gettable.DashboardV2MetadataBase)
+ assert.Equal(t, dashboard.Name, gettable.Name)
+ assert.Equal(t, dashboard.Spec, gettable.Spec)
+
+ require.Len(t, gettable.Tags, len(dashboard.Tags))
+ for i, sourceTag := range dashboard.Tags {
+ require.NotNil(t, gettable.Tags[i])
+ assert.Equal(t, sourceTag.Key, gettable.Tags[i].Key)
+ assert.Equal(t, sourceTag.Value, gettable.Tags[i].Value)
+ }
+ })
+}
+
+func TestDashboardV2StorableRoundTrip(t *testing.T) {
+ orgID := valuer.GenerateUUID()
+ original := newTestDashboardV2(t, orgID, SourceIntegration)
+
+ storable, err := original.ToStorableDashboard()
+ require.NoError(t, err)
+ require.NotNil(t, storable)
+
+ // Simulate the DB hop on the text `data` column.
+ raw, err := json.Marshal(storable.Data)
+ require.NoError(t, err)
+ var reloadedData StorableDashboardData
+ require.NoError(t, json.Unmarshal(raw, &reloadedData))
+ storable.Data = reloadedData
+
+ restored, err := storable.ToDashboardV2(original.Tags)
+ require.NoError(t, err)
+ require.NotNil(t, restored)
+
+ assert.Equal(t, original, restored)
+}
diff --git a/pkg/types/dashboardtypes/perses_dashboard_data.go b/pkg/types/dashboardtypes/perses_dashboard_data.go
index 5e83ff79cd..313a0b25b0 100644
--- a/pkg/types/dashboardtypes/perses_dashboard_data.go
+++ b/pkg/types/dashboardtypes/perses_dashboard_data.go
@@ -12,11 +12,11 @@ import (
"github.com/perses/perses/pkg/model/api/v1/common"
)
-// DashboardData is the SigNoz dashboard v2 spec shape. It mirrors
+// DashboardSpec is the SigNoz dashboard v2 spec shape. It mirrors
// v1.DashboardSpec (Perses) field-for-field, except every common.Plugin
// occurrence is replaced with a typed SigNoz plugin whose OpenAPI schema is a
// per-site discriminated oneOf.
-type DashboardData struct {
+type DashboardSpec struct {
Display *common.Display `json:"display,omitempty"`
Datasources map[string]*DatasourceSpec `json:"datasources,omitempty"`
Variables []Variable `json:"variables,omitempty"`
@@ -31,15 +31,15 @@ type DashboardData struct {
// Unmarshal + validate entry point
// ══════════════════════════════════════════════
-func (d *DashboardData) UnmarshalJSON(data []byte) error {
+func (d *DashboardSpec) UnmarshalJSON(data []byte) error {
dec := json.NewDecoder(bytes.NewReader(data))
dec.DisallowUnknownFields()
- type alias DashboardData
+ type alias DashboardSpec
var tmp alias
if err := dec.Decode(&tmp); err != nil {
return errors.WrapInvalidInputf(err, ErrCodeDashboardInvalidInput, "invalid dashboard spec")
}
- *d = DashboardData(tmp)
+ *d = DashboardSpec(tmp)
return d.Validate()
}
@@ -47,7 +47,7 @@ func (d *DashboardData) UnmarshalJSON(data []byte) error {
// Cross-field validation
// ══════════════════════════════════════════════
-func (d *DashboardData) Validate() error {
+func (d *DashboardSpec) Validate() error {
for key, panel := range d.Panels {
if panel == nil {
return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "spec.panels.%s: panel must not be null", key)
diff --git a/pkg/types/dashboardtypes/perses_dashboard_test.go b/pkg/types/dashboardtypes/perses_dashboard_test.go
index 8a7a09dbbe..a39d027628 100644
--- a/pkg/types/dashboardtypes/perses_dashboard_test.go
+++ b/pkg/types/dashboardtypes/perses_dashboard_test.go
@@ -10,10 +10,11 @@ import (
"github.com/SigNoz/signoz/pkg/errors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
+ "k8s.io/apimachinery/pkg/util/validation"
)
-func unmarshalDashboard(data []byte) (*DashboardData, error) {
- var d DashboardData
+func unmarshalDashboard(data []byte) (*DashboardSpec, error) {
+ var d DashboardSpec
if err := json.Unmarshal(data, &d); err != nil {
return nil, err
}
@@ -40,7 +41,7 @@ func TestInvalidateNotAJSON(t *testing.T) {
}
// TestUnmarshalErrorPreservesNestedMessage guards the wrap on dec.Decode in
-// DashboardData.UnmarshalJSON. The wrap stamps a consistent type/code on
+// DashboardSpec.UnmarshalJSON. The wrap stamps a consistent type/code on
// decode failures, but must not smother the rich messages produced by nested
// UnmarshalJSON methods (panel/query/variable/datasource plugin envelopes).
func TestUnmarshalErrorPreservesNestedMessage(t *testing.T) {
@@ -520,7 +521,7 @@ func TestInvalidateBadPanelSpecValues(t *testing.T) {
"spec": {
"plugin": {
"kind": "signoz/NumberPanel",
- "spec": {"thresholds": [{"value": 100, "operator": ">", "color": "Red", "format": "Color"}]}
+ "spec": {"thresholds": [{"value": 100, "operator": "above", "color": "Red", "format": "Color"}]}
}
}
}
@@ -698,17 +699,17 @@ func TestValidateRequiredFields(t *testing.T) {
},
{
name: "ComparisonThreshold missing value",
- data: wrapPanel("signoz/NumberPanel", `{"thresholds": [{"operator": ">", "format": "text", "color": "Red"}]}`),
+ data: wrapPanel("signoz/NumberPanel", `{"thresholds": [{"operator": "above", "format": "text", "color": "Red"}]}`),
wantContain: "Value",
},
{
name: "ComparisonThreshold missing color",
- data: wrapPanel("signoz/NumberPanel", `{"thresholds": [{"value": 100, "operator": ">", "format": "text", "color": ""}]}`),
+ data: wrapPanel("signoz/NumberPanel", `{"thresholds": [{"value": 100, "operator": "above", "format": "text", "color": ""}]}`),
wantContain: "Color",
},
{
name: "TableThreshold missing columnName",
- data: wrapPanel("signoz/TablePanel", `{"thresholds": [{"value": 100, "operator": ">", "format": "text", "color": "Red", "columnName": ""}]}`),
+ data: wrapPanel("signoz/TablePanel", `{"thresholds": [{"value": 100, "operator": "above", "format": "text", "color": "Red", "columnName": ""}]}`),
wantContain: "ColumnName",
},
{
@@ -798,7 +799,7 @@ func TestNumberPanelDefaults(t *testing.T) {
spec := d.Panels["p1"].Spec.Plugin.Spec.(*NumberPanelSpec)
require.Len(t, spec.Thresholds, 1, "expected 1 threshold")
- require.Equal(t, ">", spec.Thresholds[0].Operator.ValueOrDefault(), "expected ComparisonOperator default >")
+ require.Equal(t, "above", spec.Thresholds[0].Operator.ValueOrDefault(), "expected ComparisonOperator default above")
require.Equal(t, "text", spec.Thresholds[0].Format.ValueOrDefault(), "expected ThresholdFormat default text")
// Marshal back and verify defaults in JSON output.
@@ -806,10 +807,7 @@ func TestNumberPanelDefaults(t *testing.T) {
require.NoError(t, err, "marshal dashboard failed")
outputStr := string(output)
assert.Contains(t, outputStr, `"format":"text"`, "expected stored/response JSON to contain format:text")
- // Go's json.Marshal escapes ">" as "\u003e", so check for both forms.
- assert.True(t,
- strings.Contains(outputStr, `"operator":">"`) || strings.Contains(outputStr, `"operator":"\u003e"`),
- "expected stored/response JSON to contain operator:>, got: %s", outputStr)
+ assert.Contains(t, outputStr, `"operator":"above"`, "expected stored/response JSON to contain operator:above")
}
// TestPersesFixtureStorageRoundTrip exercises the typed → map[string]any →
@@ -820,7 +818,7 @@ func TestPersesFixtureStorageRoundTrip(t *testing.T) {
raw, err := os.ReadFile("testdata/perses.json")
require.NoError(t, err)
- var data DashboardData
+ var data DashboardSpec
require.NoError(t, json.Unmarshal(raw, &data), "initial unmarshal")
marshaled, err := json.Marshal(data)
@@ -832,7 +830,7 @@ func TestPersesFixtureStorageRoundTrip(t *testing.T) {
remarshaled, err := json.Marshal(asMap)
require.NoError(t, err, "map → JSON (read-back shape)")
- var roundtripped DashboardData
+ var roundtripped DashboardSpec
require.NoError(t, json.Unmarshal(remarshaled, &roundtripped), "JSON → typed (the failure mode)")
}
@@ -879,7 +877,7 @@ func TestStorageRoundTrip(t *testing.T) {
assert.Equal(t, "global_time", tsSpec.Visualization.TimePreference.ValueOrDefault())
assert.Equal(t, "bottom", tsSpec.Legend.Position.ValueOrDefault())
numSpec := d.Panels["p2"].Spec.Plugin.Spec.(*NumberPanelSpec)
- assert.Equal(t, ">", numSpec.Thresholds[0].Operator.ValueOrDefault())
+ assert.Equal(t, "above", numSpec.Thresholds[0].Operator.ValueOrDefault())
assert.Equal(t, "text", numSpec.Thresholds[0].Format.ValueOrDefault())
// Step 2: Marshal to JSON (simulates writing to DB).
@@ -899,7 +897,7 @@ func TestStorageRoundTrip(t *testing.T) {
assert.Equal(t, "global_time", tsLoaded.Visualization.TimePreference.ValueOrDefault(), "after load")
assert.Equal(t, "bottom", tsLoaded.Legend.Position.ValueOrDefault(), "after load")
numLoaded := loaded.Panels["p2"].Spec.Plugin.Spec.(*NumberPanelSpec)
- assert.Equal(t, ">", numLoaded.Thresholds[0].Operator.ValueOrDefault(), "after load")
+ assert.Equal(t, "above", numLoaded.Thresholds[0].Operator.ValueOrDefault(), "after load")
assert.Equal(t, "text", numLoaded.Thresholds[0].Format.ValueOrDefault(), "after load")
// Step 4: Marshal again (simulates API response) and verify defaults.
@@ -919,10 +917,113 @@ func TestStorageRoundTrip(t *testing.T) {
assert.Contains(t, responseStr, `"`+field+`":`+want, "expected %s:%s after storage round-trip", field, want)
}
- // Verify operator default (Go escapes ">" as "\u003e").
- assert.True(t,
- strings.Contains(responseStr, `"operator":">"`) || strings.Contains(responseStr, `"operator":"\u003e"`),
- "expected operator:> after storage round-trip")
+ assert.Contains(t, responseStr, `"operator":"above"`, "expected operator:above after storage round-trip")
+}
+
+func TestPostableDashboardV2GenerateNameFlag(t *testing.T) {
+ const validSpec = `"spec": {"panels": {}, "layouts": []}`
+
+ tests := []struct {
+ scenario string
+ body string
+ wantErr bool
+ wantErrMatch string
+ wantName string
+ wantDisplay string
+ }{
+ {
+ scenario: "flag true with display.name derives name on conversion",
+ body: `{"schemaVersion":"` + SchemaVersion + `","generateName":true,"spec":{"display":{"name":"My Dashboard!"},"panels":{},"layouts":[]}}`,
+ wantName: "",
+ wantDisplay: "My Dashboard!",
+ },
+ {
+ scenario: "flag true with non-empty name is rejected",
+ body: `{"schemaVersion":"` + SchemaVersion + `","name":"already-set","generateName":true,"spec":{"display":{"name":"My Dashboard"},"panels":{},"layouts":[]}}`,
+ wantErr: true,
+ wantErrMatch: "name must be empty when generateName is true",
+ },
+ {
+ scenario: "flag true with empty display.name is rejected",
+ body: `{"schemaVersion":"` + SchemaVersion + `","generateName":true,` + validSpec + `}`,
+ wantErr: true,
+ wantErrMatch: "spec.display.name is required",
+ },
+ {
+ scenario: "flag false",
+ body: `{"schemaVersion":"` + SchemaVersion + `","name":"my-dashboard",` + validSpec + `}`,
+ wantName: "my-dashboard",
+ wantDisplay: "my-dashboard",
+ },
+ {
+ scenario: "flag false with missing name is rejected",
+ body: `{"schemaVersion":"` + SchemaVersion + `",` + validSpec + `}`,
+ wantErr: true,
+ wantErrMatch: "name is required",
+ },
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.scenario, func(t *testing.T) {
+ var p PostableDashboardV2
+ err := json.Unmarshal([]byte(tt.body), &p)
+ if tt.wantErr {
+ require.Error(t, err, "expected validation error")
+ assert.Contains(t, err.Error(), tt.wantErrMatch)
+ return
+ }
+ require.NoError(t, err)
+ assert.Equal(t, tt.wantName, p.Name)
+ assert.Equal(t, tt.wantDisplay, p.Spec.Display.Name)
+ })
+ }
+}
+
+func TestGenerateDashboardName(t *testing.T) {
+ tests := []struct {
+ scenario string
+ input string
+ wantPrefix string // expected slug prefix before the "-<suffix>" tail (empty if prefix is dropped)
+ }{
+ {scenario: "simple words with spaces", input: "My Dashboard", wantPrefix: "my-dashboard"},
+ {scenario: "punctuation collapses", input: "Hello, World!", wantPrefix: "hello-world"},
+ {scenario: "leading and trailing whitespace", input: " hello ", wantPrefix: "hello"},
+ {scenario: "leading and trailing hyphens", input: "---abc---", wantPrefix: "abc"},
+ {scenario: "consecutive non-alphanumerics collapse", input: "a___b...c", wantPrefix: "a-b-c"},
+ {scenario: "digits are preserved", input: "Region us-east-1", wantPrefix: "region-us-east-1"},
+ {scenario: "no alphanumerics drops prefix and returns suffix only", input: "!!! ???", wantPrefix: ""},
+ }
+
+ for _, tt := range tests {
+ t.Run(tt.scenario, func(t *testing.T) {
+ got := generateDashboardName(tt.input)
+ require.NotEmpty(t, got)
+ require.LessOrEqual(t, len(got), 63)
+ require.Empty(t, validation.IsDNS1123Label(got), "result must be a valid DNS-1123 label")
+
+ if tt.wantPrefix == "" {
+ assert.Len(t, got, dashboardNameSuffixLen, "expected the bare random suffix")
+ return
+ }
+ expectedPrefix := tt.wantPrefix + "-"
+ assert.True(t, strings.HasPrefix(got, expectedPrefix), "expected prefix %q, got %q", expectedPrefix, got)
+ assert.Len(t, got, len(expectedPrefix)+dashboardNameSuffixLen)
+ })
+ }
+
+ t.Run("prefix is truncated to leave room for the suffix", func(t *testing.T) {
+ input := strings.Repeat("a", 100)
+ got := generateDashboardName(input)
+ require.LessOrEqual(t, len(got), 63)
+ require.Empty(t, validation.IsDNS1123Label(got))
+ assert.Equal(t, len(got), 63, "expected the result to be padded to the max DNS-1123 length")
+ })
+
+ t.Run("suffix differs across calls", func(t *testing.T) {
+ first := generateDashboardName("collision-test")
+ second := generateDashboardName("collision-test")
+ assert.NotEqual(t, first, second, "expected the random suffix to differ across calls")
+ })
}
func TestSpanGaps(t *testing.T) {
diff --git a/pkg/types/dashboardtypes/perses_drift_test.go b/pkg/types/dashboardtypes/perses_drift_test.go
index 2c3ab8da88..5d312bbfae 100644
--- a/pkg/types/dashboardtypes/perses_drift_test.go
+++ b/pkg/types/dashboardtypes/perses_drift_test.go
@@ -1,6 +1,6 @@
package dashboardtypes
-// TestDashboardDataMatchesPerses asserts that DashboardData
+// TestDashboardSpecMatchesPerses asserts that DashboardData
// and every nested SigNoz-owned type cover the JSON field set of their Perses
// counterpart.
@@ -16,13 +16,13 @@ import (
"github.com/stretchr/testify/assert"
)
-func TestDashboardDataMatchesPerses(t *testing.T) {
+func TestDashboardSpecMatchesPerses(t *testing.T) {
cases := []struct {
name string
ours reflect.Type
perses reflect.Type
}{
- {"DashboardSpec", typeOf[DashboardData](), typeOf[v1.DashboardSpec]()},
+ {"DashboardSpec", typeOf[DashboardSpec](), typeOf[v1.DashboardSpec]()},
{"Panel", typeOf[Panel](), typeOf[v1.Panel]()},
{"PanelSpec", typeOf[PanelSpec](), typeOf[v1.PanelSpec]()},
{"Query", typeOf[Query](), typeOf[v1.Query]()},
@@ -38,10 +38,10 @@ func TestDashboardDataMatchesPerses(t *testing.T) {
missing, extra := drift(c.ours, c.perses)
assert.Empty(t, missing,
- "DashboardData (%s) is missing json fields present on Perses %s — upstream likely added or renamed a field",
+ "DashboardSpec (%s) is missing json fields present on Perses %s — upstream likely added or renamed a field",
c.ours.Name(), c.perses.Name())
assert.Empty(t, extra,
- "DashboardData (%s) has json fields absent on Perses %s — upstream likely removed a field or we added one without the counterpart",
+ "DashboardSpec (%s) has json fields absent on Perses %s — upstream likely removed a field or we added one without the counterpart",
c.ours.Name(), c.perses.Name())
})
}
diff --git a/pkg/types/dashboardtypes/perses_signoz_plugins.go b/pkg/types/dashboardtypes/perses_signoz_plugins.go
index dcc3bb3d20..056238192a 100644
--- a/pkg/types/dashboardtypes/perses_signoz_plugins.go
+++ b/pkg/types/dashboardtypes/perses_signoz_plugins.go
@@ -397,12 +397,7 @@ func (f *ThresholdFormat) UnmarshalJSON(data []byte) error {
type ComparisonOperator struct{ valuer.String }
var (
- ComparisonOperatorGT = ComparisonOperator{valuer.NewString(">")} // default
- ComparisonOperatorLT = ComparisonOperator{valuer.NewString("<")}
- ComparisonOperatorGTE = ComparisonOperator{valuer.NewString(">=")}
- ComparisonOperatorLTE = ComparisonOperator{valuer.NewString("<=")}
- ComparisonOperatorEQ = ComparisonOperator{valuer.NewString("=")}
- ComparisonOperatorAbove = ComparisonOperator{valuer.NewString("above")}
+ ComparisonOperatorAbove = ComparisonOperator{valuer.NewString("above")} // default
ComparisonOperatorBelow = ComparisonOperator{valuer.NewString("below")}
ComparisonOperatorAboveOrEqual = ComparisonOperator{valuer.NewString("above_or_equal")}
ComparisonOperatorBelowOrEqual = ComparisonOperator{valuer.NewString("below_or_equal")}
@@ -411,12 +406,12 @@ var (
)
func (ComparisonOperator) Enum() []any {
- return []any{ComparisonOperatorGT, ComparisonOperatorLT, ComparisonOperatorGTE, ComparisonOperatorLTE, ComparisonOperatorEQ, ComparisonOperatorAbove, ComparisonOperatorBelow, ComparisonOperatorAboveOrEqual, ComparisonOperatorBelowOrEqual, ComparisonOperatorEqual, ComparisonOperatorNotEqual}
+ return []any{ComparisonOperatorAbove, ComparisonOperatorBelow, ComparisonOperatorAboveOrEqual, ComparisonOperatorBelowOrEqual, ComparisonOperatorEqual, ComparisonOperatorNotEqual}
}
func (o ComparisonOperator) ValueOrDefault() string {
if o.IsZero() {
- return ComparisonOperatorGT.StringValue()
+ return ComparisonOperatorAbove.StringValue()
}
return o.StringValue()
}
@@ -428,21 +423,20 @@ func (o ComparisonOperator) MarshalJSON() ([]byte, error) {
func (o *ComparisonOperator) UnmarshalJSON(data []byte) error {
var v string
if err := json.Unmarshal(data, &v); err != nil {
- return errors.WrapInvalidInputf(err, ErrCodeDashboardInvalidInput, "invalid comparison operator: must be a string, one of `>`, `<`, `>=`, `<=`, `=`, `above`, `below`, `above_or_equal`, `below_or_equal`, `equal`, or `not_equal`")
+ return errors.WrapInvalidInputf(err, ErrCodeDashboardInvalidInput, "invalid comparison operator: must be a string, one of `above`, `below`, `above_or_equal`, `below_or_equal`, `equal`, or `not_equal`")
}
if v == "" {
- *o = ComparisonOperatorGT
+ *o = ComparisonOperatorAbove
return nil
}
co := ComparisonOperator{valuer.NewString(v)}
switch co {
- case ComparisonOperatorGT, ComparisonOperatorLT, ComparisonOperatorGTE, ComparisonOperatorLTE, ComparisonOperatorEQ,
- ComparisonOperatorAbove, ComparisonOperatorBelow, ComparisonOperatorAboveOrEqual, ComparisonOperatorBelowOrEqual,
+ case ComparisonOperatorAbove, ComparisonOperatorBelow, ComparisonOperatorAboveOrEqual, ComparisonOperatorBelowOrEqual,
ComparisonOperatorEqual, ComparisonOperatorNotEqual:
*o = co
return nil
default:
- return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "invalid comparison operator %q: must be `>`, `<`, `>=`, `<=`, `=`, `above`, `below`, `above_or_equal`, `below_or_equal`, `equal`, or `not_equal`", v)
+ return errors.NewInvalidInputf(ErrCodeDashboardInvalidInput, "invalid comparison operator %q: must be `above`, `below`, `above_or_equal`, `below_or_equal`, `equal`, or `not_equal`", v)
}
}
diff --git a/pkg/types/dashboardtypes/testdata/perses.json b/pkg/types/dashboardtypes/testdata/perses.json
index 76cf48f607..c68a3fbea6 100644
--- a/pkg/types/dashboardtypes/testdata/perses.json
+++ b/pkg/types/dashboardtypes/testdata/perses.json
@@ -317,14 +317,14 @@
"thresholds": [
{
"value": 1200000,
- "operator": ">",
+ "operator": "above",
"unit": "none",
"color": "Red",
"format": "text"
},
{
"value": 1200000,
- "operator": "<=",
+ "operator": "below_or_equal",
"unit": "none",
"color": "Green",
"format": "text"
@@ -465,7 +465,7 @@
"thresholds": [
{
"value": 1,
- "operator": ">",
+ "operator": "above",
"unit": "min",
"color": "Red",
"format": "text",
diff --git a/pkg/types/tagtypes/tag.go b/pkg/types/tagtypes/tag.go
index 7aeb526f98..3044dde411 100644
--- a/pkg/types/tagtypes/tag.go
+++ b/pkg/types/tagtypes/tag.go
@@ -69,6 +69,14 @@ func NewPostableTagsFromTags(tags []*Tag) []PostableTag {
return out
}
+func NewTagsFromPostableTags(orgID valuer.UUID, kind coretypes.Kind, tags []PostableTag) []*Tag {
+ out := make([]*Tag, len(tags))
+ for i, t := range tags {
+ out[i] = NewTag(orgID, kind, t.Key, t.Value)
+ }
+ return out
+}
+
func NewTag(orgID valuer.UUID, kind coretypes.Kind, key, value string) *Tag {
now := time.Now()
return &Tag{