Skip to content

Commit

Permalink
Fix some linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
weiiwang01 committed Feb 29, 2024
1 parent 1633211 commit 982b438
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/cos.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def _scrape_configs(self) -> dict:
}
}
},
{"labelallow": ["request_time_ms"]},
{
"metrics": {
"request_duration_microseconds": {
Expand Down
13 changes: 3 additions & 10 deletions tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ def test_wordpress_promtail_config(harness: ops.testing.Harness):
for static_config in scrape_config["static_configs"]:
if "job" in static_config["labels"]:
pass

metrics_name = "request_duration_microseconds"
assert harness.charm._logging._promtail_config == {
"clients": [],
"positions": {"filename": "/opt/promtail/positions.yaml"},
Expand Down Expand Up @@ -1021,17 +1021,10 @@ def test_wordpress_promtail_config(harness: ops.testing.Harness):
{
"job_name": "access_log_exporter",
"pipeline_stages": [
{
"logfmt": {
"mapping": {
"request_duration_microseconds": "request_duration_microseconds"
}
}
},
{"labelallow": ["request_time_ms"]},
{"logfmt": {"mapping": {metrics_name: metrics_name}}},
{
"metrics": {
"request_duration_microseconds": {
metrics_name: {
"config": {"buckets": REQUEST_DURATION_MICROSECONDS_BUCKETS},
"prefix": "apache_access_log_",
"source": "request_duration_microseconds",
Expand Down

0 comments on commit 982b438

Please sign in to comment.