No errors for Go agent

I don’t see any errors anymore for my go-agent. Just get the page “Great! You have no errors for this time window!”

The transaction itself is monitored (e.g. in insights), but the error page is empty.

@Hans-Peter.Bauer Error reporting is a bit different for the Go agent than for most agents, so I made you a fresh new thread in the Go area. Can you share a permalink to the Go application where you don’t see errors? It sounds like you might have been seeing errors previously. If so, when did this change?

1 Like

@alexis we noticed the same today as we are preparing for a production launch. About the time we deployed 1.1.0 of the go agent error analytics stopped showing any data. I just updated the agent to the 1.4.0 and still no errors. We are not disabling error collection and are using the default values from NewConfig().

Here is a permalink showing where the errors stop:[end]=1475101140&tw[start]=1474496340#/metric/table?top_facet=transactionUiName&primary_facet=error.class&_k=tapkw9

In reviewing the go-agent code I figured out how to get the errors back into the error analytics - calling txn.WriteHeader(int) with the error code will report the error. I don’t see any reference to having to make that call in the documentation and we did not in the past when errors were showing up. There appears to have been a change in the agent behavior around 1.1.0.

FWIW we are not using WrapHandle but just StartTransaction(name, writer, request)/End() within custom middleware.

Is it now required to do that or is there an issue in the agent?

Hi mgarski

Transaction implements the http.ResponseWriter interface: The key is to use the transaction in place of the original response writer. This should ensure that the response code is recorded (and an error is recorded if the response code indicates a problem) without direct calls to txn.WriteHeader.

That’s not something we want to do as it ends up spreading instrumentation code out of middleware and we do not instrument every endpoint on our servers. We don’t care about metrics on load balancer health checks. Additionally our handlers do not directly write the response as our custom framework performs all response writing similar to the JSONEndpoint in Gizmo (

Everything worked as expected up until late September when the errors stopped showing up. Only change we made was to update the New Relic go agent - before that time there was no issue.

Hi mgarski

I’m stumped. I don’t know what would have caused this change. What version did you upgrade to 1.1.0 from?

Sigh. My bad - the earlier errors were from an earlier version that was instrumented differently. Probably do some refactoring on our side to write the response from the transaction for instrumented endpoints.