Skip to content

[pkg/ottl] Support for data retrieval OTTL expressions #35621

Closed
@lahsivjar

Description

@lahsivjar

Component(s)

pkg/ottl

Is your feature request related to a problem? Please describe.

The ability for components to be able to retrieve data from underlying telemetry using OTTL expressions. As of now, the pkg/ottl provides methods for parsing and evaluating statements and conditions. There seems to be no support for parsing and evaluating paths as well as converters that would define data retrieval expressions. For example:

  • end_time - start_time
  • Microseconds(end_time - start_time)

Allowing retrieval of values using OTTL would help build more generic components. One example use case would be generating metrics from all types of telemetry signals - imagine being able to generate histograms from logs based on attributes as well as spans based on span duration using the same connector. OTTL expressions can be used in this case to extract the data and construct metrics.

Describe the solution you'd like

pkg/ottl to support parsing and evaluating OTTL expressions for data retrieval and conversion.

Describe alternatives you've considered

As a temporary hack, using a get OTTL editor to parse data retrieval expressions as OTTL statements ref

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions