Skip to content

Commit

Permalink
chore(release): 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
raimondo.fusco committed Sep 20, 2019
1 parent a531454 commit 1971c00
Show file tree
Hide file tree
Showing 12 changed files with 217 additions and 365 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### 0.0.1 (2019-09-20)
136 changes: 64 additions & 72 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,148 +1,140 @@
**[fastify-opencensus](README.md)**

[Globals](README.md)
[fastify-opencensus](README.md)

# fastify-opencensus

## Index

### Modules

* ["fastify"](modules/_fastify_.md)
- ["fastify"](modules/_fastify_.md)

### Classes

* [OpenCensusMetrics](classes/opencensusmetrics.md)
- [OpenCensusMetrics](classes/opencensusmetrics.md)

### Interfaces

* [Exporters](interfaces/exporters.md)
* [FastifyOpenCensus](interfaces/fastifyopencensus.md)
* [HTTPMetric](interfaces/httpmetric.md)
* [Metrics](interfaces/metrics.md)
* [PluginOptions](interfaces/pluginoptions.md)
- [FastifyOpenCensus](interfaces/fastifyopencensus.md)
- [HTTPMetric](interfaces/httpmetric.md)
- [Metrics](interfaces/metrics.md)
- [PluginOptions](interfaces/pluginoptions.md)

### Functions

* [collectMetricsForUrl](README.md#const-collectmetricsforurl)
* [fastifyOpenCensusPlugin](README.md#const-fastifyopencensusplugin)
* [sinceInMilliseconds](README.md#sinceinmilliseconds)
- [collectMetricsForUrl](README.md#const-collectmetricsforurl)
- [fastifyOpenCensusPlugin](README.md#const-fastifyopencensusplugin)
- [sinceInMilliseconds](README.md#sinceinmilliseconds)

### Object literals

* [errorTagKey](README.md#const-errortagkey)
* [methodTagKey](README.md#const-methodtagkey)
* [statusTagKey](README.md#const-statustagkey)
- [errorTagKey](README.md#const-errortagkey)
- [methodTagKey](README.md#const-methodtagkey)
- [statusTagKey](README.md#const-statustagkey)

## Functions

### `Const` collectMetricsForUrl

**collectMetricsForUrl**(`blacklist`: RegExp | Array‹string› | string | undefined, `url`: string): *boolean*
**collectMetricsForUrl**(`blacklist`: RegExp | Array‹string› | string | undefined, `url`: string): _boolean_

Defined in util.ts:1
_Defined in [util.ts:1](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/util.ts#L1)_

**Parameters:**

Name | Type |
------ | ------ |
`blacklist` | RegExp | Array‹string› | string | undefined |
`url` | string |
| Name | Type |
| ----------- | ---------------------------------------------------------- |
| `blacklist` | RegExp | Array‹string› | string | undefined |
| `url` | string |

**Returns:** *boolean*
**Returns:** _boolean_

___
---

### `Const` fastifyOpenCensusPlugin

**fastifyOpenCensusPlugin**(`fastify`: FastifyInstance, `__namedParameters`: object, `next`: fastifyPlugin.nextCallback): *void*
**fastifyOpenCensusPlugin**(`fastify`: FastifyInstance, `__namedParameters`: object, `next`: fastifyPlugin.nextCallback): _void_

*Defined in [index.ts:46](https://github.com/SkeLLLa/fastify-metrics/blob/38505d8/src/index.ts#L46)*
_Defined in [index.ts:46](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/index.ts#L46)_

Fastify OpenCensus plugin

**Parameters:**

**fastify**: *FastifyInstance*
**fastify**: _FastifyInstance_

`Default value` **__namedParameters**: *object*= {}
`Default value` **\_\_namedParameters**: _object_= {}

Name | Type | Default |
------ | ------ | ------ |
`blacklist` | undefined | string | RegExp | string[] | - |
`enableDefaultMetrics` | boolean | true |
`enableStats` | boolean | true |
`enableTracing` | boolean | false |
`endpoint` | undefined | string | - |
`groupStatusCodes` | boolean | false |
`interval` | number | 5000 |
`metrics` | [Metrics](interfaces/metrics.md) | - |
`metricsExporter` | undefined | StatsEventListener[] | - |
`pluginName` | string | "opencensus" |
`prefix` | undefined | string | - |
`register` | undefined | Stats | - |
`tracing` | undefined | Tracing | - |
`tracingExporter` | undefined | Exporter[] | - |
`zPagesOptions` | undefined | __type | - |
| Name | Type | Default |
| ---------------------- | ----------------------------------------------------- | ------------ |
| `blacklist` | undefined | string | RegExp | string[] | - |
| `enableDefaultMetrics` | boolean | true |
| `enableStats` | boolean | true |
| `groupStatusCodes` | boolean | false |
| `interval` | number | 5000 |
| `metrics` | [Metrics](interfaces/metrics.md) | - |
| `metricsExporter` | undefined | StatsEventListener[] | - |
| `pluginName` | string | "opencensus" |
| `prefix` | undefined | string | - |
| `stats` | Stats | globalStats |

**next**: *fastifyPlugin.nextCallback*
**next**: _fastifyPlugin.nextCallback_

**Returns:** *void*
**Returns:** _void_

___
---

### sinceInMilliseconds
### sinceInMilliseconds

**sinceInMilliseconds**(`startNanoseconds`: number): *number*
**sinceInMilliseconds**(`startNanoseconds`: number): _number_

Defined in util.ts:19
_Defined in [util.ts:19](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/util.ts#L19)_

**Parameters:**

Name | Type |
------ | ------ |
`startNanoseconds` | number |
| Name | Type |
| ------------------ | ------ |
| `startNanoseconds` | number |

**Returns:** *number*
**Returns:** _number_

## Object literals

### `Const` errorTagKey

### **errorTagKey**: *object*
### **errorTagKey**: _object_

Defined in stat.ts:8
_Defined in [stat.ts:8](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L8)_

### name
### name

**name**: *string* = "route"
**name**: _string_ = "route"

Defined in stat.ts:8
_Defined in [stat.ts:8](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L8)_

___
---

### `Const` methodTagKey

### **methodTagKey**: *object*
### **methodTagKey**: _object_

Defined in stat.ts:6
_Defined in [stat.ts:6](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L6)_

### name
### name

**name**: *string* = "method"
**name**: _string_ = "method"

Defined in stat.ts:6
_Defined in [stat.ts:6](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L6)_

___
---

### `Const` statusTagKey

### **statusTagKey**: *object*
### **statusTagKey**: _object_

Defined in stat.ts:7
_Defined in [stat.ts:7](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L7)_

### name
### name

**name**: *string* = "status_code"
**name**: _string_ = "status_code"

Defined in stat.ts:7
_Defined in [stat.ts:7](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L7)_
122 changes: 41 additions & 81 deletions docs/classes/opencensusmetrics.md
Original file line number Diff line number Diff line change
@@ -1,132 +1,92 @@
**[fastify-opencensus](../README.md)**

[Globals](../README.md)[OpenCensusMetrics](opencensusmetrics.md)
[fastify-opencensus](../README.md)[OpenCensusMetrics](opencensusmetrics.md)

# Class: OpenCensusMetrics

## Hierarchy

* **OpenCensusMetrics**
- **OpenCensusMetrics**

## Index

### Constructors

* [constructor](opencensusmetrics.md#constructor)
- [constructor](opencensusmetrics.md#constructor)

### Properties

* [mLatency](opencensusmetrics.md#mlatency)
* [stats](opencensusmetrics.md#stats)
* [tracing](opencensusmetrics.md#tracing)
- [mLatency](opencensusmetrics.md#mlatency)
- [stats](opencensusmetrics.md#stats)

### Methods

* [createMetrics](opencensusmetrics.md#createmetrics)
* [recordLatencyMeasurement](opencensusmetrics.md#recordlatencymeasurement)
* [startTracing](opencensusmetrics.md#starttracing)
* [startZPagesServer](opencensusmetrics.md#startzpagesserver)
- [createMetrics](opencensusmetrics.md#createmetrics)
- [recordLatencyMeasurement](opencensusmetrics.md#recordlatencymeasurement)

## Constructors

### constructor
### constructor

\+ **new OpenCensusMetrics**(`_stats`: Stats, `_tracing`: Tracing, `exporters?`: [Exporters](../interfaces/exporters.md)): *[OpenCensusMetrics](opencensusmetrics.md)*
\+ **new OpenCensusMetrics**(`_stats`: Stats, `metricsExporters?`: Array‹StatsEventListener›): _[OpenCensusMetrics](opencensusmetrics.md)_

Defined in stat.ts:20
_Defined in [stat.ts:12](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L12)_

**Parameters:**

Name | Type |
------ | ------ |
`_stats` | Stats |
`_tracing` | Tracing |
`exporters?` | [Exporters](../interfaces/exporters.md) |
| Name | Type |
| ------------------- | ------------------------- |
| `_stats` | Stats |
| `metricsExporters?` | Array‹StatsEventListener› |

**Returns:** *[OpenCensusMetrics](opencensusmetrics.md)*
**Returns:** _[OpenCensusMetrics](opencensusmetrics.md)_

## Properties

### mLatency

**mLatency**: *Measure*

Defined in stat.ts:18

___

### stats
### mLatency

**stats**: *Stats*
**mLatency**: _Measure_

Defined in stat.ts:19
_Defined in [stat.ts:11](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L11)_

___
---

### tracing
### stats

**tracing**: *Tracing*
**stats**: _Stats_

Defined in stat.ts:20
_Defined in [stat.ts:12](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L12)_

## Methods

### createMetrics

**createMetrics**(`metrics`: [Metrics](../interfaces/metrics.md), `_prefix?`: undefined | string): *void*

Defined in stat.ts:36

**Parameters:**

Name | Type |
------ | ------ |
`metrics` | [Metrics](../interfaces/metrics.md) |
`_prefix?` | undefined | string |

**Returns:** *void*

___
### createMetrics

### recordLatencyMeasurement
**createMetrics**(`metrics`: [Metrics](../interfaces/metrics.md), `_prefix?`: undefined | string): _void_

**recordLatencyMeasurement**(`_value`: number, `method`: string, `statusCode`: string | number, `routeId`: string): *void*

Defined in stat.ts:73
_Defined in [stat.ts:22](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L22)_

**Parameters:**

Name | Type |
------ | ------ |
`_value` | number |
`method` | string |
`statusCode` | string | number |
`routeId` | string |

**Returns:** *void*

___

### startTracing

**startTracing**(): *void*

Defined in stat.ts:85
| Name | Type |
| ---------- | ----------------------------------- |
| `metrics` | [Metrics](../interfaces/metrics.md) |
| `_prefix?` | undefined | string |

**Returns:** *void*
**Returns:** _void_

___
---

### startZPagesServer
### recordLatencyMeasurement

**startZPagesServer**(`options`: any): *void*
**recordLatencyMeasurement**(`_value`: number, `method`: string, `statusCode`: string | number, `routeId`: string): _void_

Defined in stat.ts:89
_Defined in [stat.ts:59](https://github.com/rhaymo/fastify-opencensus/blob/a531454/src/stat.ts#L59)_

**Parameters:**

Name | Type |
------ | ------ |
`options` | any |
| Name | Type |
| ------------ | -------------------- |
| `_value` | number |
| `method` | string |
| `statusCode` | string | number |
| `routeId` | string |

**Returns:** *void*
**Returns:** _void_

0 comments on commit 1971c00

Please sign in to comment.