Skip to content

Commit b2f6bd6

Browse files
committed
Document log and auto-instrumentation destinations
1 parent d61602f commit b2f6bd6

File tree

3 files changed

+135
-4
lines changed

3 files changed

+135
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
---
3+
title: Log Destinations
4+
description: Available log destinations for application logging in Nais.
5+
tags: [reference, logging]
6+
conditional: [tenant, nav]
7+
---
8+
9+
# Log Destinations
10+
11+
Log destinations are the different places where logs can be sent to. All environments have a default log destination, please see the [environments overview](../../../workloads/reference/environments.md), but you can configure your application to send logs to other destinations as well.
12+
13+
## Configuration
14+
15+
To configure a log destination for your application, add the following configuration to your `Application` resource:
16+
17+
```yaml
18+
apiVersion: nais.io/v1alpha1
19+
kind: Application
20+
metadata:
21+
name: my-application
22+
spec:
23+
observability:
24+
logging:
25+
destinations:
26+
- loki
27+
```
28+
29+
## Destinations
30+
31+
The following log destinations are available in Nais:
32+
33+
{% if tenant() != "ssb" %}
34+
- [`loki`](../how-to/loki.md#enable-logging-to-grafana-loki)
35+
{% endif %}
36+
{% if tenant() == "nav" %}
37+
- [`elastic`](../how-to/kibana.md#enable-logging-to-elastic-kibana)
38+
- [`secure_logs`](../how-to/enable-secure-logs.md)
39+
{% endif %}
40+
- [`[]`](../how-to/disable.md) (disabled)

docs/observability/reference/auto-config.md

+21
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,24 @@ A full list of environment variables that can be used to configure the OpenTelem
115115
* [:octicons-link-external-24: OTLP Exporter Configuration](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/)
116116

117117
[OTLP is the OpenTelemetry Protocol](https://opentelemetry.io/docs/specs/otel/protocol/exporter/), and is the protocol used to send telemetry data to Prometheus, Grafana Tempo, and Grafana Loki.
118+
119+
## Destinations
120+
121+
If you need to override where telemetry data is stored, you can do so with the following configuration in your `nais.yaml`:
122+
123+
```yaml
124+
spec:
125+
observability:
126+
telemetry:
127+
destinations:
128+
- grafana-lgtm
129+
```
130+
131+
The following destinations are available:
132+
133+
* `grafana-lgtm`
134+
{% if tenant() == "nav" %}
135+
* `elastic-apm`
136+
{% endif %}
137+
138+
Default destination for each environment can be found in the [environments overview](../../../workloads/reference/environments.md).

docs/workloads/reference/environments.md

+74-4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ See [explanation for exposing application][expose-app] for more information.
3434

3535
Kubectl access to the cluster is available through [naisdevice](../../operate/naisdevice/README.md). You can access all namespaces in the cluster, but you can only modify resources in your team's namespace.
3636

37+
#### Observability
38+
39+
| data | default |
40+
| :------------------- | :------------- |
41+
| logs (stdout) | `elastic` |
42+
| auto-instrumentation | `grafana-lgtm` |
43+
3744
### prod-gcp
3845

3946
#### Ingress domains
@@ -56,6 +63,13 @@ See [explanation for exposing application][expose-app] for more information.
5663

5764
Kubectl access to the cluster is available through [naisdevice](../../operate/naisdevice/README.md). You can only read or modify resources in your team's namespace.
5865

66+
#### Observability
67+
68+
| data | default |
69+
| :------------------- | :------------- |
70+
| logs (stdout) | `elastic` |
71+
| auto-instrumentation | `grafana-lgtm` |
72+
5973
## On-prem
6074

6175
!!! warning
@@ -75,6 +89,13 @@ Kubectl access to the cluster is available through [naisdevice](../../operate/na
7589

7690
Kubectl access to the cluster is available through [naisdevice](../../operate/naisdevice/README.md). You can access all namespaces in the cluster, but you can only modify resources in your team's namespace.
7791

92+
#### Observability
93+
94+
| data | default |
95+
| :------------------- | :------------- |
96+
| logs (stdout) | `elastic` |
97+
| auto-instrumentation | `grafana-lgtm` |
98+
7899
### prod-fss
79100

80101
#### Ingress domains
@@ -90,6 +111,13 @@ Kubectl access to the cluster is available through [naisdevice](../../operate/na
90111

91112
Kubectl access to the cluster is available through [naisdevice](../../operate/naisdevice/README.md) with just in time access ([jita](../../operate/naisdevice/explanations/jita.md)). You can only read or modify resources in your team's namespace.
92113

114+
#### Observability
115+
116+
| data | default |
117+
| :------------------- | :------------- |
118+
| logs (stdout) | `elastic` |
119+
| auto-instrumentation | `grafana-lgtm` |
120+
93121
{% endif %}
94122
{% if tenant() == "ssb" %}
95123
### test
@@ -107,6 +135,13 @@ Kubectl access to the cluster is available through [naisdevice](../../operate/na
107135

108136
- 35.228.178.170
109137

138+
#### Observability
139+
140+
| data | default |
141+
| :------------------- | :----------- |
142+
| logs (stdout) | `cloud-logs` |
143+
| auto-instrumentation | Not enabled |
144+
110145
### prod
111146

112147
#### Domains
@@ -121,6 +156,13 @@ Kubectl access to the cluster is available through [naisdevice](../../operate/na
121156
#### External/outbound IPs
122157

123158
- 34.88.222.166
159+
160+
#### Observability
161+
162+
| data | default |
163+
| :------------------- | :----------- |
164+
| logs (stdout) | `cloud-logs` |
165+
| auto-instrumentation | Not enabled |
124166
{% endif %}
125167
{% if tenant() == "atil" %}
126168
### dev
@@ -136,6 +178,13 @@ Kubectl access to the cluster is available through [naisdevice](../../operate/na
136178

137179
- 34.88.9.217
138180

181+
#### Observability
182+
183+
| data | default |
184+
| :------------------- | :------------- |
185+
| logs (stdout) | `loki` |
186+
| auto-instrumentation | `grafana-lgtm` |
187+
139188
{% endif %}
140189
{% if tenant() == "ldir" %}
141190
### non-prod
@@ -153,12 +202,19 @@ Kubectl access to the cluster is available through [naisdevice](../../operate/na
153202

154203
- 34.88.208.138
155204

205+
#### Observability
206+
207+
| data | default |
208+
| :------------------- | :------------- |
209+
| logs (stdout) | `loki` |
210+
| auto-instrumentation | `grafana-lgtm` |
211+
156212
### prod
157213

158214
#### Domains
159215

160-
| domain | accessible from | description |
161-
| :------------------------------ | :----------------------- | :---------------------------------------------------------------------------------------------------------------- |
216+
| domain | accessible from | description |
217+
| :------------------------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------- |
162218
| external.prod.ldir.cloud.nais.io | internet | ingress for applications exposed to internet. URLs containing `/metrics`, `/actuator` or `/internal` are blocked. |
163219
| landbruksdirektoratet.no | internet | ingress for applications exposed to internet. URLs containing `/metrics`, `/actuator` or `/internal` are blocked. |
164220
| prod.ldir.cloud.nais.io | [naisdevice][naisdevice] | ingress for internal applications |
@@ -168,21 +224,35 @@ Kubectl access to the cluster is available through [naisdevice](../../operate/na
168224

169225
- 34.88.126.246
170226

227+
#### Observability
228+
229+
| data | default |
230+
| :------------------- | :------------- |
231+
| logs (stdout) | `loki` |
232+
| auto-instrumentation | `grafana-lgtm` |
233+
171234
{% endif %}
172235
{% if tenant() == "test-nais" %}
173236
### sandbox
174237

175238
#### Domains
176239

177-
| domain | accessible from | description |
178-
| :------------------------------ | :----------------------- | :---------------------------------------------------------------------------------------------------------------- |
240+
| domain | accessible from | description |
241+
| :--------------------------------------- | :----------------------- | :---------------------------------------------------------------------------------------------------------------- |
179242
| external.sandbox.test-nais.cloud.nais.io | internet | ingress for applications exposed to internet. URLs containing `/metrics`, `/actuator` or `/internal` are blocked. |
180243
| sandbox.test-nais.cloud.nais.io | [naisdevice][naisdevice] | ingress for internal applications |
181244

182245
#### External/outbound IPs
183246

184247
- 35.228.243.95
185248

249+
#### Observability
250+
251+
| data | default |
252+
| :------------------- | :------------- |
253+
| logs (stdout) | `loki` |
254+
| auto-instrumentation | `grafana-lgtm` |
255+
186256
{% endif %}
187257

188258
[naisdevice]: ../../operate/naisdevice/README.md

0 commit comments

Comments
 (0)