Skip to content

Commit 8f5b277

Browse files
committed
update otel tracing doc for serving
1 parent 734a526 commit 8f5b277

File tree

3 files changed

+47
-74
lines changed

3 files changed

+47
-74
lines changed

config/nav.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ nav:
183183
- Security-Guard example alerts: serving/app-security/security-guard-example-alerts.md
184184
# Serving - observability
185185
- Observability:
186-
- Request traces: serving/accessing-traces.md
186+
- Request traces: serving/observability/accessing-traces.md
187187
- Collecting logs: serving/observability/logging/collecting-logs.md
188188
- Configuring logging: serving/observability/logging/config-logging.md
189189
- Configuring Request logging: serving/observability/logging/request-logging.md

docs/serving/accessing-traces.md

Lines changed: 0 additions & 73 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
audience: administrator
3+
components:
4+
- serving
5+
function: how-to
6+
---
7+
8+
# Accessing request traces
9+
10+
Traces give us the big picture of what happens when a request is made to an application.
11+
Knative Serving is instrumented with [OpenTelemetry](https://opentelemetry.io/docs/what-is-opentelemetry/) which can emit traces to a multitude of different backends.
12+
Specifically Serving can be configured to emit traces using the standard [OTLP format](https://opentelemetry.io/docs/specs/otlp/).
13+
14+
## Configuring Traces
15+
16+
You can update the configuration file for tracing in [observability.yaml](https://github.com/knative/serving/blob/main/config/core/configmaps/observability.yaml).
17+
18+
Follow the instructions in the file to set your configuration options. This file includes options such as sample rate (to determine what percentage of requests to trace), export protocol and desired backend.
19+
20+
You can quickly explore and update the ConfigMap object with the following command:
21+
```bash
22+
kubectl -n knative-serving edit configmap config-observability
23+
```
24+
25+
## Jaeger
26+
27+
In order to access request traces, you use the Jaeger visualization tool.
28+
29+
1. To open the Jaeger UI, enter the following command:
30+
31+
```bash
32+
kubectl proxy
33+
```
34+
35+
This command starts a local proxy of Jaeger on port 8001. For security
36+
reasons, the Jaeger UI is exposed only within the cluster.
37+
38+
1. Access the Jaeger UI at the following URL:
39+
40+
```
41+
http://localhost:8001/api/v1/namespaces/<namespace>/services/jaeger-query:16686/proxy/search/
42+
```
43+
Where `<namespace>` is the namespace where Jaeger is deployed, for example, `knative-serving`.
44+
45+
1. Select the service of interest and click "Find Traces" to see the latest
46+
traces. Click on a trace to see a detailed view of a specific call.

0 commit comments

Comments
 (0)