Change:
assert.Equal(t, "WATCH", fmt.Sprintf("%v", verbWithReq)) } <ins> func TestLazyApiGroup(t *testing.T) { assert.Equal(t, "unknown", fmt.Sprintf("%v", &lazyAPIGroup{})) scopeWithEmptyReq := &lazyAPIGroup{&http.Request{}} assert.Equal(t, "unknown", fmt.Sprintf("%v", scopeWithEmptyReq)) req := &http.Request{} ctx := request.WithRequestInfo(context.TODO(), &request.RequestInfo{APIGroup: "apps"}) scopeWithReq := &lazyAPIGroup{req: req.WithContext(ctx)} assert.Equal(t, "apps", fmt.Sprintf("%v", scopeWithReq)) } func TestLazyApiVersion(t *testing.T) { assert.Equal(t, "unknown", fmt.Sprintf("%v", &lazyAPIVersion{})) scopeWithEmptyReq := &lazyAPIVersion{&http.Request{}} assert.Equal(t, "unknown", fmt.Sprintf("%v", scopeWithEmptyReq)) req := &http.Request{} ctx := request.WithRequestInfo(context.TODO(), &request.RequestInfo{APIVersion: "v1"}) scopeWithReq := &lazyAPIVersion{req: req.WithContext(ctx)} assert.Equal(t, "v1", fmt.Sprintf("%v", scopeWithReq)) } func TestLazyName(t *testing.T) { assert.Equal(t, "unknown", fmt.Sprintf("%v", &lazyName{})) scopeWithEmptyReq := &lazyName{&http.Request{}} assert.Equal(t, "unknown", fmt.Sprintf("%v", scopeWithEmptyReq)) req := &http.Request{} ctx := request.WithRequestInfo(context.TODO(), &request.RequestInfo{Name: "jaeger-76d45d6876-vqp8t"}) scopeWithReq := &lazyName{req: req.WithContext(ctx)} assert.Equal(t, "jaeger-76d45d6876-vqp8t", fmt.Sprintf("%v", scopeWithReq)) } func TestLazySubresource(t *testing.T) { assert.Equal(t, "unknown", fmt.Sprintf("%v", &lazySubresource{})) scopeWithEmptyReq := &lazySubresource{&http.Request{}} assert.Equal(t, "unknown", fmt.Sprintf("%v", scopeWithEmptyReq)) req := &http.Request{} ctx := request.WithRequestInfo(context.TODO(), &request.RequestInfo{Subresource: "binding"}) scopeWithReq := &lazySubresource{req: req.WithContext(ctx)} assert.Equal(t, "binding", fmt.Sprintf("%v", scopeWithReq)) } func TestLazyNamespace(t *testing.T) { assert.Equal(t, "unknown", fmt.Sprintf("%v", &lazyNamespace{})) scopeWithEmptyReq := &lazyNamespace{&http.Request{}} assert.Equal(t, "unknown", fmt.Sprintf("%v", scopeWithEmptyReq)) req := &http.Request{} ctx := request.WithRequestInfo(context.TODO(), &request.RequestInfo{Namespace: "jaeger"}) scopeWithReq := &lazyNamespace{req: req.WithContext(ctx)} assert.Equal(t, "jaeger", fmt.Sprintf("%v", scopeWithReq)) } </ins> func TestLazyResource(t *testing.T) { assert.Equal(t, "unknown", fmt.Sprintf("%v", &lazyResource{}))

Discussion:
Feedback originally provided on slack: It would be helpful to have additional fields on APIServer spans. This is the current set of attributes we provide: It would be helpful to add: group, version, namespace, name, and subresource, if possible. Part of
/sig instrumentation /sig apimachinery /priority important-longterm cc /triage accepted
The label(s) cannot be applied, because the repository doesn't have them. <detailsIn response to : /sig instrumentation /sig apimachinery /priority important-longterm cc /triage accepted Instructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/sig api-machinery
/assign