Skip to content

Commit

Permalink
surround embedded files with backticks
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Bacher <[email protected]>
  • Loading branch information
bacherfl committed Dec 19, 2023
1 parent d39ea75 commit 76d8163
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs-new/blog/posts/analyzing-application-performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ Everything in Keptn is configured via Kubernetes Custom Resources.
We notify Keptn about our monitoring data sources by adding two KeptnMetricsProvider
resources to our Kubernetes cluster - one for our Prometheus instance, the other one for our Dynatrace tenant.

```yaml
{% include "./analyzing-application-performance/metric-providers.yaml" %}
```

## Defining SLIs

Expand All @@ -71,11 +73,15 @@ that has been executed after the deployment of a new version.
In our case, we will create two `AnalysisValueTemplates` resources.
The first one measures the error rate of our workload, using data from Prometheus:

```yaml
{% include "./analyzing-application-performance/error-rate.yaml" %}
```

As a second metric, we measure the memory usage of our application using the following `AnalysisValueTemplate`:

```yaml
{% include "./analyzing-application-performance/memory-usage.yaml" %}
```

As can be seen in the `spec.query` field of the resource above,
`AnalysisValueTemplate` resources support the [Go templating syntax](https://pkg.go.dev/text/template).
Expand All @@ -93,7 +99,9 @@ The next step is to set up our expectations towards our SLOs, i.e. the
goals we would like them to meet.
This is done via an `AnalysisDefinition` resource like the following:

```yaml
{% include "./analyzing-application-performance/analysis-definition.yaml" %}
```

This `AnalysisDefinition` resource has two objectives, which both refer
to the `AnalysisValueTemplate` resources we created previously.
Expand All @@ -115,7 +123,9 @@ and the metrics-operator determines where to retrieve the data based on the info
Now, it is time to trigger an Analysis.
This is done by applying an Analysis resource which looks as follows:

```yaml
{% include "./analyzing-application-performance/analysis.yaml" %}
```

Applying this resource causes Keptn to:

Expand Down Expand Up @@ -174,7 +184,9 @@ kubectl get analysis service-analysis -n simple-go –oyaml

This command gives us the complete YAML representation of the `Analysis`:

```yaml
{% include "./analyzing-application-performance/analysis-status.yaml" %}
```

As you can see, this already gives us a lot more information,
with the meatiest piece being the status.raw field.
Expand All @@ -187,7 +199,9 @@ kubectl get analyses service-analysis -n simple-go -o=jsonpath='{.status.raw}' |

Giving us the following as a result:

```json
{% include "./analyzing-application-performance/analysis-breakdown.json" %}
```

In the JSON object, we see:

Expand Down

0 comments on commit 76d8163

Please sign in to comment.