diff --git a/config.js b/config.js index 0bcdd2213..18a5d29db 100644 --- a/config.js +++ b/config.js @@ -19,7 +19,6 @@ var path = require('path'); // Default configuration module.exports = { - trace: { // Log levels: 0-disabled,1-error,2-warn,3-info,4-debug logLevel: 1, @@ -124,5 +123,4 @@ module.exports = { // For testing purposes only. // Used by unit tests to force loading of a new agent if one exists already. forceNewAgent_: false - } }; diff --git a/index.js b/index.js index 136345d0c..84075fe23 100644 --- a/index.js +++ b/index.js @@ -48,7 +48,7 @@ var initConfig = function(projectConfig) { logLevel: process.env.GCLOUD_TRACE_LOGLEVEL, projectId: process.env.GCLOUD_PROJECT }; - var config = extend(true, {}, require('./config.js').trace, projectConfig, envConfig); + var config = extend(true, {}, require('./config.js'), projectConfig, envConfig); if (config.maximumLabelValueSize > constants.TRACE_SERVICE_LABEL_VALUE_LIMIT) { config.maximumLabelValueSize = constants.TRACE_SERVICE_LABEL_VALUE_LIMIT; } diff --git a/test/fixtures/test-config.js b/test/fixtures/test-config.js index efa6a3750..ba7affe6c 100644 --- a/test/fixtures/test-config.js +++ b/test/fixtures/test-config.js @@ -16,10 +16,8 @@ 'use strict'; module.exports = { - trace: { - logLevel: 4, - stackTraceLimit: 1, - flushDelaySeconds: 31 - } + logLevel: 4, + stackTraceLimit: 1, + flushDelaySeconds: 31 }; diff --git a/test/fixtures/test-config.json b/test/fixtures/test-config.json index 67d6e6327..a8b9668ed 100644 --- a/test/fixtures/test-config.json +++ b/test/fixtures/test-config.json @@ -1,7 +1,5 @@ { - "trace": { - "logLevel": 4, - "stackTraceLimit": 1, - "flushDelaySeconds": 31 - } + "logLevel": 4, + "stackTraceLimit": 1, + "flushDelaySeconds": 31 } diff --git a/test/test-trace-api.js b/test/test-trace-api.js index c51299030..d66501967 100644 --- a/test/test-trace-api.js +++ b/test/test-trace-api.js @@ -23,7 +23,7 @@ var extend = require('extend'); var TraceAPI = require('../src/trace-api.js'); var TracingPolicy = require('../src/tracing-policy.js'); -var config = extend({}, require('../config.js').trace, +var config = extend({}, require('../config.js'), { samplingRate: 0, projectId: '0' }); var logger = require('@google-cloud/common').logger(); var agent = require('../src/trace-agent.js').get(config, logger);