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

@opentelemetry/tracing

Package Overview
Dependencies
Maintainers
5
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/tracing - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

5

build/src/BasicTracerProvider.d.ts

@@ -25,3 +25,3 @@ /*!

export declare class BasicTracerProvider implements api.TracerProvider {
private _config;
private readonly _config;
private readonly _registeredSpanProcessors;

@@ -32,3 +32,3 @@ private readonly _tracers;

readonly resource: Resource;
constructor(_config?: TracerConfig);
constructor(config?: TracerConfig);
getTracer(name: string, version?: string, config?: TracerConfig): Tracer;

@@ -50,1 +50,2 @@ /**

}
//# sourceMappingURL=BasicTracerProvider.d.ts.map

12

build/src/BasicTracerProvider.js

@@ -29,9 +29,13 @@ "use strict";

class BasicTracerProvider {
constructor(_config = config_1.DEFAULT_CONFIG) {
this._config = _config;
constructor(config = config_1.DEFAULT_CONFIG) {
var _a, _b;
this._registeredSpanProcessors = [];
this._tracers = new Map();
this.activeSpanProcessor = new NoopSpanProcessor_1.NoopSpanProcessor();
this.logger = _config.logger || new core_1.ConsoleLogger(_config.logLevel);
this.resource = _config.resource || resources_1.Resource.createTelemetrySDKResource();
this.logger = (_a = config.logger, (_a !== null && _a !== void 0 ? _a : new core_1.ConsoleLogger(config.logLevel)));
this.resource = (_b = config.resource, (_b !== null && _b !== void 0 ? _b : resources_1.Resource.createTelemetrySDKResource()));
this._config = Object.assign({}, config, {
logger: this.logger,
resource: this.resource,
});
}

@@ -38,0 +42,0 @@ getTracer(name, version = '*', config) {

@@ -39,1 +39,2 @@ /*!

};
//# sourceMappingURL=config.d.ts.map

@@ -16,5 +16,5 @@ /*!

*/
import { Span } from '../Span';
import { SpanProcessor } from '../SpanProcessor';
import { BufferConfig } from '../types';
import { ReadableSpan } from './ReadableSpan';
import { SpanExporter } from './SpanExporter';

@@ -34,4 +34,4 @@ /**

forceFlush(): void;
onStart(span: Span): void;
onEnd(span: Span): void;
onStart(span: ReadableSpan): void;
onEnd(span: ReadableSpan): void;
shutdown(): void;

@@ -45,1 +45,2 @@ /** Add a span in the buffer. */

}
//# sourceMappingURL=BatchSpanProcessor.d.ts.map

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

}
this._addToBuffer(span.toReadableSpan());
this._addToBuffer(span);
}

@@ -52,0 +52,0 @@ shutdown() {

@@ -18,3 +18,3 @@ /*!

import { ReadableSpan } from './ReadableSpan';
import { ExportResult } from '@opentelemetry/base';
import { ExportResult } from '@opentelemetry/core';
/**

@@ -47,1 +47,2 @@ * This is implementation of {@link SpanExporter} that prints spans to the

}
//# sourceMappingURL=ConsoleSpanExporter.d.ts.map

@@ -18,3 +18,2 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = require("@opentelemetry/base");
const core_1 = require("@opentelemetry/core");

@@ -68,3 +67,3 @@ /**

if (done) {
return done(base_1.ExportResult.SUCCESS);
return done(core_1.ExportResult.SUCCESS);
}

@@ -71,0 +70,0 @@ }

@@ -18,3 +18,3 @@ /*!

import { ReadableSpan } from './ReadableSpan';
import { ExportResult } from '@opentelemetry/base';
import { ExportResult } from '@opentelemetry/core';
/**

@@ -33,1 +33,2 @@ * This class can be used for testing purposes. It stores the exported spans

}
//# sourceMappingURL=InMemorySpanExporter.d.ts.map

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

Object.defineProperty(exports, "__esModule", { value: true });
const base_1 = require("@opentelemetry/base");
const core_1 = require("@opentelemetry/core");
/**

@@ -32,5 +32,5 @@ * This class can be used for testing purposes. It stores the exported spans

if (this._stopped)
return resultCallback(base_1.ExportResult.FAILED_NOT_RETRYABLE);
return resultCallback(core_1.ExportResult.FAILED_NOT_RETRYABLE);
this._finishedSpans.push(...spans);
return resultCallback(base_1.ExportResult.SUCCESS);
return resultCallback(core_1.ExportResult.SUCCESS);
}

@@ -37,0 +37,0 @@ shutdown() {

@@ -33,1 +33,2 @@ /*!

}
//# sourceMappingURL=ReadableSpan.d.ts.map

@@ -16,5 +16,5 @@ /*!

*/
import { Span } from '../Span';
import { SpanProcessor } from '../SpanProcessor';
import { SpanExporter } from './SpanExporter';
import { ReadableSpan } from './ReadableSpan';
/**

@@ -31,5 +31,6 @@ * An implementation of the {@link SpanProcessor} that converts the {@link Span}

forceFlush(): void;
onStart(span: Span): void;
onEnd(span: Span): void;
onStart(span: ReadableSpan): void;
onEnd(span: ReadableSpan): void;
shutdown(): void;
}
//# sourceMappingURL=SimpleSpanProcessor.d.ts.map

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

}
this._exporter.export([span.toReadableSpan()], () => { });
this._exporter.export([span], () => { });
}

@@ -41,0 +41,0 @@ shutdown() {

@@ -16,3 +16,3 @@ /*!

*/
import { ExportResult } from '@opentelemetry/base';
import { ExportResult } from '@opentelemetry/core';
import { ReadableSpan } from './ReadableSpan';

@@ -35,1 +35,2 @@ /**

}
//# sourceMappingURL=SpanExporter.d.ts.map

@@ -27,1 +27,2 @@ /*!

export * from './types';
//# sourceMappingURL=index.d.ts.map

@@ -16,4 +16,4 @@ /*!

*/
import { Span } from '@opentelemetry/api';
import { SpanProcessor } from './SpanProcessor';
import { ReadableSpan } from './export/ReadableSpan';
/**

@@ -27,5 +27,6 @@ * Implementation of the {@link SpanProcessor} that simply forwards all

forceFlush(): void;
onStart(span: Span): void;
onEnd(span: Span): void;
onStart(span: ReadableSpan): void;
onEnd(span: ReadableSpan): void;
shutdown(): void;
}
//# sourceMappingURL=MultiSpanProcessor.d.ts.map

@@ -27,3 +27,5 @@ "use strict";

forceFlush() {
// do nothing as all spans are being exported without waiting
for (const spanProcessor of this._spanProcessors) {
spanProcessor.forceFlush();
}
}

@@ -30,0 +32,0 @@ onStart(span) {

@@ -16,10 +16,11 @@ /*!

*/
import { Span } from '@opentelemetry/api';
import { SpanProcessor } from './SpanProcessor';
import { ReadableSpan } from './export/ReadableSpan';
/** No-op implementation of SpanProcessor */
export declare class NoopSpanProcessor implements SpanProcessor {
onStart(span: Span): void;
onEnd(span: Span): void;
onStart(span: ReadableSpan): void;
onEnd(span: ReadableSpan): void;
shutdown(): void;
forceFlush(): void;
}
//# sourceMappingURL=NoopSpanProcessor.d.ts.map

@@ -16,3 +16,3 @@ /*!

*/
import * as types from '@opentelemetry/api';
import * as api from '@opentelemetry/api';
import { Resource } from '@opentelemetry/resources';

@@ -24,14 +24,14 @@ import { ReadableSpan } from './export/ReadableSpan';

*/
export declare class Span implements types.Span, ReadableSpan {
readonly spanContext: types.SpanContext;
readonly kind: types.SpanKind;
export declare class Span implements api.Span, ReadableSpan {
readonly spanContext: api.SpanContext;
readonly kind: api.SpanKind;
readonly parentSpanId?: string;
readonly attributes: types.Attributes;
readonly links: types.Link[];
readonly events: types.TimedEvent[];
readonly startTime: types.HrTime;
readonly attributes: api.Attributes;
readonly links: api.Link[];
readonly events: api.TimedEvent[];
readonly startTime: api.HrTime;
readonly resource: Resource;
name: string;
status: types.Status;
endTime: types.HrTime;
status: api.Status;
endTime: api.HrTime;
private _ended;

@@ -43,6 +43,6 @@ private _duration;

/** Constructs a new Span instance. */
constructor(parentTracer: Tracer, spanName: string, spanContext: types.SpanContext, kind: types.SpanKind, parentSpanId?: string, links?: types.Link[], startTime?: types.TimeInput);
context(): types.SpanContext;
constructor(parentTracer: Tracer, spanName: string, spanContext: api.SpanContext, kind: api.SpanKind, parentSpanId?: string, links?: api.Link[], startTime?: api.TimeInput);
context(): api.SpanContext;
setAttribute(key: string, value: unknown): this;
setAttributes(attributes: types.Attributes): this;
setAttributes(attributes: api.Attributes): this;
/**

@@ -55,11 +55,11 @@ *

*/
addEvent(name: string, attributesOrStartTime?: types.Attributes | types.TimeInput, startTime?: types.TimeInput): this;
setStatus(status: types.Status): this;
addEvent(name: string, attributesOrStartTime?: api.Attributes | api.TimeInput, startTime?: api.TimeInput): this;
setStatus(status: api.Status): this;
updateName(name: string): this;
end(endTime?: types.TimeInput): void;
end(endTime?: api.TimeInput): void;
isRecording(): boolean;
toReadableSpan(): ReadableSpan;
get duration(): types.HrTime;
get duration(): api.HrTime;
get ended(): boolean;
private _isSpanEnded;
}
//# sourceMappingURL=Span.d.ts.map

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

Object.defineProperty(exports, "__esModule", { value: true });
const types = require("@opentelemetry/api");
const api = require("@opentelemetry/api");
const core_1 = require("@opentelemetry/core");

@@ -31,3 +31,3 @@ /**

this.status = {
code: types.CanonicalCode.OK,
code: api.CanonicalCode.OK,
};

@@ -130,5 +130,2 @@ this.endTime = [0, 0];

}
toReadableSpan() {
return this;
}
get duration() {

@@ -135,0 +132,0 @@ return this._duration;

@@ -16,3 +16,3 @@ /*!

*/
import { Span } from '@opentelemetry/api';
import { ReadableSpan } from './export/ReadableSpan';
/**

@@ -28,13 +28,13 @@ * SpanProcessor is the interface Tracer SDK uses to allow synchronous hooks

/**
* Called when a {@link Span} is started, if the `span.isRecording()`
* Called when a {@link ReadableSpan} is started, if the `span.isRecording()`
* returns true.
* @param span the Span that just started.
*/
onStart(span: Span): void;
onStart(span: ReadableSpan): void;
/**
* Called when a {@link Span} is ended, if the `span.isRecording()`
* Called when a {@link ReadableSpan} is ended, if the `span.isRecording()`
* returns true.
* @param span the Span that just ended.
*/
onEnd(span: Span): void;
onEnd(span: ReadableSpan): void;
/**

@@ -46,1 +46,2 @@ * Shuts down the processor. Called when SDK is shut down. This is an

}
//# sourceMappingURL=SpanProcessor.d.ts.map

@@ -57,1 +57,2 @@ /*!

}
//# sourceMappingURL=Tracer.d.ts.map

@@ -25,3 +25,3 @@ /*!

/**
* Attributed that will be applied on every span created by Tracer.
* Attributes that will be applied on every span created by Tracer.
* Useful to add infrastructure and environment information to your spans.

@@ -72,1 +72,2 @@ */

}
//# sourceMappingURL=types.d.ts.map

@@ -31,1 +31,2 @@ /*!

} & TracerConfig;
//# sourceMappingURL=utility.d.ts.map

@@ -16,2 +16,3 @@ /*!

*/
export declare const VERSION = "0.7.0";
export declare const VERSION = "0.8.0";
//# sourceMappingURL=version.d.ts.map

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

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.7.0';
exports.VERSION = '0.8.0';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/tracing",
"version": "0.7.0",
"version": "0.8.0",
"description": "OpenTelemetry Tracing",

@@ -76,8 +76,7 @@ "main": "build/src/index.js",

"dependencies": {
"@opentelemetry/api": "^0.7.0",
"@opentelemetry/base": "^0.7.0",
"@opentelemetry/context-base": "^0.7.0",
"@opentelemetry/core": "^0.7.0",
"@opentelemetry/resources": "^0.7.0"
"@opentelemetry/api": "^0.8.0",
"@opentelemetry/context-base": "^0.8.0",
"@opentelemetry/core": "^0.8.0",
"@opentelemetry/resources": "^0.8.0"
}
}
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