Skip to content

Commit 9e07eac

Browse files
authored
Merge pull request #634 from a-thaler/telemetry
updated telemetry configurations to latest changes
2 parents 146646b + c4b5bbc commit 9e07eac

9 files changed

Lines changed: 81 additions & 130 deletions
390 KB
Loading
-148 KB
Binary file not shown.
-147 KB
Binary file not shown.
141 KB
Loading

sap-cloud-logging/k8s/logging/logs-pipeline-istio-access-logs.yaml

Lines changed: 0 additions & 33 deletions
This file was deleted.

sap-cloud-logging/k8s/logging/logs-pipeline-application-logs.yaml renamed to sap-cloud-logging/k8s/logging/logs-pipeline.yaml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,29 @@
1-
apiVersion: telemetry.kyma-project.io/v1alpha1
1+
apiVersion: telemetry.kyma-project.io/v1beta1
22
kind: LogPipeline
33
metadata:
4-
name: my-cls-application-logs
4+
name: my-cls
55
spec:
66
input:
7-
application:
8-
containers:
9-
exclude:
10-
- istio-proxy
7+
runtime:
8+
enabled: true
119
output:
12-
http:
13-
dedot: true
14-
host:
10+
otlp:
11+
endpoint:
1512
valueFrom:
1613
secretKeyRef:
1714
name: my-cls-binding
1815
namespace: cls
19-
key: ingest-mtls-endpoint
16+
key: ingest-otlp-endpoint
2017
tls:
2118
cert:
2219
valueFrom:
2320
secretKeyRef:
2421
name: my-cls-binding
2522
namespace: cls
26-
key: ingest-mtls-cert
23+
key: ingest-otlp-cert
2724
key:
2825
valueFrom:
2926
secretKeyRef:
3027
name: my-cls-binding
3128
namespace: cls
32-
key: ingest-mtls-key
33-
uri: /customindex/kyma
29+
key: ingest-otlp-key

sap-cloud-logging/k8s/tracing/trace-istio-telemetry.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ metadata:
66
spec:
77
accessLogging:
88
- providers:
9-
- name: stdout-json
9+
- name: kyma-logs
1010
tracing:
1111
- providers:
12-
- name: "kyma-traces"
12+
- name: kyma-traces
1313
randomSamplingPercentage: 1.0

sap-cloud-logging/k8s/tracing/traces-pipeline.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
apiVersion: telemetry.kyma-project.io/v1alpha1
1+
apiVersion: telemetry.kyma-project.io/v1beta1
22
kind: TracePipeline
33
metadata:
4-
name: my-cls-trace-pipeline
4+
name: my-cls
55
spec:
66
output:
77
otlp:

sap-cloud-logging/ship-logs.md

Lines changed: 68 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
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.
44

5-
In this sample, we will delve into the following topics:
5+
This sample covers the following topics:
66

77
1. SAP Cloud Logging: An Overview
88
- 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:
1111
2. Shipping Logs to SAP Cloud Logging
1212
- Explore the step-by-step process of shipping logs from applications deployed on SAP BTP, Kyma runtime to SAP Cloud Logging.
1313

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.
1515

1616
## What is SAP Cloud Logging?
1717

@@ -23,11 +23,11 @@ For Cloud Foundry and Kyma, SAP Cloud Logging offers an easy integration by prov
2323

2424
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)&region=all&commercialModel=cloud&tab=feature) where you will find more detailed information about its features and capabilities.
2525

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.
2727

2828
## Provision an Instance of SAP Cloud Logging
2929

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.
3131

3232
### Prerequisites
3333

@@ -37,128 +37,116 @@ Now, let's explore how we can leverage SAP Cloud Logging to ingest logs from app
3737

3838
### Procedure
3939

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:
7083
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+
```
8787

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.
8989

90-
> **NOTE:** The same instance will be reused for configuring tracing and monitoring.
90+
> **NOTE:** You reuse this same instance to configure tracing and monitoring in the subsequent tutorials.
9191

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.
9393

94-
![cls-binding-secret](./assets/cls-binding-secret.png)
94+
![cls-binding-secret](./assets/cls-binding-secret.png)
9595

9696
## Ship your application logs to SAP Cloud Logging
9797

9898
To ship your logs to SAP Cloud Logging, create LogPipeline custom resources (CRs).
9999

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.
101101

102102
### Create a LogPipeline CR for Your Application Logs
103103

104104
To create the LogPipeline, run:
105105

106106
```shell
107-
kubectl apply -f ./k8s/logging/logs-pipeline-application-logs.yaml
107+
kubectl apply -f ./k8s/logging/logs-pipeline.yaml
108108
```
109109

110-
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:
111111

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.
114114

115115
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.
116116

117117
This is an example of the LogPipeline configuration used for this sample:
118118

119-
![log-pipeline](./assets/log-pipeline-app-logs.png)
120-
121-
### Create a LogPipeline CR for the Istio access logs
119+
![log-pipeline](./assets/log-pipeline.png)
122120

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
124122

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).
126124

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 in the Istio service mesh, related to the four golden signals (latency, traffic, errors, and saturation) and help troubleshoot anomalies. Before you enable Istio access logs, enable Istio sidecar injection for your workloads.
128126

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).
130128

131129
```shell
132130
kubectl apply -f ./k8s/tracing/trace-istio-telemetry.yaml
133131
```
134132

135-
> Note: We use the same Istio telemetry configuration for tracing and logging.
136-
137-
To create the LogPipeline, run:
138-
139-
```shell
140-
kubectl apply -f ./k8s/logging/logs-pipeline-istio-access-logs.yaml
141-
```
142-
143-
This is an example of the LogPipeline configuration used for this sample:
144-
145-
![log-pipeline-istio-access-logs](./assets/log-pipeline-istio-access-logs.png)
133+
> **NOTE:** This and the subsequent samples use the same Istio Telemetry configuration for tracing and logging.
146134

147135
## View the logs
148136

149-
You can access the SAP Cloud Logging instance dashboard. The access details are available in the Secret generated by the service binding.
137+
To access the SAP Cloud Logging dashboard, use the credentials from the Secret generated by the service binding.
150138

151139
![cls-binding-secret](./assets/cls-binding-secret.png)
152140

153141
The simplest way to start exploring the logs is to navigate to **Discover** and choose the appropriate index.
154142

155143
![cls-access](./assets/cls-access.png)
156144

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.
158146

159147
![choose-index](./assets/choose-index.png)
160148

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 in a 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.
162150

163151
For reference, check out the generic and latency dashboards.
164152

0 commit comments

Comments
 (0)