Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v0.52.x #5704

Merged
merged 50 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
fff9954
Schedule maintainence release changes (#5585)
SagarRajput-7 Jul 31, 2024
ae19eaa
feat: redirect to original page after login (#5604)
rahulkeswani101 Aug 1, 2024
d9e94a4
feat: windows onboarding in cloud (#5525)
UnCool-0x Aug 1, 2024
a8e4359
fix: logs context not working because of incorrect request data (#5595)
vikrantgupta25 Aug 1, 2024
3783ffd
feat: show log severity indicator based on severity number if it's av…
raj-k-singh Aug 1, 2024
08a4150
chore: added service name and time params for top level operations (#…
vikrantgupta25 Aug 1, 2024
fff6137
fix: mount root path in /hostfs for hostmetrics (#5534)
prashant-shahi Aug 2, 2024
16dc90b
chore(telemetry): add telemetry for metrics query type and count prom…
srikanthccv Aug 2, 2024
a5d5800
feat: enable pagination for service listing,key operations,explorer t…
YounixM Aug 2, 2024
0021b4d
chore(deps): bump fast-loops from 1.1.3 to 1.1.4 in /frontend (#5465)
dependabot[bot] Aug 5, 2024
f9d1494
feat: added support for units for formula columns in table panel type…
vikrantgupta25 Aug 5, 2024
61e6316
feat: add 1 month option in time range (#5639)
YounixM Aug 5, 2024
481bb6e
feat: add consumer and producer APIs
shivanshuraj1333 Jul 26, 2024
5c3ce14
chore: add queue type
shivanshuraj1333 Jul 26, 2024
063c9ad
chore: pr-reviews
shivanshuraj1333 Jul 26, 2024
3ff0aa4
chore: consumer group filtering
shivanshuraj1333 Jul 31, 2024
c957c0f
chore: addressing review comments
shivanshuraj1333 Aug 5, 2024
4a4c9f2
chore: add Reduce To for pie chart (#5629)
srikanthccv Aug 5, 2024
9f7b254
Merge branch 'develop' into api-kafka
shivanshuraj1333 Aug 6, 2024
80a7b9d
feat: added link for dashboard name (#5544)
rahulkeswani101 Aug 6, 2024
5cedd57
Merge branch 'develop' into api-kafka
shivanshuraj1333 Aug 6, 2024
abe6597
Merge pull request #5542 from shivanshuraj1333/api-kafka
shivanshuraj1333 Aug 6, 2024
a6848f6
fix: added card to show message for deleted alert id (#5565)
rahulkeswani101 Aug 6, 2024
b819a90
feat: added links to integrations page in onboarding section (#5606)
rahulkeswani101 Aug 6, 2024
fd6f057
fix: make timeshift work with cache (#5646)
srikanthccv Aug 6, 2024
ae325ec
chore: handle traceID search 404 performance issue (#5654)
makeavish Aug 8, 2024
eb14649
Feat: QS: query builder suggestions api v0 (#5634)
raj-k-singh Aug 8, 2024
6781c29
feat: tests for alert channels settings (#5563)
ahmadshaheer Aug 8, 2024
fe398bc
feat: my settings page tests (#5499)
ahmadshaheer Aug 8, 2024
6f73bb6
feat: login flow tests (#5540)
ahmadshaheer Aug 8, 2024
f031845
chore: make eval delay configurable (#5649)
srikanthccv Aug 8, 2024
5219936
chore: fix error message typo on update log field api (#5660)
kobecal Aug 9, 2024
bb84960
chore: add alerts state history query service impl (#5255)
srikanthccv Aug 9, 2024
62be3e7
chore: enable caching for all panel types in metrics v4 (#5651)
srikanthccv Aug 9, 2024
06c0754
chore: add eval tests for threshold rule (#5398)
srikanthccv Aug 9, 2024
4489df6
feat: add runningDiff function (#5667)
srikanthccv Aug 9, 2024
a4878f6
chore: updated k8s instructions (#5665)
Calm-Rock Aug 9, 2024
156905a
fix: send alert default annotations for missing data alert (#5315)
srikanthccv Aug 9, 2024
0157b47
chore: add empty labels to response (#5668)
srikanthccv Aug 9, 2024
1879274
fix: clean out the panel type change attribute dependency (#5648)
vikrantgupta25 Aug 11, 2024
f3d73f6
feat: use selected columns as pinned attributes (#5601)
vikrantgupta25 Aug 12, 2024
0dca123
feat: add beta tag for service map and light mode (#5674)
YounixM Aug 12, 2024
7811fdd
fix: nil pointer dereference for empty payload (#5680)
srikanthccv Aug 12, 2024
e2e965b
chore: zeus features (#5686)
makeavish Aug 14, 2024
e85b405
fix: dashboards listing and details page css fixes (#5672)
YounixM Aug 14, 2024
9856335
fix: hide beta icon in sidebar collapsed view (#5693)
YounixM Aug 14, 2024
6c634b9
Feat: QS: query range progress api (#5671)
raj-k-singh Aug 14, 2024
1308f0f
feat: move chat support behind paywall (#5673)
YounixM Aug 14, 2024
766a212
Merge branch 'main' into release/v0.52.x
prashant-shahi Aug 15, 2024
703983a
chore(signoz): 📌 pin versions: SigNoz 0.52.0, SigNoz OtelCollector 0.…
prashant-shahi Aug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 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.51.0
image: signoz/query-service:0.52.0
command:
[
"-config=/root/config/prometheus.yml",
Expand Down Expand Up @@ -186,7 +186,7 @@ services:
<<: *db-depend

frontend:
image: signoz/frontend:0.48.0
image: signoz/frontend:0.52.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.102.3
image: signoz/signoz-otel-collector:0.102.4
command:
[
"--config=/etc/otel-collector-config.yaml",
Expand All @@ -211,6 +211,7 @@ services:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./otel-collector-opamp-config.yaml:/etc/manager-config.yaml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /:/hostfs:ro
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name={{.Node.Hostname}},os.type={{.Node.Platform.OS}},dockerswarm.service.name={{.Service.Name}},dockerswarm.task.name={{.Task.Name}}
- DOCKER_MULTI_NODE_CLUSTER=false
Expand All @@ -237,7 +238,7 @@ services:
- query-service

otel-collector-migrator:
image: signoz/signoz-schema-migrator:0.102.3
image: signoz/signoz-schema-migrator:0.102.4
deploy:
restart_policy:
condition: on-failure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ receivers:
# endpoint: 0.0.0.0:6832
hostmetrics:
collection_interval: 30s
root_path: /hostfs
scrapers:
cpu: {}
load: {}
Expand Down
6 changes: 4 additions & 2 deletions deploy/docker/clickhouse-setup/docker-compose-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ services:
- --storage.path=/data

otel-collector-migrator:
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.102.3}
image: signoz/signoz-schema-migrator:${OTELCOL_TAG:-0.102.4}
container_name: otel-migrator
command:
- "--dsn=tcp://clickhouse:9000"
Expand All @@ -81,7 +81,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.102.3
image: signoz/signoz-otel-collector:0.102.4
command:
[
"--config=/etc/otel-collector-config.yaml",
Expand All @@ -93,6 +93,8 @@ services:
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./otel-collector-opamp-config.yaml:/etc/manager-config.yaml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /:/hostfs:ro
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
ports:
Expand Down
9 changes: 5 additions & 4 deletions deploy/docker/clickhouse-setup/docker-compose.testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,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.51.0}
image: signoz/query-service:${DOCKER_TAG:-0.52.0}
container_name: signoz-query-service
command:
[
Expand Down Expand Up @@ -204,7 +204,7 @@ services:
<<: *db-depend

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

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


otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.102.3}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.102.4}
container_name: signoz-otel-collector
command:
[
Expand All @@ -244,6 +244,7 @@ services:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./otel-collector-opamp-config.yaml:/etc/manager-config.yaml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /:/hostfs:ro
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
- DOCKER_MULTI_NODE_CLUSTER=false
Expand Down
9 changes: 5 additions & 4 deletions deploy/docker/clickhouse-setup/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,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.51.0}
image: signoz/query-service:${DOCKER_TAG:-0.52.0}
container_name: signoz-query-service
command:
[
Expand Down Expand Up @@ -203,7 +203,7 @@ services:
<<: *db-depend

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

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


otel-collector:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.102.3}
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.102.4}
container_name: signoz-otel-collector
command:
[
Expand All @@ -243,6 +243,7 @@ services:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- ./otel-collector-opamp-config.yaml:/etc/manager-config.yaml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /:/hostfs:ro
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
- DOCKER_MULTI_NODE_CLUSTER=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ receivers:
# endpoint: 0.0.0.0:6832
hostmetrics:
collection_interval: 30s
root_path: /hostfs
scrapers:
cpu: {}
load: {}
Expand Down
122 changes: 122 additions & 0 deletions ee/query-service/app/api/featureFlags.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,48 @@
package api

import (
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"time"

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

func (ah *APIHandler) getFeatureFlags(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
featureSet, err := ah.FF().GetFeatureFlags()
if err != nil {
ah.HandleError(w, err, http.StatusInternalServerError)
return
}

if constants.FetchFeatures == "true" {
zap.L().Debug("fetching license")
license, err := ah.LM().GetRepo().GetActiveLicense(ctx)
if err != nil {
zap.L().Error("failed to fetch license", zap.Error(err))
} else if license == nil {
zap.L().Debug("no active license found")
} else {
licenseKey := license.Key

zap.L().Debug("fetching zeus features")
zeusFeatures, err := fetchZeusFeatures(constants.ZeusFeaturesURL, licenseKey)
if err == nil {
zap.L().Debug("fetched zeus features", zap.Any("features", zeusFeatures))
// merge featureSet and zeusFeatures in featureSet with higher priority to zeusFeatures
featureSet = MergeFeatureSets(zeusFeatures, featureSet)
} else {
zap.L().Error("failed to fetch zeus features", zap.Error(err))
}
}
}

if ah.opts.PreferSpanMetrics {
for idx := range featureSet {
feature := &featureSet[idx]
Expand All @@ -20,5 +51,96 @@ func (ah *APIHandler) getFeatureFlags(w http.ResponseWriter, r *http.Request) {
}
}
}

ah.Respond(w, featureSet)
}

// fetchZeusFeatures makes an HTTP GET request to the /zeusFeatures endpoint
// and returns the FeatureSet.
func fetchZeusFeatures(url, licenseKey string) (basemodel.FeatureSet, error) {
// Check if the URL is empty
if url == "" {
return nil, fmt.Errorf("url is empty")
}

// Check if the licenseKey is empty
if licenseKey == "" {
return nil, fmt.Errorf("licenseKey is empty")
}

// Creating an HTTP client with a timeout for better control
client := &http.Client{
Timeout: 10 * time.Second,
}
// Creating a new GET request
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, fmt.Errorf("failed to create request: %w", err)
}

// Setting the custom header
req.Header.Set("X-Signoz-Cloud-Api-Key", licenseKey)

// Making the GET request
resp, err := client.Do(req)
if err != nil {
return nil, fmt.Errorf("failed to make GET request: %w", err)
}
defer func() {
if resp != nil {
resp.Body.Close()
}
}()

// Check for non-OK status code
if resp.StatusCode != http.StatusOK {
return nil, fmt.Errorf("%w: %d %s", errors.New("received non-OK HTTP status code"), resp.StatusCode, http.StatusText(resp.StatusCode))
}

// Reading and decoding the response body
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, fmt.Errorf("failed to read response body: %w", err)
}

var zeusResponse ZeusFeaturesResponse
if err := json.Unmarshal(body, &zeusResponse); err != nil {
return nil, fmt.Errorf("%w: %v", errors.New("failed to decode response body"), err)
}

if zeusResponse.Status != "success" {
return nil, fmt.Errorf("%w: %s", errors.New("failed to fetch zeus features"), zeusResponse.Status)
}

return zeusResponse.Data, nil
}

type ZeusFeaturesResponse struct {
Status string `json:"status"`
Data basemodel.FeatureSet `json:"data"`
}

// MergeFeatureSets merges two FeatureSet arrays with precedence to zeusFeatures.
func MergeFeatureSets(zeusFeatures, internalFeatures basemodel.FeatureSet) basemodel.FeatureSet {
// Create a map to store the merged features
featureMap := make(map[string]basemodel.Feature)

// Add all features from the otherFeatures set to the map
for _, feature := range internalFeatures {
featureMap[feature.Name] = feature
}

// Add all features from the zeusFeatures set to the map
// If a feature already exists (i.e., same name), the zeusFeature will overwrite it
for _, feature := range zeusFeatures {
featureMap[feature.Name] = feature
}

// Convert the map back to a FeatureSet slice
var mergedFeatures basemodel.FeatureSet
for _, feature := range featureMap {
mergedFeatures = append(mergedFeatures, feature)
}

return mergedFeatures
}
Loading
Loading