From 84bf9cd56fadf63ec3d341aac4cf79410c815d0d Mon Sep 17 00:00:00 2001 From: Kelvin Jin Date: Fri, 2 Feb 2018 12:21:50 -0800 Subject: [PATCH 1/3] doc: update broken references to config --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 04bec4460..4b878f61f 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ If you are running somewhere other than the Google Cloud Platform, see [running ## Configuration -See [the default configuration](config.js) for a list of possible configuration options. These options can be passed to the agent through the object argument to the start command shown above: +See [the default configuration](src/config.ts) for a list of possible configuration options. These options can be passed to the agent through the object argument to the start command shown above: ```js require('@google-cloud/trace-agent').start({samplingRate: 500}); @@ -127,7 +127,7 @@ If your application is running outside of Google Cloud Platform, such as locally If you are running your application on a development machine or test environment where you are using the [`gcloud` command line tools][gcloud-sdk], and are logged using `gcloud beta auth application-default login`, you already have sufficient credentials, and a service account key is not required. -Alternatively, you may set the `keyFilename` or `credentials` configuration field to the full path or contents to the key file, respectively. Setting either of these fields will override either setting `GOOGLE_APPLICATION_CREDENTIALS` or logging in using `gcloud`. (See the [default configuration](config.js) for more details.) +Alternatively, you may set the `keyFilename` or `credentials` configuration field to the full path or contents to the key file, respectively. Setting either of these fields will override either setting `GOOGLE_APPLICATION_CREDENTIALS` or logging in using `gcloud`. (See the [default configuration](src/config.ts) for more details.) ## Viewing your traces @@ -164,13 +164,13 @@ We are working on expanding the types of frameworks and services we can do autom ## Advanced trace configuration -The trace agent can be configured by passing a configurations object to the agent `start` method. This configuration option accepts all values in the [default configuration](config.js). +The trace agent can be configured by passing a configurations object to the agent `start` method. This configuration option accepts all values in the [default configuration](src/config.ts). One configuration option of note is `enhancedDatabaseReporting`. Setting this option to `true` will cause database operations for redis and MongoDB to record query summaries and results as labels on reported trace spans. ### Trace batching and sampling -The aggregation of trace spans before publishing can be configured using the `flushDelaySeconds` and `bufferSize` [options](config.js). The spans recorded for each incoming requests are placed in a buffer after the request has completed. Spans will be published to the UI in batch when the spans from `bufferSize` requests have been queued in the buffer or after `flushDelaySeconds` have passed since the last publish, whichever comes first. +The aggregation of trace spans before publishing can be configured using the `flushDelaySeconds` and `bufferSize` [options](src/config.ts). The spans recorded for each incoming requests are placed in a buffer after the request has completed. Spans will be published to the UI in batch when the spans from `bufferSize` requests have been queued in the buffer or after `flushDelaySeconds` have passed since the last publish, whichever comes first. The trace configuration additionally exposes the `samplingRate` option which sets an upper bound on the number of traced requests captured per second. Some Google Cloud environments may override this sampling policy. From 85032cbdd4846f4489345d29234358545fc236ad Mon Sep 17 00:00:00 2001 From: Kelvin Jin Date: Fri, 2 Feb 2018 12:24:45 -0800 Subject: [PATCH 2/3] Update trace-api.md --- doc/trace-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/trace-api.md b/doc/trace-api.md index 7d8cabb30..0bda9219a 100644 --- a/doc/trace-api.md +++ b/doc/trace-api.md @@ -80,7 +80,7 @@ It is highly recommended for plugins to set this header field in responses, _if_ * Returns `string` * Returns a string that should be set in the response headers in a traced request. If incomingTraceContext is falsy (indicating that the incoming request didn't have a trace context), this function returns an empty string. -This function is usually called from within the function passed to `runInRootSpan`. See any of the built-in plugins ([express](../src/plugins/plugin-express.js#L42)) for an example. Note that the value for `isTraced` is based on the value of the root span - if a root span was created, that means that this request is being traced. +This function is usually called from within the function passed to `runInRootSpan`. See any of the built-in plugins ([express](https://github.com/GoogleCloudPlatform/cloud-trace-nodejs/blob/84bf9cd56fadf63ec3d341aac4cf79410c815d0d/src/plugins/plugin-express.ts#L42)) for an example. Note that the value for `isTraced` is based on the value of the root span - if a root span was created, that means that this request is being traced. ### For Outgoing Requests From 2542711f1a83c3ff90faf64aa9ca5015652ac34a Mon Sep 17 00:00:00 2001 From: Kelvin Jin Date: Fri, 2 Feb 2018 13:46:02 -0800 Subject: [PATCH 3/3] Update trace-api.md --- doc/trace-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/trace-api.md b/doc/trace-api.md index 0bda9219a..b32e83949 100644 --- a/doc/trace-api.md +++ b/doc/trace-api.md @@ -80,7 +80,7 @@ It is highly recommended for plugins to set this header field in responses, _if_ * Returns `string` * Returns a string that should be set in the response headers in a traced request. If incomingTraceContext is falsy (indicating that the incoming request didn't have a trace context), this function returns an empty string. -This function is usually called from within the function passed to `runInRootSpan`. See any of the built-in plugins ([express](https://github.com/GoogleCloudPlatform/cloud-trace-nodejs/blob/84bf9cd56fadf63ec3d341aac4cf79410c815d0d/src/plugins/plugin-express.ts#L42)) for an example. Note that the value for `isTraced` is based on the value of the root span - if a root span was created, that means that this request is being traced. +This function is usually called from within the function passed to `runInRootSpan`. See any of the built-in plugins ([express](../src/plugins/plugin-express.ts)) for an example. Note that the value for `isTraced` is based on the value of the root span - if a root span was created, that means that this request is being traced. ### For Outgoing Requests