Skip to content

Commit

Permalink
[PromQL] Added missing trigonometric functions (#3612)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sageder authored Jul 14, 2023
1 parent 8545286 commit c3b0e61
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions promql/PromQLLexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,21 @@ FUNCTION options { caseInsensitive=false; }
| 'stddev_over_time'
| 'stdvar_over_time'
| 'last_over_time'
| 'acos'
| 'acosh'
| 'asin'
| 'asinh'
| 'atan'
| 'atanh'
| 'cos'
| 'cosh'
| 'sin'
| 'sinh'
| 'tan'
| 'tanh'
| 'deg'
| 'pi'
| 'rad'
;

LEFT_BRACE: '{';
Expand Down
3 changes: 2 additions & 1 deletion promql/examples/function.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
day_of_month(timestamp(up{job="prometheus"}))
day_of_month(timestamp(up{job="prometheus"}))
sin(rate(http_requests_total[5m]))

0 comments on commit c3b0e61

Please sign in to comment.