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

Promtail: show a clearer reason in "disable watchConfig" log message when server is disabled #11420

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

zry98
Copy link
Contributor

@zry98 zry98 commented Dec 9, 2023

What this PR does / why we need it:
This PR improves the clarity of log message when the Promtail server is disabled (if server.disable is true in config file, or flag -server.disable is used).

Previously, the reason "promtailServer cast fail" in log message (as below) was ambiguous, leading to confusion about potential error in config file.

level=warn ts=2023-12-09T15:40:24.064376445Z caller=promtail.go:260 msg="disable watchConfig" reason="promtailServer cast fail"

The updated message is more understandable, indicating directly that the Promtail server is disabled.

level=warn ts=2023-12-09T15:50:58.723168763Z caller=promtail.go:260 msg="disable watchConfig" reason="Promtail server is disabled"

Which issue(s) this PR fixes:
N/A.

Special notes for your reviewer:
Should we turn down the log level to INFO?

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • CHANGELOG.md updated
    • If the change is worth mentioning in the release notes, add add-to-release-notes label
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

@zry98 zry98 requested a review from a team as a code owner December 9, 2023 16:07
@CLAassistant
Copy link

CLAassistant commented Dec 9, 2023

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

github-actions bot commented Dec 9, 2023

Trivy scan found the following vulnerabilities:

@cstyan cstyan self-assigned this Jan 5, 2024
@cstyan cstyan merged commit 142d356 into grafana:main Jan 8, 2024
7 checks passed
rhnasc pushed a commit to inloco/loki that referenced this pull request Apr 12, 2024
…when server is disabled (grafana#11420)

**What this PR does / why we need it**:
This PR improves the clarity of log message when the Promtail server is
disabled (if `server.disable` is true in config file, or flag
`-server.disable` is used).

Previously, the reason "promtailServer cast fail" in log message (as
below) was ambiguous, leading to confusion about potential error in
config file.
```
level=warn ts=2023-12-09T15:40:24.064376445Z caller=promtail.go:260 msg="disable watchConfig" reason="promtailServer cast fail"
```

The updated message is more understandable, indicating directly that the
Promtail server is disabled.
```
level=warn ts=2023-12-09T15:50:58.723168763Z caller=promtail.go:260 msg="disable watchConfig" reason="Promtail server is disabled"
```

**Which issue(s) this PR fixes**:
N/A.

**Special notes for your reviewer**:
Should we turn down the log level to INFO?

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](grafana@d10549e)
- [ ] If the change is deprecating or removing a configuration option,
update the `deprecated-config.yaml` and `deleted-config.yaml` files
respectively in the `tools/deprecated-config-checker` directory.
[Example
PR](grafana@0d4416a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants