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

docs: document default log configuration #5289

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

npepinpe
Copy link
Member

Description

This PR documents the logging configuration used by the C8 orchestration cluster.

I've opted to link to the configuration instead of pasting its contents, since this is more likely to get out of sync. I then focused mostly on the ways the user can re-configure it without providing their own log4j2.xml file.

Note that since 8.6, this applies not just to Zeebe, but to C8 as a whole. However, we have no "general" or "streamlined" configuration section, everything is by components =/

I think it would be good to have this, but it may be a bit out of scope here, and a bigger refactoring/rewrite.

When should this change go live?

  • This is a bug fix, security concern, or something that needs urgent release support. (add bug or support label)
  • This is already available but undocumented and should be released within a week. (add available & undocumented label)
  • This is on a specific schedule and the assignee will coordinate a release with the DevEx team. (create draft PR and/or add hold label)
  • This is part of a scheduled alpha or minor. (add alpha or minor label)
  • There is no urgency with this change (add low prio label)

PR Checklist

  • My changes are for an upcoming minor release and:
    • are in the /docs directory (version 8.8).
    • are in the /versioned_docs/version-8.7/ directory (version 8.7).
  • My changes are for an already released minor and are in a /versioned_docs directory.

@npepinpe npepinpe self-assigned this Mar 18, 2025
@npepinpe npepinpe requested review from ChrisKujawa and a team March 18, 2025 19:22
@ChrisKujawa ChrisKujawa added the deploy Stand up a temporary docs site with this PR label Mar 19, 2025
ChrisKujawa
ChrisKujawa previously approved these changes Mar 19, 2025
Copy link
Member

@ChrisKujawa ChrisKujawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @npepinpe 👍🏼 Great improvement 🚀

I'm not sure regarding the mention of optimize and single app, etc. as it is in the zeebe deployment. But as you mention we have still the separate components and no single place for the complete platform.

@akeller do we plan to consolidate the component docs into one, like for the single application? I think I talked about this with @christinaausley recently as well.

Edit: See for example comment here


</Configuration>
```
[You can find the default log4j2.xml used by the application here](https://github.com/camunda/camunda/blob/main/dist/src/main/config/log4j2.xml).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ should we change this to a perma link?

Comment on lines 23 to 26
:::note
[See our documentation on log levels to understand what the various log levels mean.](../../operational-guides/monitoring/log-levels.md)
:::

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼 TIL; I wasnt aware that we document this official

Additionally, it will configure three possible [appenders](https://logging.apache.org/log4j/2.x/manual/appenders.html) (aka outputs):

- `RollingFile`: [A rolling file appender](https://logging.apache.org/log4j/2.x/manual/appenders/rolling-file.html) which prints out to a file
(by default, `logs/zeebe.log` relative from the distribution root). After a day, or once that file reaches 250MB, the file is "rolled" into a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 I would remove this, as this totally depends on the load, log level, connectivity issues, etc.

Suggested change
(by default, `logs/zeebe.log` relative from the distribution root). After a day, or once that file reaches 250MB, the file is "rolled" into a
(by default, `logs/zeebe.log` relative from the distribution root). Once that file reaches 250MB, the file is "rolled" into a

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the <TimeBasedTriggeringPolicy> configured, so it will also roll it after a day if it hasn't reached 250MB.

The TimeBasedTriggeringPolicy causes a rollover, when the smallest time unit in filePattern changes value. So the rollover can occur at the end of a month, week, at midnight, end of the hour, etc.

Since our smallest unit is the day, then after a day (or so I understand) it will rollover.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok I missed that sorry

Comment on lines 47 to 49
[pattern layout](https://logging.apache.org/log4j/2.x/manual/pattern-layout.html), directly to standard out. **This is enabled by default, and is
mutually exclusive with the `Stackdriver` appender. You can select one them via `ZEEBE_LOG_APPENDER`, e.g. `ZEEBE_LOG_APPENDER=Console` or
`ZEEBE_LOG_APPENDER=Stackdriver`.**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 I would first introduce, explain stackdriver and then talk about the mutually exclusivity, etc.


- `ZEEBE_LOG_LEVEL`: will set the level for anything under `io.camunda.zeebe`, i.e. Zeebe related.
- `ATOMIX_LOG_LEVEL`: will set the level for anything clustering or raft related.
- `OPTIMIZE_LOG_LEVEL`: will set the level for anything under `io.camunda.optimize`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Does it make sense to mention this here? As it is related to zeebe deployment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I would assume we will remove it? I actually don't know how much of the shared codebase they will reuse, but we could remove it here considering the overall direction 👍

@github-actions github-actions bot temporarily deployed to camunda-docs March 19, 2025 08:46 Destroyed
Copy link
Member

@akeller akeller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the beginning of us deleting all the component-specific logging pages?!?!?!

@akeller akeller requested a review from conceptualshark March 19, 2025 20:33

</Configuration>
```
You can find the default log4j2.xml used by the application in the [Github repository](https://github.com/camunda/camunda/blob/main/dist/src/main/config/log4j2.xml).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[all.glossary] Inconsistent spelling detected. Use GitHub instead of Github. Review the WCoE glossary - https://confluence.camunda.com/x/b5RZBw .

```
## Default logging configuration

You can find the default log4j2.xml used by the application in the [Github repository](https://github.com/camunda/camunda/blob/main/dist/src/main/config/log4j2.xml).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[all.glossary] Inconsistent spelling detected. Use GitHub instead of Github. Review the WCoE glossary - https://confluence.camunda.com/x/b5RZBw .

```
## Default logging configuration

You can find the default log4j2.xml used by the application in the [Github repository](https://github.com/camunda/camunda/blob/main/dist/src/main/config/log4j2.xml).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[all.glossary] Inconsistent spelling detected. Use GitHub instead of Github. Review the WCoE glossary - https://confluence.camunda.com/x/b5RZBw .

Copy link
Contributor

@conceptualshark conceptualshark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reworded/reorganized a few things, but it shouldn't have changed any of the technical specifics, and I didn't address any of the open questions still on this PR. I did leave one question regarding content. Otherwise this looks good to me, happy to approve if all else is ready to go. 👍

Comment on lines 9 to 11
## Google Stackdriver (JSON) logging

To enable Google Stackdriver compatible JSON logging, set the environment variable `ZEEBE_LOG_APPENDER=Stackdriver` before starting Zeebe.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With Stackdriver now explained in the next section, I'm wondering if this could be removed?

@github-actions github-actions bot temporarily deployed to camunda-docs March 20, 2025 18:57 Destroyed
Copy link
Contributor

The preview environment relating to the commit 6e8e478 has successfully been deployed. You can access it at https://preview.docs.camunda.cloud/pr-5289/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy Stand up a temporary docs site with this PR
Projects
Status: 👀 In Review
Development

Successfully merging this pull request may close these issues.

4 participants