Skip to content

Commit

Permalink
published 0.6.7
Browse files Browse the repository at this point in the history
  - (updated) Added request tracing
  • Loading branch information
jonrobins committed Feb 15, 2018
1 parent 2dce4c3 commit c79c20e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ app.use(micro([options]));
- `monitorsPath`: `String` Path to load monitors. Defaults to `monitors`.
- `partialResponseQuery`: `String` The query parameter to use for partial reponse. Defaults to `fields`.
- `correlationHeaderName`: `String` The name of your correlation header. Defaults to `X-CorrelationID`.
- `enableBodyParsing`: `boolean` Enable or disable body parsing, useful to disable when dealing with content other than JSON. Enables express-validator. Defaults to `true`.
- `validatorOptions`: `object` Enable express-validator with these options. Defaults to `null`.
- `etag`: `boolean` Activate etag.
- `requestTracing`: `boolean` Enabled request log trace. Defaults to `false`.
- `enableBodyParsing`: `boolean` Enable or disable body parsing, useful to disable when dealing with content other than JSON. Enables express-validator. Defaults to `true`.
- `enableEtag`: `boolean` Activate etag. Defaults to `false`.
- `enableRequestTracing`: `boolean` Enabled request log trace. Defaults to `false`.

## SWAGGER Integration

Expand Down
2 changes: 1 addition & 1 deletion example/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ app.use(micro({
debug: true,
controllersPath: './controllers',
monitorsPath: './monitors',
requestTracing: true
enableRequestTracing: true
}));

app.on('service:registered', function (data) {
Expand Down
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,12 @@ var buildOptions = function(options) {
options.zookeeper = { connectionString: 'localhost:2181', retry: { count: 5 } };
options.partialResponseQuery = options.partialResponseQuery || 'fields';
options.correlationHeaderName = options.correlationHeaderName || 'X-CorrelationID';
options.enableBodyParsing = options.enableBodyParsing || true;
options.validatorOptions = options.validatorOptions || null;
options.etag = options.etag || false;
options.requestTracing = options.requestTracing || false;

// Feature Flags
options.enableBodyParsing = options.enableBodyParsing || true;
options.enableEtag = options.enableEtag || false;
options.enableRequestTracing = options.enableRequestTracing || false;

// Return now if we have no config
if (!config.app) {
Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function (app, options) {
app.use(correlate({ headerName: options.correlationHeaderName }));

// Enable request Tracing
if (options.requestTracing) {
if (options.enableRequestTracing) {
app.use(requestTracing);
}

Expand Down

0 comments on commit c79c20e

Please sign in to comment.