You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sap-cloud-logging/ship-logs.md
+68-80Lines changed: 68 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Welcome to the first sample in our three-part series, where we will explore how Kyma can seamlessly integrate with the SAP Cloud Logging service. By enabling the three pillars of observability - logs, traces, and metrics - Kyma developers and operators can effectively troubleshoot issues, identify root causes, investigate performance bottlenecks, and gain a comprehensive understanding of system behavior.
4
4
5
-
In this sample, we will delve into the following topics:
5
+
This sample covers the following topics:
6
6
7
7
1. SAP Cloud Logging: An Overview
8
8
- Learn about the SAP Cloud Logging service and its significance in the context of Kyma integration.
@@ -11,7 +11,7 @@ In this sample, we will delve into the following topics:
11
11
2. Shipping Logs to SAP Cloud Logging
12
12
- Explore the step-by-step process of shipping logs from applications deployed on SAP BTP, Kyma runtime to SAP Cloud Logging.
13
13
14
-
In the subsequent samples, we will continue our exploration by discussing the integration of traces and metrics.
14
+
The subsequent samples cover the integration of traces and metrics.
15
15
16
16
## What is SAP Cloud Logging?
17
17
@@ -23,11 +23,11 @@ For Cloud Foundry and Kyma, SAP Cloud Logging offers an easy integration by prov
23
23
24
24
To get started with SAP Cloud Logging, visit the [Discovery Center](https://discovery-center.cloud.sap/serviceCatalog/cloud-logging?service_plan=overall-(large,-standard,-and-dev)®ion=all&commercialModel=cloud&tab=feature) where you will find more detailed information about its features and capabilities.
25
25
26
-
Pricing for the SAP Cloud Logging service can be determined using the [SAP Cloud Logging Capacity Unit Estimator](https://sap-cloud-logging-estimator.cfapps.us10.hana.ondemand.com/). It is important to note that for Kyma, the "Ingest Otel" option needs to be enabled, which should be taken into account when estimating pricing. This option is used for shipping traces and metrics.
26
+
To estimate pricing, use the [SAP Cloud Logging Capacity Unit Estimator](https://sap-cloud-logging-estimator.cfapps.us10.hana.ondemand.com/). For Kyma, you must enable the **Ingest Otel** option, which is used for shipping traces and metrics.
27
27
28
28
## Provision an Instance of SAP Cloud Logging
29
29
30
-
Now, let's explore how we can leverage SAP Cloud Logging to ingest logs from applications deployed on SAP BTP, Kyma runtime.
30
+
Now, let's explore how we can use SAP Cloud Logging to ingest logs from applications deployed on SAP BTP, Kyma runtime.
31
31
32
32
### Prerequisites
33
33
@@ -37,128 +37,116 @@ Now, let's explore how we can leverage SAP Cloud Logging to ingest logs from app
37
37
38
38
### Procedure
39
39
40
-
You can refer to the [official SAP documentation](https://help.sap.com/docs/cloud-logging/cloud-logging/create-sap-cloud-logging-instance-through-sap-btp-service-operator?version=Cloud) to create an SAP Cloud Logging service instance for details.
41
-
42
-
- Export your namespace's name as an environment variable.
43
-
44
-
```shell
45
-
# In the instructions, all resources are created in cls namespace. If you want to use a different namespace, adjust the files appropriately
46
-
export NS=cls
47
-
kubectl create ns ${NS}
48
-
```
49
-
50
-
- To provision an instance of SAP Cloud Logging, create an instance of SAP Cloud Logging and a service binding:
51
-
52
-
```shell
53
-
kubectl -n ${NS} apply -f ./k8s/cls-instance.yaml
54
-
```
55
-
56
-
For reference, this is the service instance specification:
57
-
58
-
```yaml
59
-
apiVersion: services.cloud.sap.com/v1
60
-
kind: ServiceInstance
61
-
metadata:
62
-
name: my-cls
63
-
spec:
64
-
serviceOfferingName: cloud-logging
65
-
servicePlanName: dev
66
-
parameters:
67
-
retentionPeriod: 7
68
-
esApiEnabled: false
69
-
ingest_otlp:
40
+
For details, see [Create an SAP Cloud Logging Instance through SAP BTP Service Operator](https://help.sap.com/docs/cloud-logging/cloud-logging/create-sap-cloud-logging-instance-through-sap-btp-service-operator?version=Cloud).
41
+
42
+
1. Export your namespace name as an environment variable:
43
+
44
+
```shell
45
+
# In the instructions, all resources are created in cls namespace. If you want to use a different namespace, adjust the files appropriately
46
+
export NS=cls
47
+
kubectl create ns ${NS}
48
+
```
49
+
50
+
2. To provision an instance of SAP Cloud Logging, create a service instance and a service binding:
51
+
52
+
```shell
53
+
kubectl -n ${NS} apply -f ./k8s/cls-instance.yaml
54
+
```
55
+
56
+
For reference, this is the service instance specification:
57
+
58
+
```yaml
59
+
apiVersion: services.cloud.sap.com/v1
60
+
kind: ServiceInstance
61
+
metadata:
62
+
name: my-cls
63
+
spec:
64
+
serviceOfferingName: cloud-logging
65
+
servicePlanName: dev
66
+
parameters:
67
+
retentionPeriod: 7
68
+
esApiEnabled: false
69
+
ingest_otlp:
70
+
enabled: true
71
+
```
72
+
73
+
This is the corresponding service binding.
74
+
75
+
```yaml
76
+
apiVersion: services.cloud.sap.com/v1
77
+
kind: ServiceBinding
78
+
metadata:
79
+
name: my-cls-binding
80
+
spec:
81
+
serviceInstanceName: my-cls
82
+
credentialsRotationPolicy:
70
83
enabled: true
71
-
```
72
-
73
-
This is the corresponding service binding.
74
-
75
-
```yaml
76
-
apiVersion: services.cloud.sap.com/v1
77
-
kind: ServiceBinding
78
-
metadata:
79
-
name: my-cls-binding
80
-
spec:
81
-
serviceInstanceName: my-cls
82
-
credentialsRotationPolicy:
83
-
enabled: true
84
-
rotationFrequency: "720h"
85
-
rotatedBindingTTL: "24h"
86
-
```
84
+
rotationFrequency: "720h"
85
+
rotatedBindingTTL: "24h"
86
+
```
87
87
88
-
The service binding specifies the credentials rotation policy. It is a great developer experience that the Telemetry module intelligently switches to new credentials once they are rotated. This does not require any action from the developer.
88
+
The service binding specifies the credentials rotation policy. The Telemetry module automatically switches to new credentials after they are rotated, which requires no action from you.
89
89
90
-
> **NOTE:** The same instance will be reused for configuring tracing and monitoring.
90
+
>**NOTE:**You reuse this same instance to configure tracing and monitoringin the subsequent tutorials.
91
91
92
-
The service binding also generates a Secret with the same name. It contains the details to access the dashboard of the SAP Cloud Logging instance previously created.
92
+
The service binding also generates a Secret with the same name. It contains the details to access the dashboard of the SAP Cloud Logging instance previously created.
## Ship your application logs to SAP Cloud Logging
97
97
98
98
To ship your logs to SAP Cloud Logging, create LogPipeline custom resources (CRs).
99
99
100
-
Your application running in SAP BTP, Kyma runtime will send logs to stdout. The Telemetry module based on the LogPipeline will capture and ship them to SAP Cloud Logging.
100
+
Your application running in SAP BTP, Kyma runtime sends logs to stdout. Based on the LogPipeline, the Telemetry module captures and ships them to SAP Cloud Logging.
101
101
102
102
### Create a LogPipeline CR for Your Application Logs
In the LogPipeline, configure the details about shipping the logs to SAP Cloud Logging. Include major configurations such as:
110
+
In the LogPipeline, you configure how logs are shipped to SAP Cloud Logging with the following options:
111
111
112
-
- Input: From which applications, containers, and namespaces the logs should be shipped
113
-
- Output: The access details of the SAP Cloud Logging instance to which logs will be shipped
112
+
- Input: Specifies the applications, containers, and namespaces from which logs are shipped
113
+
- Output: Contains the access details of the SAP Cloud Logging instance to which logs are shipped.
114
114
115
115
You can learn about all the parameters in detail from the official Telemetry [LogPipeline](https://kyma-project.io/#/telemetry-manager/user/resources/02-logpipeline?id=custom-resource-parameters) documentation.
116
116
117
117
This is an example of the LogPipeline configuration used for this sample:
### Create a LogPipeline CR for the Istio access logs
119
+

122
120
123
-
Referred from [kyma-project.io documentation about istio access logs](https://kyma-project.io/#/istio/user/tutorials/01-45-enable-istio-access-logs).
121
+
### Enable Istio Access logs
124
122
125
-
Istio access logs provide fine-grained details about the traffic when accessing the workloads that are part of Istio service mesh. The only prerequisite is to enable Istio sidecar injection for your workloads. The Istio access logs provide useful information relating to 4 golden signals, such as latency, traffic, errors, and saturation as well as any troubleshooting anomalies.
123
+
For details, see [Configure Istio Access Logs](https://kyma-project.io/external-content/telemetry-manager/docs/user/collecting-logs/istio-support.html).
126
124
127
-
[Configure Istio access logs for the entire mesh](https://kyma-project.io/#/istio/user/tutorials/01-45-enable-istio-access-logs?id=configure-istio-access-logs-for-the-entire-mesh)
125
+
Istio access logs provide fine-grained details about traffic to workloads inthe Istio service mesh, related to the four golden signals (latency, traffic, errors, and saturation) and help troubleshoot anomalies. Before you enable Istio accesslogs, enable Istio sidecar injection for your workloads.
128
126
129
-
It is also possible to have [fine grained configuration](https://kyma-project.io/#/istio/user/tutorials/01-45-enable-istio-access-logs?id=configuration)for Istio access logs.
127
+
For details, see [Enable Istio Logs for the Entire Mesh](https://kyma-project.io/external-content/telemetry-manager/docs/user/collecting-logs/istio-support.html#enable-istio-logs-for-the-entire-mesh).
The simplest way to start exploring the logs is to navigate to **Discover** and choose the appropriate index.
154
142
155
143

156
144
157
-
You can choose the index pattern to view the relevant logs, apply a filter or search term to narrow down your search or use other Open Search capabilities.
145
+
You can choose an index pattern to view relevant logs, apply a filter or search term to narrow down results, or use other OpenSearch capabilities.
158
146
159
147

160
148
161
-
We will talk more about metrics in one of the next samples. However, I would like to bring your attention to the Four Golden Signals dashboard. It is provided out of the box and is based on the Istio access logs which we configured previously.
149
+
While metrics are covered ina later sample, note the **Four Golden Signals** dashboard. SAP Cloud Logging provides this dashboard out-of-the-box, based on the Istio access logs that you configured previously.
162
150
163
151
For reference, check out the generic and latency dashboards.
0 commit comments