-
Notifications
You must be signed in to change notification settings - Fork 165
Description
Is your feature request related to a problem?
Comment indicates user-provided text. Adding comments to PPL search query is very useful to explain a portion of a search. Block comments and line comments are both supported in SQL query. But neither of them are supported in PPL query.
What solution would you like?
The proposed solution is adding both block comment /* ... */
and line comment //
support for PPL.
For example:
source=otel_logs /* Timestamped text record generated by OpenTelemetry framework */
| where kind = 'SPAN_KIND_CLIENT' // only calculate on client
| eval r = 0.99 /* precision */ | stats sum(droppedEventsCount * r) as lostEvents
Besides explanation, line comment can be used to troubleshoot a search.
For example, assuming the above query return 0
, you can comment before | eval
to identify the kind
you pointing is correct.
source=otel_logs | where kind = 'SPAN_KIND_CLIENT' // | eval r = 0.99 | stats sum(droppedEventsCount * r) as lostEvents
What alternatives have you considered?
Non alternatives.
Do you have any additional context?
Add any other context or screenshots about the feature request here.