mirror of
https://github.com/hanzoai/otel-collector.git
synced 2026-11-02 13:34:59 +00:00
Brings in a copy of collector simulator from signoz query service. In a follow up, query service collector simulator will be removed and query service will starting using this collector simulator This change will unblock work on issues like https://github.com/SigNoz/engineering-pod/issues/1112 This change will also make it easier to maintain collector simulator whenever signoz-otel-collector is upgraded to a higher upstream version (eg: https://github.com/SigNoz/signoz/pull/6257/files#diff-943188c9097efb17b1b87d9f7166345f1520bb7277eda120832fc1897bf4c490R144) The code has been copied over as-is from https://github.com/SigNoz/signoz/tree/develop/pkg/query-service/collectorsimulator with minor changes to use `error` instead of `*model.ApiError`
13 lines
207 B
Go
13 lines
207 B
Go
package collectorsimulator
|
|
|
|
import (
|
|
"errors"
|
|
"fmt"
|
|
)
|
|
|
|
var ErrInvalidConfig = errors.New("invalid config")
|
|
|
|
func InvalidConfigError(err error) error {
|
|
return fmt.Errorf("%w: %w", ErrInvalidConfig, err)
|
|
}
|