Skip to content

Extract Telemetry Query Language into a package #11751

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

Closed
7 tasks done
TylerHelmuth opened this issue Jun 27, 2022 · 2 comments · Fixed by #12935
Closed
7 tasks done

Extract Telemetry Query Language into a package #11751

TylerHelmuth opened this issue Jun 27, 2022 · 2 comments · Fixed by #12935
Assignees
Labels
priority:p1 High processor/transform Transform processor

Comments

@TylerHelmuth
Copy link
Member

TylerHelmuth commented Jun 27, 2022

The transform processor currently implements the Telemetry Query Language within its internal/common package. In order to expose the TQL so it can be used by anyone, it should be moved to pkg/telemetryquerylanguage.

The TQL would be usable without any of the transform processor's signal contexts or functions, but it wouldn't be very useful. The processor's contexts should also be moved into packages so that the TQL is easily usable with pdata.

Functions might also be movable, but not all functions would be applicable outside the transform processor.

Steps:

  • Move Telemetry Query Language
  • Update Transform Processor to use TQL package
  • Move standard contexts
  • Update Transform Processor to use standard context package(s)
  • Move appropriate functions
  • Update Transform Processor to use new function package(s)
  • Update processor README
@TylerHelmuth TylerHelmuth added priority:p2 Medium processor/transform Transform processor labels Jun 27, 2022
@TylerHelmuth TylerHelmuth added priority:p1 High and removed priority:p2 Medium labels Jun 30, 2022
@TylerHelmuth TylerHelmuth self-assigned this Jul 2, 2022
dmitryax pushed a commit that referenced this issue Jul 26, 2022
In order to facilitate moving functions to their own packages as part of #11751, we need a place to put testGetSetter so it could be reusable. That need cascaded into creating a basic GetSetter that ends up being useful everywhere. Instead of creating a new testLiteral, the existing Literal struct was exposed.
@bogdandrutu
Copy link
Member

@TylerHelmuth I think the primary users of this package are other processors when they want to "select" a subset of the telemetry to apply some transformation/processing. I don't necessary think it is important to not depend on pdata.

@TylerHelmuth
Copy link
Member Author

@bogdandrutu i agree that the primary users will be other processors, but if it continues to live in pkg instead of internal I think we have to support the package in a neutral way. Adding functions that expect pcommon.Map as the returned value of a target for example wouldn't work for someone using the TQL for processing outside the collector (unless of course they are also using pdata).

I think we can move functions that rely on pdata that would be useful outside the transformprocessor but inside the collector to a package in internal. Or maybe so we can support custom component creators we can differentiate in telemetryquerylanguage/functions between functions that would only work in the collector vs functions that could work with any type of Context.

What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p1 High processor/transform Transform processor
Projects
None yet
2 participants