2023-10-15 21:04:19 +05:30
|
|
|
package agentConf
|
|
|
|
|
|
2025-06-16 20:07:16 +05:30
|
|
|
import (
|
|
|
|
|
"github.com/SigNoz/signoz/pkg/query-service/model"
|
|
|
|
|
"github.com/SigNoz/signoz/pkg/types/opamptypes"
|
|
|
|
|
"github.com/SigNoz/signoz/pkg/valuer"
|
|
|
|
|
)
|
2023-10-15 21:04:19 +05:30
|
|
|
|
|
|
|
|
// Interface for features implemented via agent config.
|
|
|
|
|
// Eg: ingestion side signal pre-processing features like log processing pipelines etc
|
|
|
|
|
type AgentFeature interface {
|
|
|
|
|
// Must be unique across `AgentFeature`s
|
|
|
|
|
AgentFeatureType() AgentFeatureType
|
|
|
|
|
|
|
|
|
|
// Recommend config for an agent based on its `currentConfYaml` and
|
|
|
|
|
// `configVersion` for the feature's settings
|
|
|
|
|
RecommendAgentConfig(
|
2025-06-16 20:07:16 +05:30
|
|
|
orgId valuer.UUID,
|
2023-10-15 21:04:19 +05:30
|
|
|
currentConfYaml []byte,
|
2025-06-16 20:07:16 +05:30
|
|
|
configVersion *opamptypes.AgentConfigVersion,
|
2023-10-15 21:04:19 +05:30
|
|
|
) (
|
|
|
|
|
recommendedConfYaml []byte,
|
|
|
|
|
|
2025-06-16 20:07:16 +05:30
|
|
|
// stored as agent_config_version.config in current agentConf model
|
2023-10-15 21:04:19 +05:30
|
|
|
// TODO(Raj): maybe refactor agentConf further and clean this up
|
|
|
|
|
serializedSettingsUsed string,
|
|
|
|
|
|
|
|
|
|
apiErr *model.ApiError,
|
|
|
|
|
)
|
|
|
|
|
}
|