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

Update the documentation to import a subset of k8s logs #1276

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/opentelemetry-collector/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: opentelemetry-collector
version: 0.104.0
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we need to upgrade the chart's version for this documentation update.

Copy link
Member

Choose a reason for hiding this comment

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

@ChrsMark any change within the chart dir require a version update.

@BeElectronicSakshi please update the version to be 0.105.2 and then run make generate-examples CHARTS=opentelemetry-collector

version: 0.105.2
Copy link
Member

Choose a reason for hiding this comment

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

This will now need to be 0.106.2 since the version has already been bumped up: https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/Chart.yaml#L3

Also, please run make generate-examples CHARTS=opentelemetry-collector to update the examples' versions.

description: OpenTelemetry Collector Helm chart for Kubernetes
type: application
home: https://opentelemetry.io/
Expand Down
23 changes: 23 additions & 0 deletions charts/opentelemetry-collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,29 @@ presets:
The way this feature works is it adds a `filelog` receiver on the `logs` pipeline. This receiver is preconfigured
to read the files where Kubernetes container runtime writes all containers' console output to.

#### Log collection for a subset of pods or containers

The `logsCollection` preset will by default ingest the logs of all kubernetes containers.
This is achieved by using an include path of `/var/log/pods/*/*/*.log` for the `filelog`receiver.

To limit the import to a certain subset of pods or containers, the `filelog`
receivers `include` list can be overwritten by supplying explicit configuration.

E.g. The following configuration would only import logs for pods within namespace `example-namespace`:

```yaml
mode: daemonset

presets:
logsCollection:
enabled: true
config:
receivers:
filelog:
include:
- /var/log/pods/example-namespace_*/*/*.log
```

#### :warning: Warning: Risk of looping the exported logs back into the receiver, causing "log explosion"

The container logs pipeline uses the `debug` exporter by default.
Expand Down