mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 02:59:00 +08:00
fix: minor spelling fixes
This commit is contained in:
parent
500ab02c47
commit
755d64061e
@ -34,7 +34,7 @@ func UpsertLogsParsingProcessor(ctx context.Context, parsingProcessors map[strin
|
||||
return confHash, err
|
||||
}
|
||||
|
||||
BuildLogParsingProcessors(c, parsingProcessors)
|
||||
buildLogParsingProcessors(c, parsingProcessors)
|
||||
|
||||
// get the processor list
|
||||
logs := c["service"].(map[string]interface{})["pipelines"].(map[string]interface{})["logs"]
|
||||
@ -89,7 +89,7 @@ func UpsertLogsParsingProcessor(ctx context.Context, parsingProcessors map[strin
|
||||
// check if the processors already exist
|
||||
// if yes then update the processor.
|
||||
// if something doesn't exists then remove it.
|
||||
func BuildLogParsingProcessors(agentConf, parsingProcessors map[string]interface{}) error {
|
||||
func buildLogParsingProcessors(agentConf, parsingProcessors map[string]interface{}) error {
|
||||
agentProcessors := agentConf["processors"].(map[string]interface{})
|
||||
exists := map[string]struct{}{}
|
||||
for key, params := range parsingProcessors {
|
||||
@ -131,7 +131,7 @@ func buildLogsProcessors(current []interface{}, logsParserPipeline []interface{}
|
||||
existing[name] = i
|
||||
}
|
||||
|
||||
// create mapping from our tracesPipelinePlan (processors managed by us) to position in existing processors (from current config)
|
||||
// create mapping from our logsParserPipeline to position in existing processors (from current config)
|
||||
// this means, if "batch" holds position 3 in the current effective config, and 2 in our config, the map will be [2]: 3
|
||||
specVsExistingMap := map[int]int{}
|
||||
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"go.signoz.io/signoz/pkg/query-service/constants"
|
||||
)
|
||||
|
||||
var BuildProcessorTestData = []struct {
|
||||
var buildProcessorTestData = []struct {
|
||||
Name string
|
||||
agentConf map[string]interface{}
|
||||
pipelineProcessor map[string]interface{}
|
||||
@ -89,9 +89,9 @@ var BuildProcessorTestData = []struct {
|
||||
}
|
||||
|
||||
func TestBuildLogParsingProcessors(t *testing.T) {
|
||||
for _, test := range BuildProcessorTestData {
|
||||
for _, test := range buildProcessorTestData {
|
||||
Convey(test.Name, t, func() {
|
||||
err := BuildLogParsingProcessors(test.agentConf, test.pipelineProcessor)
|
||||
err := buildLogParsingProcessors(test.agentConf, test.pipelineProcessor)
|
||||
So(err, ShouldBeNil)
|
||||
So(test.agentConf, ShouldResemble, test.outputConf)
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user