Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Using Opentelemetry-operateor, you can simply log using container logs with annotations. Since container logs are collected only in the namespace unit set by the user, the method of collecting them fo
We recommend that you select a method that suits your environment.
Collect container logs from workloads using automated instrumentation.
The SDK method is used when you want to collect logs from a specific service through Logger settings.
The sidecar method is used when you want to read and collect log files in a specific directory.
You can create one by searching for Infrastructure - Custom Resources - 'instrumentations'.
You can create it by clicking the Create button, selecting the namespace where you want to collect logs, and modifying the form below.
The above CRD is applied on a namespace basis, and automatic container logs can be collected for other languages in the same namespace.
log-agent Service Address
: Infrastructure - Cluster - Add-ons - Click 'log-agent' and check the service name.
( http port = 4318 , grpc port = 4317)
Add annotations to the workloads in the namespace for which you want to collect logs.
Application - Service Map - Service Map to collect logs - Workload - Select the application to collect logs - Click the "Settings" button.
Change the Yaml view and add the following annotations to the template - metadata - annotations section.
You can leverage Custom Resources to configure the OpenTelemetry auto-instrumentation library and add annotations to your workloads to easily collect logs.
You can create one by searching for Infrastructure - Custom Resources - 'instrumentations'.
You can create it by clicking the Create button, selecting the namespace where you want to collect logs, and modifying the form below.
The above CRD is applied on a namespace basis, and automatic container logs can be collected for other languages in the same namespace.
log-agent Service address
: Infrastructure - Cluster - Add-ons - Click 'log-agent' and check the service name.
( http port = 4318 , grpc port = 4317)
By adding an environment variable for each individual application rather than all applications in the namespace through CRD, you can only collect logs for a specific application.
Add annotations to the workloads in the namespace for which you want to collect logs.
Application - Service Map - Service Map to collect logs - Workload - Select the application to collect logs - Click the "Settings" button.
Change the Yaml view and add the following annotations to the template - metadata - annotations section.
This is a method of installing into an existing application using the SDK provided by Opentelemetry.
This guide is for existing JAVA applications that have been build on Cocktail Cloud.
Log Appender is an interface provided by a logging framework or library that provides the ability to collect and process log messages. OpenTelemetry interacts with Log Appender through the Log Bridge API to collect log messages and associate them with tracking data from OpenTelemetry. Therefore, log appenders can be used to collect and integrate log data from OpenTelemetry.
We introduce how to collect data using logback
and log4j
, which are representative loggers.
log-agent Service Address
: Infrastructure - Cluster - Add-ons - Click 'log-agent' and check the service name.
( http port = 4318 , grpc port = 4317)
The advantage of using the open source fluent-bit is that the user can handle it by reading log files stored in the directory.
This is a method of installing into an existing application using the SDK provided by Opentelemetry. Logging in Python is currently under development at opentelemetry.
This guide is for existing Python applications that have been build on Cocktail Cloud.
Additionally, the Python application in this guide was created based on 'Flask'
log-agent Service Address
: Infrastructure - Cluster - Add-ons - Click 'log-agent' and check the service name.
( http port = 4318 , grpc port = 4317)
Fluent Bit is a lightweight log data collector that is used to collect and process data. By installing Flentbit as a sidecar in your application, you parse the application's logs and forward them to O
The above guide explains how the application stores logs in the /var/log directory. Please modify the directory and log pattern to suit your environment.
Application to collect logs - Settings - Container Click the "Add" button to create a container as follows.
Image:
fluent/fluent-bit:3.0.0
When you press the save button, the container runs in the existing application in fluent-bit sidecar format.
Logs are stored in the path set in Log Appender, so you need to create a volume in the container and mount it.
Application to collect logs - Settings - Volume - Click the "Create" button to create a volume as follows.
Volume Type
: Empty Dir
Volume Name
: custom name
The following is the process of mounting the created volume.
Application to collect logs - Settings - Volume mount - Click the "Add" button to mount the volume with the following settings.
Container Path
: File path set in Log Appender (eg. /var/log)
The container must mount the directory path where it stores the logs before it can read the file and parse the logs.
You can also add labels or change the label name through Config provided by fluent-bit.
Service map to collect logs - Configuration information - Click the "Create" button to create a configuration map.
Name
: The name of the config map you want to set.
Description
: Additionally, a description of the config map to be specified by the user.
Click the “Add” button to add the config file.
The following config file is not absolute. The location where the log is loaded or the log pattern may vary, so please set it according to your environment.
log-agent Service Address
: Infrastructure - Cluster - Add-ons - Click 'log-agent' and check the service name.
( http port = 4318 , grpc port = 4317)
parsers.conf
Application logs create a label called 'level' to provide users with the ability to filter by level. The following is an example of converting nginx's code value to level when the user's application does not have a value called level.
rewrite.lua
Once the config map creation is complete, return to the application to create the volume.
Application to collect logs - Settings - Volume - Click the "Create" button to create a volume as follows.
Volume Type
: Config Map
Volume Name
: Custom Name
Config Map
: User-created ConfigMap name
Permission
: 644
The following is the process of mounting the created volume.
Application to collect logs - Settings - Volume mount - Click the "Add" button to mount the volume with the following settings.
Container Path
: Log Data - Directory path where logs are stored (eg. /var/log)
Container Path
: Fluent-bit -conf -fluent-bit configuration file path (eg. /fluent-bit/etc)
When the fluent-bit container does not operate properly