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

add date time sprig template functions in logql label/line formatter #4603

Merged
merged 3 commits into from
Nov 2, 2021

Commits on Nov 2, 2021

  1. add date time sprig template functions in logql label/line formatter

    With date time sprig template functions, we will be able to filter test jobs which create time is 1 day before as the following:
    ```
    {job="test"} | label_format nowEpoch=`{{(unixEpoch now)}}`,createDateEpoch=`{{unixEpoch (toDate "2006-01-02" .createDate)}}` | label_format dateTimeDiff="{{sub .nowEpoch .createDateEpoch}}" | dateTimeDiff > 86400
    ```
    garrettlish committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    d1fa492 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9a62f28 View commit details
    Browse the repository at this point in the history
  3. resolve comments

    * add golang datetime layout doc reference
    * update CHANGELOG.md accordingly to include this PR
    garrettlish committed Nov 2, 2021
    Configuration menu
    Copy the full SHA
    528ad8e View commit details
    Browse the repository at this point in the history