## 4.3.1.8.4 Application Logs (Fluent Bit)
With application logs, you can debug an application and derive the internal state of an application. The Telemetry module supports observing your applications with logs of the correct severity level and context, also using FluentBit.
## Overview
The Telemetry module provides the Fluent Bit log agent for the collection and shipment of application logs of any container running in the Kyma runtime.
You can configure the log agent with external systems using runtime configuration with a dedicated Kubernetes API (CRD ) named LogPipeline . With the LogPipeline 's HTTP output, you can natively integrate with vendors that support this output, or with any vendor using a Fluentd integration . The Log feature is optional. If you don't want to use it, simply don't set up a LogPipeline .
## Prerequisites
Your application must log to stdout or stderr , which ensures that the logs can be processed by Kubernetes primitives like kubectl logs . For details, see Kubernetes: Logging Architecture .
## Architecture
In the Kyma cluster, the Telemetry module provides a DaemonSet of Fluent Bit acting as a agent. The agent tails container logs from the Kubernetes container runtime and ships them to a backend.
<!-- image -->
1. Container logs are stored by the Kubernetes container runtime under the var/log directory and its subdirectories.
2. Fluent Bit runs as a DaemonSet (one instance per Node), detects any new log files in the folder, and tails them using a filesystem buffer for reliability.
3. Fluent Bit discovers additional Pod metadata, such as Pod annotations and labels.
4. Telemetry Manager configures Fluent Bit with your output configuration, observes the log flow, and reports problems in the LogPipeline status.
5. The log agent sends the data to the observability system that's specified in your LogPipeline resource either within the Kyma cluster, or, if authentication is set up, to an external observability backend. You can use the integration with HTTP to integrate a system directly or with an additional Fluentd installation.
6. To analyze and visualize your logs, access the internal or external observability system.
## Telemetry Manager
The LogPipeline resource is watched by Telemetry Manager, which is responsible for generating the custom parts of the Fluent Bit configuration.
<!-- image -->
1. Telemetry Manager watches all LogPipeline resources and related Secrets.
2. Furthermore, Telemetry Manager takes care of the full lifecycle of the Fluent Bit DaemonSet itself. Only if you defined a LogPipeline , the agent is deployed.
3. Whenever the configuration changes, Telemetry Manager validates the configuration (with a validating webhook ) and generates a new configuration for the Fluent Bit DaemonSet, where several ConfigMaps for the different aspects of the configuration are generated.
4. Referenced Secrets are copied into one Secret that is also mounted to the DaemonSet.
## Log Agent
If a LogPipeline is defined, a DaemonSet is deployed acting as an agent. The agent is based on Fluent Bit and encompasses the collection of application logs provided by the Kubernetes container runtime. The agent sends all data to the configured backend.
## Setting up a LogPipeline
In the following steps, you can see how to construct and deploy a typical LogPipeline . Learn more about the available parameters and attributes .