Skip to content

Commit

Permalink
feat(moxy): return empty agentcfg instead of logging an error (#177)
Browse files Browse the repository at this point in the history
apm-server will use the es fetcher to search for agentcfg
return an empty response to avoid logging errors
  • Loading branch information
kruskall authored Oct 29, 2024
1 parent 7aab0f3 commit 5461597
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/proxy/stub_es.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ func (h stubES) ServeHTTP(w http.ResponseWriter, req *http.Request) {
case "/":
_, _ = w.Write(h.info)
return
case "/.apm-agent-configuration/_search":
w.Header().Set("Content-Type", "application/json")
_, _ = w.Write([]byte(`{}`))
w.WriteHeader(http.StatusOK)
case "/_license":
_, _ = w.Write(h.license)
return
Expand Down

0 comments on commit 5461597

Please sign in to comment.