@opentelemetry/metrics
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -295,24 +295,2 @@ /*! | ||
/** | ||
* Keeps a set of MetricProducer that is used by exporters to determine the | ||
* metrics that need to be exported. | ||
*/ | ||
export interface MetricProducerManager { | ||
/** Adds the MetricProducer to the manager */ | ||
add(metricProducer: MetricProducer): void; | ||
/** Removes the MetricProducer to the manager */ | ||
remove(metricProducer: MetricProducer): void; | ||
/** Clears all MetricProducers */ | ||
removeAll(): void; | ||
/** Gets all registered MetricProducers that should be exported */ | ||
getAllMetricProducer(): Set<MetricProducer>; | ||
} | ||
/** | ||
* A MetricProducer producer that can be registered for exporting using | ||
* MetricProducerManager. | ||
*/ | ||
export interface MetricProducer { | ||
/** Gets a collection of produced Metric`s to be exported */ | ||
getMetrics(): ReadableMetric[]; | ||
} | ||
/** | ||
* Base interface that represents a metric exporter | ||
@@ -319,0 +297,0 @@ */ |
@@ -19,3 +19,4 @@ /*! | ||
export * from './Metric'; | ||
export * from './MeterRegistry'; | ||
export * from './export/ConsoleMetricExporter'; | ||
export * from './export/types'; |
@@ -24,4 +24,5 @@ "use strict"; | ||
__export(require("./Metric")); | ||
__export(require("./MeterRegistry")); | ||
__export(require("./export/ConsoleMetricExporter")); | ||
__export(require("./export/types")); | ||
//# sourceMappingURL=index.js.map |
@@ -155,3 +155,2 @@ "use strict"; | ||
if (this._metrics.has(name)) { | ||
// @todo (issue/474): decide how to handle already registered metric | ||
this._logger.error(`A metric with the name ${name} has already been registered.`); | ||
@@ -158,0 +157,0 @@ return; |
@@ -16,2 +16,2 @@ /*! | ||
*/ | ||
export declare const VERSION = "0.3.2"; | ||
export declare const VERSION = "0.3.3"; |
@@ -19,3 +19,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.3.2'; | ||
exports.VERSION = '0.3.3'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/metrics", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "OpenTelemetry metrics SDK", | ||
@@ -53,3 +53,3 @@ "main": "build/src/index.js", | ||
"ts-mocha": "^6.0.0", | ||
"ts-node": "^8.3.0", | ||
"ts-node": "^8.6.2", | ||
"tslint-consistent-codestyle": "^1.15.1", | ||
@@ -60,6 +60,6 @@ "tslint-microsoft-contrib": "^6.2.0", | ||
"dependencies": { | ||
"@opentelemetry/base": "^0.3.2", | ||
"@opentelemetry/core": "^0.3.2", | ||
"@opentelemetry/types": "^0.3.2" | ||
"@opentelemetry/base": "^0.3.3", | ||
"@opentelemetry/core": "^0.3.3", | ||
"@opentelemetry/types": "^0.3.3" | ||
} | ||
} |
@@ -22,6 +22,6 @@ # OpenTelemetry Metrics SDK | ||
```js | ||
const { Meter } = require('@opentelemetry/metrics'); | ||
const { MeterRegistry } = require('@opentelemetry/metrics'); | ||
// Initialize the Meter to capture measurements in various ways. | ||
const meter = new Meter(); | ||
const meter = new MeterRegistry().getMeter('your-meter-name'); | ||
@@ -44,6 +44,6 @@ const counter = meter.createCounter('metric_name', { | ||
```js | ||
const { Meter } = require('@opentelemetry/metrics'); | ||
const { MeterRegistry } = require('@opentelemetry/metrics'); | ||
// Initialize the Meter to capture measurements in various ways. | ||
const meter = new Meter(); | ||
const meter = new MeterRegistry().getMeter('your-meter-name'); | ||
@@ -50,0 +50,0 @@ const gauge = meter.createGauge('metric_name', { |
82766
29
1725
Updated@opentelemetry/base@^0.3.3
Updated@opentelemetry/core@^0.3.3
Updated@opentelemetry/types@^0.3.3