-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[processor/transform] Move config structure to TQL #13373
[processor/transform] Move config structure to TQL #13373
Conversation
/cc @kentquirk |
} | ||
|
||
// SignalConfig configures TQL queries to execute. | ||
type SignalConfig struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we ever want to have a different config between signals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current config allows configuring different queries per signal, but thats it so far. Haven't come across a use-case yet for the config beside defining the queries themselves.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you thinking instead of a SignalConfig
we'd have TracesConfig
, MetricsConfig
, and LogsConfig
? At the moment all 3 would need the Queries
property and would be duplicates of one another. Have anything in mind that we'd add to one but not the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider having each of Traces, Metrics, and Logs be an interface instead of a struct? That would be something like:
type Queryer interface {
GetQueries() []string
}
Or does that screw up something relating to loading the configurations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe they need to be structs to interact correctly with component.ProcessorFactory
@kentquirk @bogdandrutu please review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question, but if it's not a good idea then this seems fine.
} | ||
|
||
// SignalConfig configures TQL queries to execute. | ||
type SignalConfig struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider having each of Traces, Metrics, and Logs be an interface instead of a struct? That would be something like:
type Queryer interface {
GetQueries() []string
}
Or does that screw up something relating to loading the configurations?
Description:
Moves the basic SQL-like config to config to the TQL. This will allow users of the TQL to use the SQL-like config.
This is a building-block to providing a declarative-like configuration.
Link to tracking Issue:
Works towards #11852
Testing:
Updated unit tests