Skip to content

Commit

Permalink
Merge branch 'develop' into dashboard-detail-back-navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
SagarRajput-7 authored Nov 22, 2024
2 parents f3dc92f + 67058b2 commit b1a6489
Show file tree
Hide file tree
Showing 93 changed files with 4,032 additions and 217 deletions.
8 changes: 4 additions & 4 deletions deploy/docker-swarm/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ services:
condition: on-failure

query-service:
image: signoz/query-service:0.56.0
image: signoz/query-service:0.59.0
command:
[
"-config=/root/config/prometheus.yml",
Expand Down Expand Up @@ -186,7 +186,7 @@ services:
<<: *db-depend

frontend:
image: signoz/frontend:0.56.0
image: signoz/frontend:0.59.0
deploy:
restart_policy:
condition: on-failure
Expand All @@ -199,7 +199,7 @@ services:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector:
image: signoz/signoz-otel-collector:0.111.5
image: signoz/signoz-otel-collector:0.111.9
command:
[
"--config=/etc/otel-collector-config.yaml",
Expand Down Expand Up @@ -237,7 +237,7 @@ services:
- query-service

otel-collector-migrator:
image: signoz/signoz-schema-migrator:0.111.5
image: signoz/signoz-schema-migrator:0.111.9
deploy:
restart_policy:
condition: on-failure
Expand Down
4 changes: 2 additions & 2 deletions deploy/docker/clickhouse-setup/docker-compose-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
- --storage.path=/data

otel-collector-migrator:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.5}
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.9}
container_name: otel-migrator
command:
- "--dsn=tcp://clickhouse:9000"
Expand All @@ -84,7 +84,7 @@ services:
# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`
otel-collector:
container_name: signoz-otel-collector
image: signoz/signoz-otel-collector:0.111.5
image: signoz/signoz-otel-collector:0.111.9
command:
[
"--config=/etc/otel-collector-config.yaml",
Expand Down
10 changes: 5 additions & 5 deletions deploy/docker/clickhouse-setup/docker-compose-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ services:
# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`

query-service:
image: signoz/query-service:${DOCKER_TAG:-0.56.0}
image: signoz/query-service:${DOCKER_TAG:-0.59.0}
container_name: signoz-query-service
command:
[
Expand Down Expand Up @@ -201,7 +201,7 @@ services:
<<: *db-depend

frontend:
image: signoz/frontend:${DOCKER_TAG:-0.56.0}
image: signoz/frontend:${DOCKER_TAG:-0.59.0}
container_name: signoz-frontend
restart: on-failure
depends_on:
Expand All @@ -213,7 +213,7 @@ services:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector-migrator-sync:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.5}
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.9}
container_name: otel-migrator-sync
command:
- "sync"
Expand All @@ -228,7 +228,7 @@ services:
# condition: service_healthy

otel-collector-migrator-async:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.5}
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.9}
container_name: otel-migrator-async
command:
- "async"
Expand All @@ -245,7 +245,7 @@ services:
# condition: service_healthy

otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.111.5}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.111.9}
container_name: signoz-otel-collector
command:
[
Expand Down
8 changes: 4 additions & 4 deletions deploy/docker/clickhouse-setup/docker-compose.testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ services:
# Notes for Maintainers/Contributors who will change Line Numbers of Frontend & Query-Section. Please Update Line Numbers in `./scripts/commentLinesForSetup.sh` & `./CONTRIBUTING.md`

query-service:
image: signoz/query-service:${DOCKER_TAG:-0.56.0}
image: signoz/query-service:${DOCKER_TAG:-0.59.0}
container_name: signoz-query-service
command:
[
Expand Down Expand Up @@ -208,7 +208,7 @@ services:
<<: *db-depend

frontend:
image: signoz/frontend:${DOCKER_TAG:-0.56.0}
image: signoz/frontend:${DOCKER_TAG:-0.59.0}
container_name: signoz-frontend
restart: on-failure
depends_on:
Expand All @@ -220,7 +220,7 @@ services:
- ../common/nginx-config.conf:/etc/nginx/conf.d/default.conf

otel-collector-migrator:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.5}
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.111.9}
container_name: otel-migrator
command:
- "--dsn=tcp://clickhouse:9000"
Expand All @@ -234,7 +234,7 @@ services:


otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.111.5}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.111.9}
container_name: signoz-otel-collector
command:
[
Expand Down
8 changes: 5 additions & 3 deletions ee/query-service/app/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ type APIHandlerOptions struct {
Cache cache.Cache
Gateway *httputil.ReverseProxy
// Querier Influx Interval
FluxInterval time.Duration
UseLogsNewSchema bool
UseLicensesV3 bool
FluxInterval time.Duration
UseLogsNewSchema bool
UseTraceNewSchema bool
UseLicensesV3 bool
}

type APIHandler struct {
Expand All @@ -66,6 +67,7 @@ func NewAPIHandler(opts APIHandlerOptions) (*APIHandler, error) {
Cache: opts.Cache,
FluxInterval: opts.FluxInterval,
UseLogsNewSchema: opts.UseLogsNewSchema,
UseTraceNewSchema: opts.UseTraceNewSchema,
UseLicensesV3: opts.UseLicensesV3,
})

Expand Down
45 changes: 22 additions & 23 deletions ee/query-service/app/api/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,31 @@ package api

import (
"net/http"

"go.signoz.io/signoz/ee/query-service/app/db"
"go.signoz.io/signoz/ee/query-service/model"
baseapp "go.signoz.io/signoz/pkg/query-service/app"
basemodel "go.signoz.io/signoz/pkg/query-service/model"
"go.uber.org/zap"
)

func (ah *APIHandler) searchTraces(w http.ResponseWriter, r *http.Request) {

if !ah.CheckFeature(basemodel.SmartTraceDetail) {
zap.L().Info("SmartTraceDetail feature is not enabled in this plan")
ah.APIHandler.SearchTraces(w, r)
return
}
searchTracesParams, err := baseapp.ParseSearchTracesParams(r)
if err != nil {
RespondError(w, &model.ApiError{Typ: model.ErrorBadData, Err: err}, "Error reading params")
return
}

result, err := ah.opts.DataConnector.SearchTraces(r.Context(), searchTracesParams, db.SmartTraceAlgorithm)
if ah.HandleError(w, err, http.StatusBadRequest) {
return
}

ah.WriteJSON(w, r, result)
ah.APIHandler.SearchTraces(w, r)
return

// This is commented since this will be taken care by new trace API

// if !ah.CheckFeature(basemodel.SmartTraceDetail) {
// zap.L().Info("SmartTraceDetail feature is not enabled in this plan")
// ah.APIHandler.SearchTraces(w, r)
// return
// }
// searchTracesParams, err := baseapp.ParseSearchTracesParams(r)
// if err != nil {
// RespondError(w, &model.ApiError{Typ: model.ErrorBadData, Err: err}, "Error reading params")
// return
// }

// result, err := ah.opts.DataConnector.SearchTraces(r.Context(), searchTracesParams, db.SmartTraceAlgorithm)
// if ah.HandleError(w, err, http.StatusBadRequest) {
// return
// }

// ah.WriteJSON(w, r, result)

}
3 changes: 2 additions & 1 deletion ee/query-service/app/db/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ func NewDataConnector(
dialTimeout time.Duration,
cluster string,
useLogsNewSchema bool,
useTraceNewSchema bool,
) *ClickhouseReader {
ch := basechr.NewReader(localDB, promConfigPath, lm, maxIdleConns, maxOpenConns, dialTimeout, cluster, useLogsNewSchema)
ch := basechr.NewReader(localDB, promConfigPath, lm, maxIdleConns, maxOpenConns, dialTimeout, cluster, useLogsNewSchema, useTraceNewSchema)
return &ClickhouseReader{
conn: ch.GetConn(),
appdb: localDB,
Expand Down
10 changes: 8 additions & 2 deletions ee/query-service/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ type ServerOptions struct {
Cluster string
GatewayUrl string
UseLogsNewSchema bool
UseTraceNewSchema bool
UseLicensesV3 bool
}

Expand Down Expand Up @@ -156,6 +157,7 @@ func NewServer(serverOptions *ServerOptions) (*Server, error) {
serverOptions.DialTimeout,
serverOptions.Cluster,
serverOptions.UseLogsNewSchema,
serverOptions.UseTraceNewSchema,
)
go qb.Start(readerReady)
reader = qb
Expand Down Expand Up @@ -189,6 +191,7 @@ func NewServer(serverOptions *ServerOptions) (*Server, error) {
serverOptions.DisableRules,
lm,
serverOptions.UseLogsNewSchema,
serverOptions.UseTraceNewSchema,
)

if err != nil {
Expand Down Expand Up @@ -270,6 +273,7 @@ func NewServer(serverOptions *ServerOptions) (*Server, error) {
FluxInterval: fluxInterval,
Gateway: gatewayProxy,
UseLogsNewSchema: serverOptions.UseLogsNewSchema,
UseTraceNewSchema: serverOptions.UseTraceNewSchema,
UseLicensesV3: serverOptions.UseLicensesV3,
}

Expand Down Expand Up @@ -737,7 +741,8 @@ func makeRulesManager(
cache cache.Cache,
disableRules bool,
fm baseint.FeatureLookup,
useLogsNewSchema bool) (*baserules.Manager, error) {
useLogsNewSchema bool,
useTraceNewSchema bool) (*baserules.Manager, error) {

// create engine
pqle, err := pqle.FromConfigPath(promConfigPath)
Expand Down Expand Up @@ -767,8 +772,9 @@ func makeRulesManager(
EvalDelay: baseconst.GetEvalDelay(),

PrepareTaskFunc: rules.PrepareTaskFunc,
PrepareTestRuleFunc: rules.TestNotification,
UseLogsNewSchema: useLogsNewSchema,
UseTraceNewSchema: useTraceNewSchema,
PrepareTestRuleFunc: rules.TestNotification,
}

// create Manager
Expand Down
3 changes: 3 additions & 0 deletions ee/query-service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func main() {
var cluster string

var useLogsNewSchema bool
var useTraceNewSchema bool
var useLicensesV3 bool
var cacheConfigPath, fluxInterval string
var enableQueryServiceLogOTLPExport bool
Expand All @@ -105,6 +106,7 @@ func main() {
var gatewayUrl string

flag.BoolVar(&useLogsNewSchema, "use-logs-new-schema", false, "use logs_v2 schema for logs")
flag.BoolVar(&useTraceNewSchema, "use-trace-new-schema", false, "use new schema for traces")
flag.BoolVar(&useLicensesV3, "use-licenses-v3", false, "use licenses_v3 schema for licenses")
flag.StringVar(&promConfigPath, "config", "./config/prometheus.yml", "(prometheus config to read metrics)")
flag.StringVar(&skipTopLvlOpsPath, "skip-top-level-ops", "", "(config file to skip top level operations)")
Expand Down Expand Up @@ -145,6 +147,7 @@ func main() {
Cluster: cluster,
GatewayUrl: gatewayUrl,
UseLogsNewSchema: useLogsNewSchema,
UseTraceNewSchema: useTraceNewSchema,
UseLicensesV3: useLicensesV3,
}

Expand Down
2 changes: 2 additions & 0 deletions ee/query-service/rules/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func PrepareTaskFunc(opts baserules.PrepareTaskOptions) (baserules.Task, error)
opts.FF,
opts.Reader,
opts.UseLogsNewSchema,
opts.UseTraceNewSchema,
baserules.WithEvalDelay(opts.ManagerOpts.EvalDelay),
)

Expand Down Expand Up @@ -122,6 +123,7 @@ func TestNotification(opts baserules.PrepareTestRuleOptions) (int, *basemodel.Ap
opts.FF,
opts.Reader,
opts.UseLogsNewSchema,
opts.UseTraceNewSchema,
baserules.WithSendAlways(),
baserules.WithSendUnmatched(),
)
Expand Down
1 change: 1 addition & 0 deletions frontend/public/Icons/broom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions frontend/public/Icons/infraContainers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions frontend/public/locales/en-GB/infraMonitoring.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"containers_visualization_message": "The ability to visualise containers is in active development and should be available to you soon.",
"processes_visualization_message": "The ability to visualise processes is in active development and should be available to you soon.",
"working_message": "We're working to extend infrastructure monitoring to take care of a bunch of different cases. Thank you for your patience.",
"waitlist_message": "Join the waitlist for early access or contact support.",
"contact_support": "Contact Support"
}
3 changes: 2 additions & 1 deletion frontend/public/locales/en-GB/titles.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,6 @@
"SUPPORT": "SigNoz | Support",
"DEFAULT": "Open source Observability Platform | SigNoz",
"ALERT_HISTORY": "SigNoz | Alert Rule History",
"ALERT_OVERVIEW": "SigNoz | Alert Rule Overview"
"ALERT_OVERVIEW": "SigNoz | Alert Rule Overview",
"INFRASTRUCTURE_MONITORING_HOSTS": "SigNoz | Infra Monitoring"
}
7 changes: 7 additions & 0 deletions frontend/public/locales/en/infraMonitoring.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"containers_visualization_message": "The ability to visualise containers is in active development and should be available to you soon.",
"processes_visualization_message": "The ability to visualise processes is in active development and should be available to you soon.",
"working_message": "We're working to extend infrastructure monitoring to take care of a bunch of different cases. Thank you for your patience.",
"waitlist_message": "Join the waitlist for early access or contact support.",
"contact_support": "Contact Support"
}
3 changes: 2 additions & 1 deletion frontend/public/locales/en/titles.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
"INTEGRATIONS": "SigNoz | Integrations",
"ALERT_HISTORY": "SigNoz | Alert Rule History",
"ALERT_OVERVIEW": "SigNoz | Alert Rule Overview",
"MESSAGING_QUEUES": "SigNoz | Messaging Queues"
"MESSAGING_QUEUES": "SigNoz | Messaging Queues",
"INFRASTRUCTURE_MONITORING_HOSTS": "SigNoz | Infra Monitoring"
}
12 changes: 12 additions & 0 deletions frontend/src/AppRoutes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,18 @@ function App(): JSX.Element {

setRoutes(newRoutes);
}

const isInfraMonitoringEnabled =
allFlags.find((flag) => flag.name === FeatureKeys.HOSTS_INFRA_MONITORING)
?.active || false;

if (!isInfraMonitoringEnabled) {
const newRoutes = routes.filter(
(route) => route?.path !== ROUTES.INFRASTRUCTURE_MONITORING_HOSTS,
);

setRoutes(newRoutes);
}
});

const isOnBasicPlan =
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/AppRoutes/pageComponents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,10 @@ export const MQDetailPage = Loadable(
/* webpackChunkName: "MQDetailPage" */ 'pages/MessagingQueues/MQDetailPage'
),
);

export const InfrastructureMonitoring = Loadable(
() =>
import(
/* webpackChunkName: "InfrastructureMonitoring" */ 'pages/InfrastructureMonitoring'
),
);
Loading

0 comments on commit b1a6489

Please sign in to comment.