You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
apmzap does not start tracer loop when used, which means no metrics are sent periodically in the background. Only after a zap logger.Error is called, the tracer loop is started.
apmzap.Core.Write uses the default tracer and will start the tracer loop but apmzap.Core.Write is only called when apmzap.Core.Check allows: link to code. The side effect of starting the tracer loop on first logger.Error call seems unexpected.
The text was updated successfully, but these errors were encountered:
Given that apmzap is meant for correlating logs with traces, shouldn't the tracer be initialised by instrumentation independently of logging?
Yes that makes sense. @lahsivjar and I assumed that system metrics would be sent out of the box once we use apmzap, but it is reasonable that it does not. But what about the behavior that it starts sending after the first apmzap logger.Error is called?
@carsonip I agree that's a bit surprising. Actually my earlier comment is not really correct:
Given that apmzap is meant for correlating logs with traces
It's not just meant for that; it also sends errors. I think that's the issue here. I guess I see your thinking now: instrumenting something for tracing triggers metrics collection, so why doesn't instrumenting code for sending errors? Not sure if we can make them consistent while keeping a decent API, but I guess it's reasonable.
apmzap does not start tracer loop when used, which means no metrics are sent periodically in the background. Only after a zap logger.Error is called, the tracer loop is started.
apmzap.Core.Write
uses the default tracer and will start the tracer loop butapmzap.Core.Write
is only called whenapmzap.Core.Check
allows: link to code. The side effect of starting the tracer loop on first logger.Error call seems unexpected.The text was updated successfully, but these errors were encountered: