Skip to content

Commit

Permalink
Logging improvements for first error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Loring committed Mar 16, 2016
1 parent 76f2ae7 commit 58445fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/hooks/core/hook-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ function requestWrap(request) {
var root = cls.getRootContext();

if (!root) {
agent.logger.debug('Untraced http options:', options);
if (typeof options === 'string') {
options = url.parse(options);
}
agent.logger.debug('Untraced http uri:', uriFromOptions(options));
return request.apply(this, arguments);
} else if (root === SpanData.nullSpan) {
return request.apply(this, arguments);
Expand Down
2 changes: 1 addition & 1 deletion lib/trace-writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ TraceWriter.prototype.flushBuffer_ = function(projectId) {
// Privatize and clear the buffer.
var buffer = this.buffer_;
this.buffer_ = [];

this.logger_.debug('Flushing traces', buffer);
this.publish_(projectId, '{"traces":[' + buffer.join() + ']}');
};

Expand Down

0 comments on commit 58445fa

Please sign in to comment.