Skip to content

Commit

Permalink
Chore/qs use collector simulator from signoz otel collector (#6539)
Browse files Browse the repository at this point in the history
* chore: qs: logs pipeline preview: use collectorsimulator from signoz-otel-collector

* chore: qs: remove collectorsimulator: located in signoz-otel-collector now
  • Loading branch information
raj-k-singh authored Nov 27, 2024
1 parent 328d955 commit 486632b
Show file tree
Hide file tree
Showing 16 changed files with 9 additions and 1,098 deletions.
12 changes: 9 additions & 3 deletions pkg/query-service/app/logparsingpipeline/preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"strings"
"time"

"github.com/SigNoz/signoz-otel-collector/pkg/collectorsimulator"
_ "github.com/SigNoz/signoz-otel-collector/pkg/parser/grok"
"github.com/SigNoz/signoz-otel-collector/processor/signozlogspipelineprocessor"
"github.com/pkg/errors"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/plog"
"go.opentelemetry.io/collector/processor"
"go.signoz.io/signoz/pkg/query-service/collectorsimulator"
"go.signoz.io/signoz/pkg/query-service/model"
)

Expand Down Expand Up @@ -66,14 +66,20 @@ func SimulatePipelinesProcessing(
return updatedConf, nil
}

outputPLogs, collectorErrs, apiErr := collectorsimulator.SimulateLogsProcessing(
outputPLogs, collectorErrs, simulationErr := collectorsimulator.SimulateLogsProcessing(
ctx,
processorFactories,
configGenerator,
simulatorInputPLogs,
timeout,
)
if apiErr != nil {
if simulationErr != nil {
if errors.Is(simulationErr, collectorsimulator.ErrInvalidConfig) {
apiErr = model.BadRequest(simulationErr)
} else {
apiErr = model.InternalError(simulationErr)
}

return nil, collectorErrs, model.WrapApiError(apiErr,
"could not simulate log pipelines processing.\nCollector errors",
)
Expand Down
265 changes: 0 additions & 265 deletions pkg/query-service/collectorsimulator/collectorsimulator.go

This file was deleted.

16 changes: 0 additions & 16 deletions pkg/query-service/collectorsimulator/inmemoryexporter/config.go

This file was deleted.

This file was deleted.

Loading

0 comments on commit 486632b

Please sign in to comment.