Skip to content

Commit

Permalink
docs(plugin-http): add option descriptions (open-telemetry#352)
Browse files Browse the repository at this point in the history
closes open-telemetry#351

Signed-off-by: Olivier Albertini <[email protected]>
  • Loading branch information
OlivierAlbertini authored and danielkhan committed Sep 27, 2019
1 parent f341267 commit 998b95d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/opentelemetry-plugin-http/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const tracer = new NodeTracer({
enabled: true,
// You may use a package name or absolute path to the file.
path: '@opentelemetry/plugin-http',
ignoreOutgoingUrls: [/spans/]
// http plugin options
}
}
});
Expand All @@ -44,6 +44,16 @@ const tracer = new NodeTracer();

See [examples/http](https://github.com/open-telemetry/opentelemetry-js/tree/master/examples/http) for a short example.

### Http Plugin Options

Http plugin has few options available to choose from. You can set the following:

| Options | Type | Description |
| ------- | ---- | ----------- |
| [`applyCustomAttributesOnSpan`](https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-plugin-http/src/types.ts#L52) | `HttpCustomAttributeFunction` | Function for adding custom attributes |
| [`ignoreIncomingPaths`](https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-plugin-http/src/types.ts#L28) | `IgnoreMatcher[]` | Http plugin will not trace all incoming requests that match paths |
| [`ignoreOutgoingUrls`](https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-plugin-http/src/types.ts#L28) | `IgnoreMatcher[]` | Http plugin will not trace all outgoing requests that match urls |

## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
Expand Down

0 comments on commit 998b95d

Please sign in to comment.