mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-06-04 11:25:52 +08:00
Merge branch 'develop' into bump-json-iterator
This commit is contained in:
commit
023ef66035
@ -5,9 +5,11 @@ receivers:
|
||||
# otel-collector internal metrics
|
||||
- job_name: "otel-collector"
|
||||
scrape_interval: 60s
|
||||
static_configs:
|
||||
- targets:
|
||||
- otel-collector:8888
|
||||
dns_sd_configs:
|
||||
- names:
|
||||
- 'tasks.otel-collector'
|
||||
type: 'A'
|
||||
port: 8888
|
||||
# otel-collector-metrics internal metrics
|
||||
- job_name: "otel-collector-metrics"
|
||||
scrape_interval: 60s
|
||||
@ -17,9 +19,11 @@ receivers:
|
||||
# SigNoz span metrics
|
||||
- job_name: "signozspanmetrics-collector"
|
||||
scrape_interval: 60s
|
||||
static_configs:
|
||||
- targets:
|
||||
- otel-collector:8889
|
||||
dns_sd_configs:
|
||||
- names:
|
||||
- 'tasks.otel-collector'
|
||||
type: 'A'
|
||||
port: 8889
|
||||
|
||||
processors:
|
||||
batch:
|
||||
|
@ -374,14 +374,21 @@ func (r *ClickHouseReader) GetChannel(id string) (*model.ChannelItem, *model.Api
|
||||
idInt, _ := strconv.Atoi(id)
|
||||
channel := model.ChannelItem{}
|
||||
|
||||
query := fmt.Sprintf("SELECT id, created_at, updated_at, name, type, data data FROM notification_channels WHERE id=%d", idInt)
|
||||
query := "SELECT id, created_at, updated_at, name, type, data data FROM notification_channels WHERE id=? "
|
||||
|
||||
err := r.localDB.Get(&channel, query)
|
||||
stmt, err := r.localDB.Preparex(query)
|
||||
|
||||
zap.S().Info(query)
|
||||
zap.S().Info(query, idInt)
|
||||
|
||||
if err != nil {
|
||||
zap.S().Debug("Error in processing sql query: ", err)
|
||||
zap.S().Debug("Error in preparing sql query for GetChannel : ", err)
|
||||
return nil, &model.ApiError{Typ: model.ErrorInternal, Err: err}
|
||||
}
|
||||
|
||||
err = stmt.Get(&channel, idInt)
|
||||
|
||||
if err != nil {
|
||||
zap.S().Debug(fmt.Sprintf("Error in getting channel with id=%d : ", idInt), err)
|
||||
return nil, &model.ApiError{Typ: model.ErrorInternal, Err: err}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user