@opentelemetry/sdk-metrics
Advanced tools
Comparing version 1.24.1 to 1.25.0
@@ -1,2 +0,2 @@ | ||
import { Meter as IMeter, MetricOptions, Histogram, Counter, UpDownCounter, ObservableGauge, ObservableCounter, ObservableUpDownCounter, BatchObservableCallback, Observable, Attributes } from '@opentelemetry/api'; | ||
import { Meter as IMeter, MetricOptions, Histogram, Counter, UpDownCounter, ObservableGauge, ObservableCounter, ObservableUpDownCounter, BatchObservableCallback, Observable } from '@opentelemetry/api'; | ||
import { MeterSharedState } from './state/MeterSharedState'; | ||
@@ -12,5 +12,4 @@ import { Gauge } from './types'; | ||
* Create a {@link Gauge} instrument. | ||
* @experimental | ||
*/ | ||
createGauge<AttributesTypes extends Attributes = Attributes>(name: string, options?: MetricOptions): Gauge<AttributesTypes>; | ||
createGauge(name: string, options?: MetricOptions): Gauge; | ||
/** | ||
@@ -17,0 +16,0 @@ * Create a {@link Histogram} instrument. |
@@ -27,3 +27,2 @@ /* | ||
* Create a {@link Gauge} instrument. | ||
* @experimental | ||
*/ | ||
@@ -30,0 +29,0 @@ Meter.prototype.createGauge = function (name, options) { |
@@ -9,4 +9,2 @@ import { Context, MetricAttributes } from '@opentelemetry/api'; | ||
/** | ||
* @experimental | ||
* | ||
* This is intentionally not using the API's type as it's only available from @opentelemetry/api 1.9.0 and up. | ||
@@ -13,0 +11,0 @@ * In SDK 2.0 we'll be able to bump the minimum API version and remove this workaround. |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.24.1"; | ||
export declare const VERSION = "1.25.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export var VERSION = '1.24.1'; | ||
export var VERSION = '1.25.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -1,2 +0,2 @@ | ||
import { Meter as IMeter, MetricOptions, Histogram, Counter, UpDownCounter, ObservableGauge, ObservableCounter, ObservableUpDownCounter, BatchObservableCallback, Observable, Attributes } from '@opentelemetry/api'; | ||
import { Meter as IMeter, MetricOptions, Histogram, Counter, UpDownCounter, ObservableGauge, ObservableCounter, ObservableUpDownCounter, BatchObservableCallback, Observable } from '@opentelemetry/api'; | ||
import { MeterSharedState } from './state/MeterSharedState'; | ||
@@ -12,5 +12,4 @@ import { Gauge } from './types'; | ||
* Create a {@link Gauge} instrument. | ||
* @experimental | ||
*/ | ||
createGauge<AttributesTypes extends Attributes = Attributes>(name: string, options?: MetricOptions): Gauge<AttributesTypes>; | ||
createGauge(name: string, options?: MetricOptions): Gauge; | ||
/** | ||
@@ -17,0 +16,0 @@ * Create a {@link Histogram} instrument. |
@@ -27,3 +27,2 @@ /* | ||
* Create a {@link Gauge} instrument. | ||
* @experimental | ||
*/ | ||
@@ -30,0 +29,0 @@ createGauge(name, options) { |
@@ -9,4 +9,2 @@ import { Context, MetricAttributes } from '@opentelemetry/api'; | ||
/** | ||
* @experimental | ||
* | ||
* This is intentionally not using the API's type as it's only available from @opentelemetry/api 1.9.0 and up. | ||
@@ -13,0 +11,0 @@ * In SDK 2.0 we'll be able to bump the minimum API version and remove this workaround. |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.24.1"; | ||
export declare const VERSION = "1.25.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -17,3 +17,3 @@ /* | ||
// this is autogenerated file, see scripts/version-update.js | ||
export const VERSION = '1.24.1'; | ||
export const VERSION = '1.25.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -1,2 +0,2 @@ | ||
import { Meter as IMeter, MetricOptions, Histogram, Counter, UpDownCounter, ObservableGauge, ObservableCounter, ObservableUpDownCounter, BatchObservableCallback, Observable, Attributes } from '@opentelemetry/api'; | ||
import { Meter as IMeter, MetricOptions, Histogram, Counter, UpDownCounter, ObservableGauge, ObservableCounter, ObservableUpDownCounter, BatchObservableCallback, Observable } from '@opentelemetry/api'; | ||
import { MeterSharedState } from './state/MeterSharedState'; | ||
@@ -12,5 +12,4 @@ import { Gauge } from './types'; | ||
* Create a {@link Gauge} instrument. | ||
* @experimental | ||
*/ | ||
createGauge<AttributesTypes extends Attributes = Attributes>(name: string, options?: MetricOptions): Gauge<AttributesTypes>; | ||
createGauge(name: string, options?: MetricOptions): Gauge; | ||
/** | ||
@@ -17,0 +16,0 @@ * Create a {@link Histogram} instrument. |
@@ -30,3 +30,2 @@ "use strict"; | ||
* Create a {@link Gauge} instrument. | ||
* @experimental | ||
*/ | ||
@@ -33,0 +32,0 @@ createGauge(name, options) { |
@@ -9,4 +9,2 @@ import { Context, MetricAttributes } from '@opentelemetry/api'; | ||
/** | ||
* @experimental | ||
* | ||
* This is intentionally not using the API's type as it's only available from @opentelemetry/api 1.9.0 and up. | ||
@@ -13,0 +11,0 @@ * In SDK 2.0 we'll be able to bump the minimum API version and remove this workaround. |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "1.24.1"; | ||
export declare const VERSION = "1.25.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '1.24.1'; | ||
exports.VERSION = '1.25.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/sdk-metrics", | ||
"version": "1.24.1", | ||
"version": "1.25.0", | ||
"description": "OpenTelemetry metrics SDK", | ||
@@ -25,3 +25,4 @@ "main": "build/src/index.js", | ||
"prewatch": "node ../../scripts/version-update.js", | ||
"peer-api-check": "node ../../scripts/peer-api-check.js" | ||
"peer-api-check": "node ../../scripts/peer-api-check.js", | ||
"align-api-deps": "node ../../scripts/align-api-deps.js" | ||
}, | ||
@@ -58,13 +59,13 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "7.23.6", | ||
"@babel/preset-env": "7.22.20", | ||
"@opentelemetry/api": ">=1.3.0 <1.9.0", | ||
"@babel/core": "7.24.6", | ||
"@babel/preset-env": "7.24.6", | ||
"@opentelemetry/api": ">=1.3.0 <1.10.0", | ||
"@types/lodash.merge": "4.6.9", | ||
"@types/mocha": "10.0.6", | ||
"@types/node": "18.6.5", | ||
"@types/sinon": "10.0.20", | ||
"@types/sinon": "17.0.3", | ||
"babel-plugin-istanbul": "6.1.1", | ||
"codecov": "3.8.3", | ||
"cross-var": "1.1.0", | ||
"karma": "6.4.2", | ||
"karma": "6.4.3", | ||
"karma-chrome-launcher": "3.1.0", | ||
@@ -74,3 +75,3 @@ "karma-coverage": "2.2.1", | ||
"karma-spec-reporter": "0.0.36", | ||
"karma-webpack": "4.0.2", | ||
"karma-webpack": "5.0.1", | ||
"lerna": "6.6.2", | ||
@@ -80,3 +81,3 @@ "mocha": "10.2.0", | ||
"sinon": "15.1.2", | ||
"ts-loader": "8.4.0", | ||
"ts-loader": "9.5.1", | ||
"ts-mocha": "10.0.0", | ||
@@ -89,7 +90,7 @@ "typescript": "4.4.4", | ||
"peerDependencies": { | ||
"@opentelemetry/api": ">=1.3.0 <1.9.0" | ||
"@opentelemetry/api": ">=1.3.0 <1.10.0" | ||
}, | ||
"dependencies": { | ||
"@opentelemetry/core": "1.24.1", | ||
"@opentelemetry/resources": "1.24.1", | ||
"@opentelemetry/core": "1.25.0", | ||
"@opentelemetry/resources": "1.25.0", | ||
"lodash.merge": "^4.6.2" | ||
@@ -99,3 +100,3 @@ }, | ||
"sideEffects": false, | ||
"gitHead": "41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8" | ||
"gitHead": "c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511" | ||
} |
@@ -30,6 +30,6 @@ # OpenTelemetry Metrics SDK | ||
// Registering a working meter provider allows the API methods to record instruments. | ||
opentelemetry.setGlobalMeterProvider(new MeterProvider()); | ||
opentelemetry.metrics.setGlobalMeterProvider(new MeterProvider()); | ||
// To record a metric event, we used the global singleton meter to create an instrument. | ||
const counter = opentelemetry.getMeter('default').createCounter('foo'); | ||
const counter = opentelemetry.metrics.getMeter('default').createCounter('foo'); | ||
@@ -44,3 +44,3 @@ // record a metric event. | ||
// Creating an async instrument, similar to synchronous instruments | ||
const observableCounter = opentelemetry.getMeter('default') | ||
const observableCounter = opentelemetry.metrics.getMeter('default') | ||
.createObservableCounter('observable-counter'); | ||
@@ -55,3 +55,3 @@ | ||
// Register a multi-instrument callback and associate it with a set of async instruments. | ||
opentelemetry.getMeter('default') | ||
opentelemetry.metrics.getMeter('default') | ||
.addBatchObservableCallback(batchObservableCallback, [ observableCounter ]); | ||
@@ -58,0 +58,0 @@ async function batchObservableCallback(batchObservableResult) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1914152
21905
+ Added@opentelemetry/api@1.9.0(transitive)
+ Added@opentelemetry/core@1.25.0(transitive)
+ Added@opentelemetry/resources@1.25.0(transitive)
+ Added@opentelemetry/semantic-conventions@1.25.0(transitive)
- Removed@opentelemetry/api@1.8.0(transitive)
- Removed@opentelemetry/core@1.24.1(transitive)
- Removed@opentelemetry/resources@1.24.1(transitive)
- Removed@opentelemetry/semantic-conventions@1.24.1(transitive)
Updated@opentelemetry/core@1.25.0