Skip to content

Commit

Permalink
Merge pull request #71 from yaorg/feature/additional_signalfx_logging
Browse files Browse the repository at this point in the history
feat(signalfx-reporter): add additional debug logging
  • Loading branch information
fieldju authored Aug 28, 2019
2 parents 6eafed1 + dd3036d commit 5f876f1
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ class SignalFxMetricsReporter extends Reporter {
* @param {ReporterOptions} [options] See {@link ReporterOptions}.
*/
constructor(signalFxClient, options) {
options = options || {};
super(options);
validateSignalFxClient(signalFxClient);
this._signalFxClient = signalFxClient;

this._log.debug(`SignalFx Metrics Reporter Created with the following default default reporting interval: ${options.defaultReportingIntervalInSeconds}, default dimensions: ${JSON.stringify(options.defaultDimensions, null, 2)}`);
}

/**
Expand All @@ -36,7 +39,7 @@ class SignalFxMetricsReporter extends Reporter {
signalFxDataPointRequest = this._processMetric(metric, signalFxDataPointRequest);
});

this._log.debug('Sending data to Signal Fx');
this._log.debug(`Sending data to Signal Fx. Request: ${JSON.stringify(signalFxDataPointRequest)}`);

this._signalFxClient.send(signalFxDataPointRequest).catch(error => {
this._log.error('Failed to send metrics to signal fx error:', error);
Expand Down

0 comments on commit 5f876f1

Please sign in to comment.