Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opentelemetry/api

Package Overview
Dependencies
Maintainers
4
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/api - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

build/esm/common/Attributes.d.ts

3

build/esm/index.d.ts

@@ -5,2 +5,3 @@ export * from './baggage/types';

export * from './common/Time';
export * from './common/Attributes';
export * from './diag';

@@ -21,4 +22,6 @@ export * from './propagation/TextMapPropagator';

export * from './trace/trace_state';
export { createTraceState } from './trace/internal/utils';
export * from './trace/tracer_provider';
export * from './trace/tracer';
export * from './trace/tracer_options';
export { isSpanContextValid, isValidTraceId, isValidSpanId, } from './trace/spancontext-utils';

@@ -25,0 +28,0 @@ export { INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT, } from './trace/invalid-span-constants';

@@ -20,2 +20,3 @@ /*

export * from './common/Time';
export * from './common/Attributes';
export * from './diag';

@@ -36,4 +37,6 @@ export * from './propagation/TextMapPropagator';

export * from './trace/trace_state';
export { createTraceState } from './trace/internal/utils';
export * from './trace/tracer_provider';
export * from './trace/tracer';
export * from './trace/tracer_options';
export { isSpanContextValid, isValidTraceId, isValidSpanId, } from './trace/spancontext-utils';

@@ -40,0 +43,0 @@ export { INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT, } from './trace/invalid-span-constants';

14

build/esm/trace/attributes.d.ts

@@ -1,10 +0,10 @@

export interface SpanAttributes {
[attributeKey: string]: SpanAttributeValue | undefined;
}
import { Attributes, AttributeValue } from '../common/Attributes';
/**
* Attribute values may be any non-nullish primitive value except an object.
*
* null or undefined attribute values are invalid and will result in undefined behavior.
* @deprecated please use {@link Attributes}
*/
export declare type SpanAttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
export declare type SpanAttributes = Attributes;
/**
* @deprecated please use {@link AttributeValue}
*/
export declare type SpanAttributeValue = AttributeValue;
//# sourceMappingURL=attributes.d.ts.map
import { Tracer } from './tracer';
import { TracerOptions } from './tracer_options';
import { TracerProvider } from './tracer_provider';

@@ -10,4 +11,4 @@ /**

export declare class NoopTracerProvider implements TracerProvider {
getTracer(_name?: string, _version?: string): Tracer;
getTracer(_name?: string, _version?: string, _options?: TracerOptions): Tracer;
}
//# sourceMappingURL=NoopTracerProvider.d.ts.map

@@ -26,3 +26,3 @@ /*

}
NoopTracerProvider.prototype.getTracer = function (_name, _version) {
NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {
return new NoopTracer();

@@ -29,0 +29,0 @@ };

@@ -5,2 +5,3 @@ import { Context } from '../context/types';

import { Tracer } from './tracer';
import { TracerOptions } from './tracer_options';
/**

@@ -13,4 +14,5 @@ * Proxy tracer provided by the proxy tracer provider

readonly version?: string | undefined;
readonly options?: TracerOptions | undefined;
private _delegate?;
constructor(_provider: TracerDelegator, name: string, version?: string | undefined);
constructor(_provider: TracerDelegator, name: string, version?: string | undefined, options?: TracerOptions | undefined);
startSpan(name: string, options?: SpanOptions, context?: Context): Span;

@@ -25,4 +27,4 @@ startActiveSpan<F extends (span: Span) => unknown>(_name: string, _options: F | SpanOptions, _context?: F | Context, _fn?: F): ReturnType<F>;

export interface TracerDelegator {
getDelegateTracer(name: string, version?: string): Tracer | undefined;
getDelegateTracer(name: string, version?: string, options?: TracerOptions): Tracer | undefined;
}
//# sourceMappingURL=ProxyTracer.d.ts.map

@@ -22,6 +22,7 @@ /*

var ProxyTracer = /** @class */ (function () {
function ProxyTracer(_provider, name, version) {
function ProxyTracer(_provider, name, version, options) {
this._provider = _provider;
this.name = name;
this.version = version;
this.options = options;
}

@@ -43,3 +44,3 @@ ProxyTracer.prototype.startSpan = function (name, options, context) {

}
var tracer = this._provider.getDelegateTracer(this.name, this.version);
var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
if (!tracer) {

@@ -46,0 +47,0 @@ return NOOP_TRACER;

import { Tracer } from './tracer';
import { TracerProvider } from './tracer_provider';
import { TracerOptions } from './tracer_options';
/**

@@ -16,3 +17,3 @@ * Tracer provider which provides {@link ProxyTracer}s.

*/
getTracer(name: string, version?: string): Tracer;
getTracer(name: string, version?: string, options?: TracerOptions): Tracer;
getDelegate(): TracerProvider;

@@ -23,4 +24,4 @@ /**

setDelegate(delegate: TracerProvider): void;
getDelegateTracer(name: string, version?: string): Tracer | undefined;
getDelegateTracer(name: string, version?: string, options?: TracerOptions): Tracer | undefined;
}
//# sourceMappingURL=ProxyTracerProvider.d.ts.map

@@ -33,5 +33,5 @@ /*

*/
ProxyTracerProvider.prototype.getTracer = function (name, version) {
ProxyTracerProvider.prototype.getTracer = function (name, version, options) {
var _a;
return ((_a = this.getDelegateTracer(name, version)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version));
return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options));
};

@@ -48,5 +48,5 @@ ProxyTracerProvider.prototype.getDelegate = function () {

};
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version) {
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {
var _a;
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version);
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
};

@@ -53,0 +53,0 @@ return ProxyTracerProvider;

import { Tracer } from './tracer';
import { TracerOptions } from './tracer_options';
/**

@@ -15,6 +16,7 @@ * A registry for creating named {@link Tracer}s.

* @param version The version of the tracer or instrumentation library.
* @param options The options of the tracer or instrumentation library.
* @returns Tracer A Tracer with the given name and version
*/
getTracer(name: string, version?: string): Tracer;
getTracer(name: string, version?: string, options?: TracerOptions): Tracer;
}
//# sourceMappingURL=tracer_provider.d.ts.map

@@ -1,2 +0,2 @@

export declare const VERSION = "1.0.4";
export declare const VERSION = "1.1.0";
//# sourceMappingURL=version.d.ts.map

@@ -17,3 +17,3 @@ /*

// this is autogenerated file, see scripts/version-update.js
export var VERSION = '1.0.4';
export var VERSION = '1.1.0';
//# sourceMappingURL=version.js.map

@@ -5,2 +5,3 @@ export * from './baggage/types';

export * from './common/Time';
export * from './common/Attributes';
export * from './diag';

@@ -21,4 +22,6 @@ export * from './propagation/TextMapPropagator';

export * from './trace/trace_state';
export { createTraceState } from './trace/internal/utils';
export * from './trace/tracer_provider';
export * from './trace/tracer';
export * from './trace/tracer_options';
export { isSpanContextValid, isValidTraceId, isValidSpanId, } from './trace/spancontext-utils';

@@ -25,0 +28,0 @@ export { INVALID_SPANID, INVALID_TRACEID, INVALID_SPAN_CONTEXT, } from './trace/invalid-span-constants';

@@ -28,3 +28,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.baggageEntryMetadataFromString = void 0;
exports.diag = exports.propagation = exports.trace = exports.context = exports.INVALID_SPAN_CONTEXT = exports.INVALID_TRACEID = exports.INVALID_SPANID = exports.isValidSpanId = exports.isValidTraceId = exports.isSpanContextValid = exports.createTraceState = exports.baggageEntryMetadataFromString = void 0;
__exportStar(require("./baggage/types"), exports);

@@ -35,2 +35,3 @@ var utils_1 = require("./baggage/utils");

__exportStar(require("./common/Time"), exports);
__exportStar(require("./common/Attributes"), exports);
__exportStar(require("./diag"), exports);

@@ -51,4 +52,7 @@ __exportStar(require("./propagation/TextMapPropagator"), exports);

__exportStar(require("./trace/trace_state"), exports);
var utils_2 = require("./trace/internal/utils");
Object.defineProperty(exports, "createTraceState", { enumerable: true, get: function () { return utils_2.createTraceState; } });
__exportStar(require("./trace/tracer_provider"), exports);
__exportStar(require("./trace/tracer"), exports);
__exportStar(require("./trace/tracer_options"), exports);
var spancontext_utils_1 = require("./trace/spancontext-utils");

@@ -55,0 +59,0 @@ Object.defineProperty(exports, "isSpanContextValid", { enumerable: true, get: function () { return spancontext_utils_1.isSpanContextValid; } });

@@ -1,10 +0,10 @@

export interface SpanAttributes {
[attributeKey: string]: SpanAttributeValue | undefined;
}
import { Attributes, AttributeValue } from '../common/Attributes';
/**
* Attribute values may be any non-nullish primitive value except an object.
*
* null or undefined attribute values are invalid and will result in undefined behavior.
* @deprecated please use {@link Attributes}
*/
export declare type SpanAttributeValue = string | number | boolean | Array<null | undefined | string> | Array<null | undefined | number> | Array<null | undefined | boolean>;
export declare type SpanAttributes = Attributes;
/**
* @deprecated please use {@link AttributeValue}
*/
export declare type SpanAttributeValue = AttributeValue;
//# sourceMappingURL=attributes.d.ts.map
import { Tracer } from './tracer';
import { TracerOptions } from './tracer_options';
import { TracerProvider } from './tracer_provider';

@@ -10,4 +11,4 @@ /**

export declare class NoopTracerProvider implements TracerProvider {
getTracer(_name?: string, _version?: string): Tracer;
getTracer(_name?: string, _version?: string, _options?: TracerOptions): Tracer;
}
//# sourceMappingURL=NoopTracerProvider.d.ts.map

@@ -29,3 +29,3 @@ "use strict";

}
NoopTracerProvider.prototype.getTracer = function (_name, _version) {
NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {
return new NoopTracer_1.NoopTracer();

@@ -32,0 +32,0 @@ };

@@ -5,2 +5,3 @@ import { Context } from '../context/types';

import { Tracer } from './tracer';
import { TracerOptions } from './tracer_options';
/**

@@ -13,4 +14,5 @@ * Proxy tracer provided by the proxy tracer provider

readonly version?: string | undefined;
readonly options?: TracerOptions | undefined;
private _delegate?;
constructor(_provider: TracerDelegator, name: string, version?: string | undefined);
constructor(_provider: TracerDelegator, name: string, version?: string | undefined, options?: TracerOptions | undefined);
startSpan(name: string, options?: SpanOptions, context?: Context): Span;

@@ -25,4 +27,4 @@ startActiveSpan<F extends (span: Span) => unknown>(_name: string, _options: F | SpanOptions, _context?: F | Context, _fn?: F): ReturnType<F>;

export interface TracerDelegator {
getDelegateTracer(name: string, version?: string): Tracer | undefined;
getDelegateTracer(name: string, version?: string, options?: TracerOptions): Tracer | undefined;
}
//# sourceMappingURL=ProxyTracer.d.ts.map

@@ -25,6 +25,7 @@ "use strict";

var ProxyTracer = /** @class */ (function () {
function ProxyTracer(_provider, name, version) {
function ProxyTracer(_provider, name, version, options) {
this._provider = _provider;
this.name = name;
this.version = version;
this.options = options;
}

@@ -46,3 +47,3 @@ ProxyTracer.prototype.startSpan = function (name, options, context) {

}
var tracer = this._provider.getDelegateTracer(this.name, this.version);
var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
if (!tracer) {

@@ -49,0 +50,0 @@ return NOOP_TRACER;

import { Tracer } from './tracer';
import { TracerProvider } from './tracer_provider';
import { TracerOptions } from './tracer_options';
/**

@@ -16,3 +17,3 @@ * Tracer provider which provides {@link ProxyTracer}s.

*/
getTracer(name: string, version?: string): Tracer;
getTracer(name: string, version?: string, options?: TracerOptions): Tracer;
getDelegate(): TracerProvider;

@@ -23,4 +24,4 @@ /**

setDelegate(delegate: TracerProvider): void;
getDelegateTracer(name: string, version?: string): Tracer | undefined;
getDelegateTracer(name: string, version?: string, options?: TracerOptions): Tracer | undefined;
}
//# sourceMappingURL=ProxyTracerProvider.d.ts.map

@@ -36,5 +36,5 @@ "use strict";

*/
ProxyTracerProvider.prototype.getTracer = function (name, version) {
ProxyTracerProvider.prototype.getTracer = function (name, version, options) {
var _a;
return ((_a = this.getDelegateTracer(name, version)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version));
return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer_1.ProxyTracer(this, name, version, options));
};

@@ -51,5 +51,5 @@ ProxyTracerProvider.prototype.getDelegate = function () {

};
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version) {
ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {
var _a;
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version);
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);
};

@@ -56,0 +56,0 @@ return ProxyTracerProvider;

import { Tracer } from './tracer';
import { TracerOptions } from './tracer_options';
/**

@@ -15,6 +16,7 @@ * A registry for creating named {@link Tracer}s.

* @param version The version of the tracer or instrumentation library.
* @param options The options of the tracer or instrumentation library.
* @returns Tracer A Tracer with the given name and version
*/
getTracer(name: string, version?: string): Tracer;
getTracer(name: string, version?: string, options?: TracerOptions): Tracer;
}
//# sourceMappingURL=tracer_provider.d.ts.map

@@ -1,2 +0,2 @@

export declare const VERSION = "1.0.4";
export declare const VERSION = "1.1.0";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '1.0.4';
exports.VERSION = '1.1.0';
//# sourceMappingURL=version.js.map

@@ -5,2 +5,16 @@ # CHANGELOG

## [1.1.0](https://www.github.com/open-telemetry/opentelemetry-js-api/compare/v1.0.4...v1.1.0) (2022-01-25)
### Features
* add tracestate implementation to api ([#147](https://www.github.com/open-telemetry/opentelemetry-js-api/issues/147)) ([82842c7](https://www.github.com/open-telemetry/opentelemetry-js-api/commit/82842c7097614e6ece99e73838ac5e94ff5460b7))
* define common attributes type ([#142](https://www.github.com/open-telemetry/opentelemetry-js-api/issues/142)) ([ae9bead](https://www.github.com/open-telemetry/opentelemetry-js-api/commit/ae9bead17750d35dec4b63cfae098087666abc85))
* **trace:** add optional schema url to TracerProvider.getTracer ([#129](https://www.github.com/open-telemetry/opentelemetry-js-api/issues/129)) ([aa65fc6](https://www.github.com/open-telemetry/opentelemetry-js-api/commit/aa65fc66809d45090d6e4951c265386d17ccc6f6))
### Bug Fixes
* export tracer options ([#154](https://www.github.com/open-telemetry/opentelemetry-js-api/issues/154)) ([b125324](https://www.github.com/open-telemetry/opentelemetry-js-api/commit/b125324438fb2f24eb80c7c6673afc8cfc99575e))
### [1.0.4](https://www.github.com/open-telemetry/opentelemetry-js-api/compare/v1.0.3...v1.0.4) (2021-12-18)

@@ -7,0 +21,0 @@

{
"name": "@opentelemetry/api",
"version": "1.0.4",
"version": "1.1.0",
"description": "Public API for OpenTelemetry",

@@ -5,0 +5,0 @@ "main": "build/src/index.js",

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc