Skip to content

Commit

Permalink
docs: Document using actionset labels to extend logs (#2981)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
hairyhum and mergify[bot] authored Jul 17, 2024
1 parent 8b5c9b0 commit 62de235
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Tasks

tasks/argo.rst
tasks/logs_level.rst
tasks/logs_labels.rst
tasks/logs.rst
tasks/scaleworkload.rst
27 changes: 27 additions & 0 deletions docs/tasks/logs_labels.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Configuring logs for specific ActionSets
----------------------------------------

Kanister uses structured logging to ensure that its logs can be easily
categorized, indexed and searched by downstream log aggregation software.

Extra fields can be added to the logs related to a specific ActionSet by adding
a label in the ActionSet with ``kanister.io`` prefix.

For example:

.. code-block:: yaml
:linenos:
apiVersion: cr.kanister.io/v1alpha1
kind: ActionSet
metadata:
namespace: kanister
name: myActionSet
labels:
kanister.io/myFieldName: myFieldValue
All logs concerning this ActionSet execution will have
``myFieldName`` field with ``myFieldValue`` value.



1 change: 1 addition & 0 deletions docs_new/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default defineConfig({
link: "/tasks/logs",
},
{ text: "Modifying Kanister Log Level", link: "/tasks/logs_level" },
{ text: "Configuring logs for specific ActionSets", link: "/tasks/logs_labels" },
{
text: "Using ScaleWorkload function with output artifact",
link: "/tasks/scaleworkload",
Expand Down
1 change: 1 addition & 0 deletions docs_new/generatedSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = [
{ text: "Argo.md", link: "/tasks/argo" },
{ text: "Logs.md", link: "/tasks/logs" },
{ text: "Logs_level.md", link: "/tasks/logs_level" },
{ text: "logs_labels.md", link: "/tasks/logs_labels" },
{ text: "Scaleworkload.md", link: "/tasks/scaleworkload" },
],
},
Expand Down
23 changes: 23 additions & 0 deletions docs_new/tasks/logs_labels.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configuring logs for specific ActionSets

Kanister uses structured logging to ensure that its logs can be easily
categorized, indexed and searched by downstream log aggregation software.

Extra fields can be added to the logs related to a specific ActionSet by adding
a label in the ActionSet with `kanister.io` prefix.

For example:

``` yaml
apiVersion: cr.kanister.io/v1alpha1
kind: ActionSet
metadata:
namespace: kanister
name: myActionSet
labels:
kanister.io/myFieldName: myFieldValue

```

All logs concerning this ActionSet execution will have
`myFieldName` field with `myFieldValue` value.

0 comments on commit 62de235

Please sign in to comment.