Skip to content

Commit

Permalink
Move filename from label to structured_metadata (#180)
Browse files Browse the repository at this point in the history
* remove filename from regular labels. Add it to structured_metadata

* linting

* add missing pipeline after merge

* update libs
  • Loading branch information
Abuelodelanada authored Sep 13, 2024
1 parent aab602c commit 8085448
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,12 @@ def _additional_log_configs(self) -> List[Dict[str, Any]]:
"expression": ".*file is a directory.*",
},
},
{
"structured_metadata": {"filename": "filename"},
},
{
"labeldrop": ["filename"],
},
],
"static_configs": [
{
Expand All @@ -477,6 +483,12 @@ def _additional_log_configs(self) -> List[Dict[str, Any]]:
"expression": ".*file is a directory.*",
},
},
{
"structured_metadata": {"filename": "filename"},
},
{
"labeldrop": ["filename"],
},
],
},
]
Expand Down Expand Up @@ -571,6 +583,12 @@ def _snap_plug_job(
"expression": ".*file is a directory.*",
},
},
{
"structured_metadata": {"filename": "filename"},
},
{
"labeldrop": ["filename"],
},
],
}

Expand Down Expand Up @@ -634,7 +652,6 @@ def _snap_plugs_logging_configs(self) -> List[Dict[str, Any]]:
self._path_label(path),
)
shared_logs_configs.append(job)

else:
endpoint_owners = {
endpoint.owner: {
Expand Down

0 comments on commit 8085448

Please sign in to comment.