{"record":{"id":"f497076ee3d1b63d","repo":"tailscale/tailscale","slug":"error-sending-event-to-recorder-with-address-q","errorCode":null,"errorMessage":"error sending event to recorder with address %q: %v","messagePattern":"error sending event to recorder with address %q: (.+?)","errorType":"http","errorClass":null,"httpStatus":502,"severity":"error","filePath":"k8s-operator/api-proxy/proxy.go","lineNumber":422,"sourceCode":"\t}\n\treq.Body = io.NopCloser(bytes.NewReader(bodyBytes))\n\tevent.Request.Body = bodyBytes\n\n\tvar errs []error\n\t// TODO: ChaosInTheCRD ensure that if there are multiple addrs timing out we don't experience slowdown on client waiting for response.\n\tfail := true\n\tfor _, addr := range addrs {\n\t\tdata := new(bytes.Buffer)\n\t\tif err := json.NewEncoder(data).Encode(event); err != nil {\n\t\t\treturn fmt.Errorf(\"error marshaling request event: %w\", err)\n\t\t}\n\n\t\tif err := ap.sendEventFunc(addr, data, ap.ts.Dial); err != nil {\n\t\t\tif apiSupportErr, ok := err.(sessionrecording.EventAPINotSupportedErr); ok {\n\t\t\t\tap.log.Warnf(apiSupportErr.Error())\n\t\t\t\tfail = false\n\t\t\t} else {\n\t\t\t\terr := fmt.Errorf(\"error sending event to recorder with address %q: %v\", addr.String(), err)\n\t\t\t\terrs = append(errs, err)\n\t\t\t}\n\t\t} else {\n\t\t\treturn nil\n\t\t}\n\t}\n\n\tmerr := errors.Join(errs...)\n\tif fail && failOpen {\n\t\tmsg := fmt.Sprintf(\"[unexpected] failed to send event to recorders with errors: %s\", merr.Error())\n\t\tmsg = msg + \"; failure mode is 'fail open'; continuing request without recording.\"\n\t\tap.log.Warn(msg)\n\t\treturn nil\n\t}\n\n\treturn merr\n}\n","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/tailscale/tailscale/blob/6e0912f97994f927632b34ae9e63b53d6516a6ac/k8s-operator/api-proxy/proxy.go#L404-L440","documentation":"Streaming the encoded session-recording event to one of the tsrecorder addresses failed (with API-support failures handled separately), so that recorder didn't receive the event; failures across recorders aggregate and decide fail-open/fail-closed.","triggerScenarios":"Thrown at k8s-operator/api-proxy/proxy.go:422 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Sending the session-recording event to the recorder failed; verify the recorder address is correct and reachable from the operator."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6e0912f97994f927632b34ae9e63b53d6516a6ac","analyzedAt":"2026-08-18T08:17:25.280Z","contentChangedAt":"2026-08-18T08:17:25.280Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}