Skip to content
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] Add option to define OTTL with declarative syntax #11852

Closed
TylerHelmuth opened this issue Jun 30, 2022 · 6 comments
Closed
Labels
never stale Issues marked with this label will be never staled and automatically removed pkg/ottl priority:p3 Lowest processor/transform Transform processor

Comments

@TylerHelmuth
Copy link
Member

TylerHelmuth commented Jun 30, 2022

Is your feature request related to a problem? Please describe.
Currently the only way to interact with the OpenTelemetry Transformation Language is to use the language's SQL-style syntax:

set(attribute["test"], "pass") where attribute["syntax style"] == "SQL"

This works great for the transform processor since it is a new component with no new users and no existing patterns, but for other components this may be a barrier of entry.

With the OTTL being moved to is own package (#11751) it needs to be as accessible as possible. If existing components want to take advantage of the language, it will be more natural to use a declarative syntax instead of the SQL syntax.

Describe the solution you'd like
The OTTL package should be able to interpret the SQL-like syntax that it can today AND the ability to interpret a declarative syntax. At least to start, I do not think it should allow both types of input at the same time; it should be one or the other.

All outputs and functionality of the package should remain the same. The only change should be its ability to interpret a new type of input.

Additional context
A declarative syntax for the telemetry query language has already been discussed in the collector's processing doc

@TylerHelmuth TylerHelmuth added priority:p2 Medium processor/transform Transform processor labels Jun 30, 2022
@TylerHelmuth
Copy link
Member Author

@anuraaga any thoughts?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Nov 9, 2022
@TylerHelmuth TylerHelmuth added never stale Issues marked with this label will be never staled and automatically removed priority:p3 Lowest and removed Stale priority:p1 High labels Nov 9, 2022
@TylerHelmuth TylerHelmuth changed the title [processor/transform] Add option to define TQL with declarative syntax [processor/transform] Add option to define OTTL with declarative syntax Feb 14, 2023
@kentquirk
Copy link
Member

I guess I see the logic in this, although I'm not excited about the idea of having to maintain two parallel syntaxes. It might be worth implementing one of the syntaxes in terms of the other one, to make sure they don't easily fall out of sync.

@TylerHelmuth
Copy link
Member Author

I am not familiar with it yet, but both @Aneurysm9 and @bogdandrutu have mentioned the confmap.Converter interface as something to help with this switching between a declarative syntax and SQL-like syntax.

I also think we only need to support the Declarative -> SQL direction. I don't see a need to support converting from SQL to Declarative.

@TylerHelmuth TylerHelmuth removed their assignment May 24, 2023
@evan-bradley
Copy link
Contributor

After thinking about this for a while and looking at why OTTL was implemented as a DSL and not as a transformation solution configured through YAML, I think we should shelve this for now in favor of implementing #18642 to standardize components on OTTL. In the future it may make sense to offer APIs that expose OTTL's AST for allowing code to generate OTTL statements, but we should only implement that with a strong justification.

@andrzej-stencel andrzej-stencel closed this as not planned Won't fix, can't repro, duplicate, stale May 29, 2024
@andrzej-stencel
Copy link
Member

Changed to "Closed as not planned", seems to better reflect the outcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
never stale Issues marked with this label will be never staled and automatically removed pkg/ottl priority:p3 Lowest processor/transform Transform processor
Projects
None yet
Development

No branches or pull requests

4 participants