-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Create new Container Log Collection Troubleshooting Doc #33283
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
Create new Container Log Collection Troubleshooting Doc #33283
Conversation
…ng section of kubernetes log collection and update troubleshooting section to link to new page
…shooting doc in further reading section, and update troubleshooting section to also link to new doc
… new troubleshooting doc has alias to this old doc
Preview links (active after the
|
|
Created DOCS-12883 for documentation team review |
|
Happy with the changes from the Containers TEE side 👍 , but can you also adjust this page:
This links to the Kubernetes log doc and its now removed troubleshooting section |
…lection troubleshooting doc
estherk15
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for taking this on @kohyoungheon. Most of my feedback is to maintain docs style and clarify content. I also think the first section should be split off as a guide. It's high level and walks a reader through the why's of log collection and troubleshooting, rather than the how. Let me know if you have any questions on my comments!
|
|
||
| #### Container collect all configuration | ||
|
|
||
| Consult the [Docker][1] and [Kubernetes][2] log collection docs for the full steps on how to enable log collection. For quick reference you can see samples on how to configure the Agent to enable log collection and enable the `container_collect_all` feature, which defaults to false. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Consult the [Docker][1] and [Kubernetes][2] log collection docs for the full steps on how to enable log collection. For quick reference you can see samples on how to configure the Agent to enable log collection and enable the `container_collect_all` feature, which defaults to false. | |
| For comprehensive instructions on how to enable log collection, see the [Docker][1] and [Kubernetes][2] log collection documentation. For quick reference you can see samples on how to configure the Agent to enable log collection and enable the `container_collect_all` feature, which defaults to false. |
|
|
||
| #### Autodiscovery configuration | ||
|
|
||
| You can configure which containers the Agent collects logs from by using Autodiscovery configurations. Datadog recommends to configure this by using [container labels in Docker][6] or [Pod annotations in Kubernetes][7]. These are JSON based log configurations placed on the corresponding container/pod emitting those logs. You can see a minimal example below: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| You can configure which containers the Agent collects logs from by using Autodiscovery configurations. Datadog recommends to configure this by using [container labels in Docker][6] or [Pod annotations in Kubernetes][7]. These are JSON based log configurations placed on the corresponding container/pod emitting those logs. You can see a minimal example below: | |
| Autodiscovery allows you to configure which containers the Agent collects logs from. Datadog recommends using [container labels in Docker][6] or [Pod annotations in Kubernetes][7]. These are JSON based log configurations placed on the corresponding container/pod emitting those logs. See the following minimal example: |
|
|
||
| ### Tagging | ||
|
|
||
| The Agent automatically assigns tags to your logs at the “high” level of [tag cardinality][10] for each environment. You can view the out-of-the-box [Docker tags here][11] and [Kubernetes tags here][12]. This additionally includes and tags collected by [Unified Service Tagging][13] or different tag extraction rules from container metadata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The Agent automatically assigns tags to your logs at the “high” level of [tag cardinality][10] for each environment. You can view the out-of-the-box [Docker tags here][11] and [Kubernetes tags here][12]. This additionally includes and tags collected by [Unified Service Tagging][13] or different tag extraction rules from container metadata. | |
| The Agent automatically assigns tags to your logs at the “high” level of [tag cardinality][10] for each environment. You can view the out-of-the-box [Docker tags here][11] and [Kubernetes tags here][12]. This also includes any tags collected by [Unified Service Tagging][13] or different tag extraction rules from container metadata. |
| To customize these tags, change the log collection rules, or enable log collection in general - you can apply Autodiscovery Labels or Annotations to the respective containers as documented above. | ||
|
|
||
| Tags on your logs can also come from [host tag inheritance][14]. All data, including logs, coming into Datadog goes through this process. On Datadog intake the logs will inherit all the host-level tags that are associated with that host. You can see these tags on the Infrastructure List for you host. These are most commonly set by: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To customize these tags, change the log collection rules, or enable log collection in general - you can apply Autodiscovery Labels or Annotations to the respective containers as documented above. | |
| Tags on your logs can also come from [host tag inheritance][14]. All data, including logs, coming into Datadog goes through this process. On Datadog intake the logs will inherit all the host-level tags that are associated with that host. You can see these tags on the Infrastructure List for you host. These are most commonly set by: | |
| To customize these tags, change the log collection rules, or enable log collection in general - you can apply Autodiscovery Labels or Annotations to the respective containers. | |
| Tags on your logs can also come from [host tag inheritance][14]. All data, including logs, coming into Datadog goes through this process. On Datadog intake the logs inherit all the host-level tags that are associated with that host. You can see these tags on the Infrastructure List for you host. These are most commonly set by: |
| - The Datadog Agent and its automatic discovery or manual set of `DD_TAGS` provided | ||
| - The cloud provider integrations collecting and setting tags for your hosts | ||
|
|
||
| So for example the tags `pod_name` and `short_image` come from the Agent setting this tag on submission. Other tags like `region` and `kube_cluster_name` come from host tag inheritance on intake. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| So for example the tags `pod_name` and `short_image` come from the Agent setting this tag on submission. Other tags like `region` and `kube_cluster_name` come from host tag inheritance on intake. | |
| For example, the tags `pod_name` and `short_image` come from the Agent setting this tag on submission. Other tags like `region` and `kube_cluster_name` come from host tag inheritance on intake. |
estherk15
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for taking this on @kohyoungheon. Most of my feedback is to maintain docs style and clarify content. I also think the first section should be split off as a guide. It's high level and walks a reader through the why's of log collection and troubleshooting, rather than the how. Let me know if you have any questions on my comments!
Applying suggested changes Co-authored-by: Esther Kim <[email protected]>
|
Hi @estherk15 Thank you so much for reviewing this PR! I spoke to the containers TEE team about these particular suggestions:
We would like for this section to stay in the troubleshooting doc where it currently is. It's meant to summarize the Kubernetes, Docker, Tagging, Autodiscovery steps into their most basic parts. Then importantly build upon that in the following troubleshooting sections. For example:
Separating them to their own page I feel would make this troubleshooting process less clear as you would have to switch between those pages.
Thank you. Please let me know if you would like me to make any other changes! |
|
@kohyoungheon Thanks for checking with the TEE team and sharing their reasoning. I agree that the context connects well to the later troubleshooting steps. My only concern is that when users land on a troubleshooting page, they’re usually trying to solve something right away, and a long introductory section can slow them down. I still think the context is important, just possibly better positioned as prerequisite or collapsible content so it supports, rather than interrupts, troubleshooting. But I’m happy to work with whichever direction the team prefers. |
|
Hey @estherk15 Young and I chatted some more about this. I think we'd prefer to keep the structure as is. If users are really in a rush they can use the menu on the right to skip right to the The alternative of putting this in a different doc feels like it would be cumbersome to navigate between the two for such a related topic. Having it as collapsible content in each of the troubleshooting commands sections may make those sections too wordy. Some of this context overlaps as well between the status, configcheck, and stream-logs output which might make that difficult. We could change the parent headers like the following (or to whatever you'd prefer) if you think that might flow better than |
estherk15
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kohyoungheon @JacksonDavenport. Since we're keeping the structure as it, I think it makes sense to leave all the information together as an intro to the actual troubleshooting steps. I left a couple more change suggestions, but this is good to go!
Apply suggested changes Co-authored-by: Esther Kim <[email protected]>
What does this PR do? What is the motivation?
https://datadoghq.atlassian.net/browse/TEEP-3046
Merge instructions
Merge readiness:
For Datadog employees:
Your branch name MUST follow the
<name>/<description>convention and include the forward slash (/). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.If your branch doesn't follow this format, rename it or create a new branch and PR.
[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.
Additional notes