Skip to content

Commit 9771318

Browse files
authored
KEP-647: Update apiserver tracing to GA for 1.30 (#4333)
* update apiserver tracing to GA for 1.30 * add PRR * toc * udpate PRR questionaire for stable * scalability follow-up
1 parent 4de839f commit 9771318

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

Diff for: keps/prod-readiness/sig-instrumentation/647.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ alpha:
33
approver: "@wojtek-t"
44
beta:
55
approver: "@wojtek-t"
6+
stable:
7+
approver: "@wojtek-t"

Diff for: keps/sig-instrumentation/647-apiserver-tracing/README.md

+20-12
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
- [Exporting Spans](#exporting-spans)
1616
- [Running the OpenTelemetry Collector](#running-the-opentelemetry-collector)
1717
- [APIServer Configuration and EgressSelectors](#apiserver-configuration-and-egressselectors)
18-
- [Controlling use of the OpenTelemetry library](#controlling-use-of-the-opentelemetry-library)
1918
- [Test Plan](#test-plan)
2019
- [Prerequisite testing updates](#prerequisite-testing-updates)
2120
- [Unit tests](#unit-tests)
@@ -167,10 +166,6 @@ type TracingConfiguration struct {
167166

168167
If `--opentelemetry-config-file` is not specified, the API Server will not send any spans, even if incoming requests ask for sampling.
169168

170-
### Controlling use of the OpenTelemetry library
171-
172-
As the community found in the [Metrics Stability Framework KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-instrumentation/1209-metrics-stability/kubernetes-control-plane-metrics-stability.md#kubernetes-control-plane-metrics-stability), having control over how the client libraries are used in kubernetes can enable maintainers to enforce policy and make broad improvements to the quality of telemetry. To enable future improvements to tracing, we will restrict the direct use of the OpenTelemetry library within the kubernetes code base, and provide wrapped versions of functions we wish to expose in a utility library.
173-
174169
### Test Plan
175170

176171
[X] I/we understand the owners of the involved components may require updates to
@@ -187,12 +182,16 @@ None.
187182

188183
##### Unit tests
189184

190-
- `staging/src/k8s.io/apiserver/pkg/server/options/tracing_test.go`: `10/10/2021`
191-
- `staging/src/k8s.io/component-base/tracing/api/v1/config_test.go`: `10/10/21`
185+
- `staging/src/k8s.io/apiserver/pkg/server/options/tracing_test.go`: `10/10/2021` 42.6%
186+
- `staging/src/k8s.io/component-base/tracing/api/v1/config_test.go`: `10/10/2021` 59.0%
192187

193188
##### Integration tests
194189

195-
- ``test/integration/apiserver/tracing/tracing_test.go`
190+
- `test/integration/apiserver/tracing/tracing_test.go`
191+
- TestAPIServerTracingWithKMSv2: https://storage.googleapis.com/k8s-triage/index.html?pr=1&job=integration&test=TestAPIServerTracingWithKMSv2
192+
- TestAPIServerTracingWithEgressSelector: https://storage.googleapis.com/k8s-triage/index.html?pr=1&job=integration&test=TestAPIServerTracingWithEgressSelector
193+
- TestAPIServerTracing: https://storage.googleapis.com/k8s-triage/index.html?pr=1&job=integration&test=TestAPIServerTracing
194+
196195

197196
##### e2e tests
198197

@@ -207,15 +206,20 @@ Alpha
207206

208207
Beta
209208

210-
- [] Tracing 100% of requests does not break scalability tests (this does not necessarily mean trace backends can handle all the data).
209+
- [X] Tracing 100% of requests does not break scalability tests (this does not necessarily mean trace backends can handle all the data).
210+
- Verified in a manual run: https://github.com/kubernetes/kubernetes/pull/113695#issuecomment-1307665358. This is not part of periodic tests, although it may be useful for debugging with a low sampling rate in the future.
211211
- [X] OpenTelemetry reaches GA
212-
- [] Publish examples of how to use the OT Collector with kubernetes
212+
- [X] Publish examples of how to use the OT Collector with kubernetes
213213
- [X] Allow time for feedback
214-
- [] Revisit the format used to export spans.
215-
- [] Parity with the old text-based Traces
214+
- [X] Revisit the format used to export spans.
215+
- [X] Parity with the old text-based Traces
216216

217217
GA
218218

219+
- [ ] Publish guidelines for kubernetes components on when and how to add tracing to a component.
220+
- [ ] Graduate the TracingConfiguration component config to v1.
221+
- [ ] Define and document stability guarantees for trace instrumentation.
222+
- [ ] Add support for On-Demand trace collection as described above.
219223

220224
### Upgrade / Downgrade Strategy
221225

@@ -333,6 +337,10 @@ previous answers based on experience in the field._
333337
###### Will enabling / using this feature result in non-negligible increase of resource usage (CPU, RAM, disk, IO, ...) in any components?
334338
The tracing client library has a small, in-memory cache for outgoing spans. Based on current benchmarks, a full cache could use as much as 5 Mb of memory.
335339

340+
###### Can enabling / using this feature result in resource exhaustion of some node resources (PIDs, sockets, inodes, etc.)?
341+
342+
No. Collecting and exporter spans does not use additional node resources even when it is failing to connect to the backend.
343+
336344
### Troubleshooting
337345

338346
The Troubleshooting section currently serves the `Playbook` role. We may consider

Diff for: keps/sig-instrumentation/647-apiserver-tracing/kep.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ approvers:
1919
- "@lavalamp"
2020
see-also:
2121
replaces:
22-
stage: beta
23-
last-updated: 2022-09-29
24-
latest-milestone: "v1.27"
22+
stage: stable
23+
last-updated: 2023-11-10
24+
latest-milestone: "v1.30"
2525
milestone:
2626
alpha: "v1.22"
2727
beta: "v1.27"
28+
stable: "v1.30"
2829
feature-gates:
2930
- name: APIServerTracing
3031
disable-supported: true

0 commit comments

Comments
 (0)