Skip to content

Commit 82addef

Browse files
committed
formatting
1 parent c35f925 commit 82addef

File tree

1 file changed

+20
-25
lines changed

1 file changed

+20
-25
lines changed

keps/sig-instrumentation/0034-distributed-tracing-kep.md

Lines changed: 20 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Along with metrics and logs, traces are a useful form of telemetry to aid with d
7777

7878
### Tracing API Requests
7979

80-
We will wrap the API Server's http server and http clients with [othttp](https://github.com/open-telemetry/opentelemetry-go/tree/master/plugin/othttp) to get spans for incoming and outgoing http requests. This generates spans for all sampled incoming requests and propagates context with all client requests. For incoming requests, this would go below [WithRequestInfo](https://github.com/kubernetes/kubernetes/blob/9eb097c4b07ea59c674a69e19c1519f0d10f2fa8/staging/src/k8s.io/apiserver/pkg/server/config.go#L676) in the filter stack, as it must be after authentication and authorization, before the panic filter, and is closest in function to the WithRequestInfo filter.
80+
We will wrap the API Server's http server and http clients with [otelhttp](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/master/instrumentation/net/http/otelhttp) to get spans for incoming and outgoing http requests. This generates spans for all sampled incoming requests and propagates context with all client requests. For incoming requests, this would go below [WithRequestInfo](https://github.com/kubernetes/kubernetes/blob/9eb097c4b07ea59c674a69e19c1519f0d10f2fa8/staging/src/k8s.io/apiserver/pkg/server/config.go#L676) in the filter stack, as it must be after authentication and authorization, before the panic filter, and is closest in function to the WithRequestInfo filter.
8181

8282
Note that some clients of the API Server, such as webhooks, may make reentrant calls to the API Server. To gain the full benefit of tracing, such clients should propagate context with requests back to the API Server.
8383

@@ -102,36 +102,31 @@ The API Server controls where traffic is sent using an [EgressSelector](https://
102102
type OpenTelemetryClientConfiguration struct {
103103
metav1.TypeMeta `json:",inline"`
104104

105-
// +optional
106-
// URL of the collector that's running on the master.
105+
// +optional
106+
// URL of the collector that's running on the master.
107107
// if URL is specified, APIServer uses the egressType Master when sending tracing data to the collector.
108-
URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"`
108+
URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"`
109109

110-
// +optional
111-
// Service that's the frontend of the collector deployment running in the cluster.
112-
// If Service is specified, APIServer uses the egressType Cluster when sending tracing data to the collector.
113-
Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"`
110+
// +optional
111+
// Service that's the frontend of the collector deployment running in the cluster.
112+
// If Service is specified, APIServer uses the egressType Cluster when sending tracing data to the collector.
113+
Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"`
114114
}
115115

116116
// ServiceReference holds a reference to Service.legacy.k8s.io
117117
type ServiceReference struct {
118-
// `namespace` is the namespace of the service.
119-
// Required
120-
Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"`
121-
// `name` is the name of the service.
122-
// Required
123-
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
124-
125-
// `path` is an optional URL path which will be sent in any request to
126-
// this service.
127-
// +optional
128-
Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"`
129-
130-
// If specified, the port on the service that hosting webhook.
131-
// Default to 443 for backward compatibility.
132-
// `port` should be a valid port number (1-65535, inclusive).
133-
// +optional
134-
Port *int32 `json:"port,omitempty" protobuf:"varint,4,opt,name=port"`
118+
// `namespace` is the namespace of the service.
119+
// Required
120+
Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"`
121+
// `name` is the name of the service.
122+
// Required
123+
Name string `json:"name" protobuf:"bytes,2,opt,name=name"`
124+
125+
// If specified, the port on the service.
126+
// Defaults to 55680.
127+
// `port` should be a valid port number (1-65535, inclusive).
128+
// +optional
129+
Port *int32 `json:"port,omitempty" protobuf:"varint,3,opt,name=port"`
135130
}
136131
```
137132

0 commit comments

Comments
 (0)