forked from googleapis/cloud-trace-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
72 lines (61 loc) · 2.74 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/**
* Copyright 2015 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
'use strict';
// Default configuration
module.exports = {
trace: {
// Log levels: 0-disabled,1-error,2-warn,3-info,4-debug
logLevel: 1,
enabled: true,
// If true, information about query parameters and results will be
// attached to spans representating database operations.
enhancedDatabaseReporting: false,
// The maximum result size in characters to report on database spans if
// `enhancedDatabaseReporting` is enabled.
databaseResultReportingSize: 127,
// Valid entries are:
// 'express', 'hapi', 'http', 'restify'
excludedHooks: [],
// @type {number} max number of frames to include on traces (0 disables)
stackTraceLimit: 10,
// We buffer the captured traces for `flushDelaySeconds` before publishing
// to the trace API; unless the buffer fills up before then.
// See `bufferSize`.
flushDelaySeconds: 30,
// If paths are present in this array, then these paths will be ignored before
// `samplingRate` based decisions are made. Paths must include a leading
// forward slash and be of the form:
// /componentOne/componentTwo/...
// Paths can additionally be classified by regex in which case any path matching
// any provided regex will be ignored.
// We ignore the health checker probes (/_ah/health) by default.
ignoreUrls: [ '/_ah/health' ],
// An upper bound on the number of traces to gather each second. If set to 0,
// sampling is disabled and all traces are recorded. Sampling rates greater
// than 1000 are not supported and will result in at most 1000 samples per
// second. Some Google Cloud environments may further limit this rate.
samplingRate: 10,
// The number of transactions we buffer before we publish to the trace
// API, unless we hit `flushDelaySeconds` first.
bufferSize: 1000,
// Specifies the behavior of the trace agent in the case of an uncaught exception.
// Possible values are:
// `ignore`: Take no action.
// `flush`: Attempt to publish traces silence the exception.
// `flushAndExit`: Attempt to publish traces and exit the process.
onUncaughtException: 'ignore'
}
};