@opentelemetry/tracing
Advanced tools
Comparing version 0.10.3-alpha.35 to 0.10.3-alpha.40
@@ -19,2 +19,3 @@ "use strict"; | ||
exports.BatchSpanProcessor = void 0; | ||
const api_1 = require("@opentelemetry/api"); | ||
const core_1 = require("@opentelemetry/core"); | ||
@@ -78,3 +79,6 @@ const DEFAULT_BUFFER_SIZE = 100; | ||
} | ||
this._exporter.export(this._finishedSpans, cb); | ||
// prevent downstream exporter calls from generating spans | ||
api_1.context.with(core_1.suppressInstrumentation(api_1.context.active()), () => { | ||
this._exporter.export(this._finishedSpans, cb); | ||
}); | ||
this._finishedSpans = []; | ||
@@ -81,0 +85,0 @@ } |
@@ -6,3 +6,3 @@ import { SpanExporter } from './SpanExporter'; | ||
* This class can be used for testing purposes. It stores the exported spans | ||
* in a list in memory that can be retrieve using the `getFinishedSpans()` | ||
* in a list in memory that can be retrieved using the `getFinishedSpans()` | ||
* method. | ||
@@ -12,3 +12,7 @@ */ | ||
private _finishedSpans; | ||
private _stopped; | ||
/** | ||
* Indicates if the exporter has been "shutdown." | ||
* When false, exported spans will not be stored in-memory. | ||
*/ | ||
protected _stopped: boolean; | ||
export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void; | ||
@@ -15,0 +19,0 @@ shutdown(): void; |
@@ -22,3 +22,3 @@ "use strict"; | ||
* This class can be used for testing purposes. It stores the exported spans | ||
* in a list in memory that can be retrieve using the `getFinishedSpans()` | ||
* in a list in memory that can be retrieved using the `getFinishedSpans()` | ||
* method. | ||
@@ -29,2 +29,6 @@ */ | ||
this._finishedSpans = []; | ||
/** | ||
* Indicates if the exporter has been "shutdown." | ||
* When false, exported spans will not be stored in-memory. | ||
*/ | ||
this._stopped = false; | ||
@@ -36,3 +40,3 @@ } | ||
this._finishedSpans.push(...spans); | ||
return resultCallback(core_1.ExportResult.SUCCESS); | ||
setTimeout(() => resultCallback(core_1.ExportResult.SUCCESS), 0); | ||
} | ||
@@ -39,0 +43,0 @@ shutdown() { |
@@ -19,2 +19,4 @@ "use strict"; | ||
exports.SimpleSpanProcessor = void 0; | ||
const api_1 = require("@opentelemetry/api"); | ||
const core_1 = require("@opentelemetry/core"); | ||
/** | ||
@@ -41,3 +43,6 @@ * An implementation of the {@link SpanProcessor} that converts the {@link Span} | ||
} | ||
this._exporter.export([span], () => { }); | ||
// prevent downstream exporter calls from generating spans | ||
api_1.context.with(core_1.suppressInstrumentation(api_1.context.active()), () => { | ||
this._exporter.export([span], () => { }); | ||
}); | ||
} | ||
@@ -44,0 +49,0 @@ shutdown(cb = () => { }) { |
@@ -46,2 +46,6 @@ "use strict"; | ||
var _a, _b, _c; | ||
if (core_1.isInstrumentationSuppressed(context)) { | ||
this.logger.debug('Instrumentation suppressed, returning Noop Span'); | ||
return api.NOOP_SPAN; | ||
} | ||
const parentContext = getParent(options, context); | ||
@@ -48,0 +52,0 @@ const spanId = this._idGenerator.generateSpanId(); |
@@ -1,2 +0,2 @@ | ||
import { HttpTextPropagator, Logger, Sampler } from '@opentelemetry/api'; | ||
import { TextMapPropagator, Logger, Sampler } from '@opentelemetry/api'; | ||
import { LogLevel, IdGenerator } from '@opentelemetry/core'; | ||
@@ -38,3 +38,3 @@ import { ContextManager } from '@opentelemetry/context-base'; | ||
/** Propagator to register as the global propagator */ | ||
propagator?: HttpTextPropagator | null; | ||
propagator?: TextMapPropagator | null; | ||
/** Context manager to register as the global context manager */ | ||
@@ -41,0 +41,0 @@ contextManager?: ContextManager | null; |
@@ -1,2 +0,2 @@ | ||
export declare const VERSION = "0.10.3-alpha.35+2ee9f1a"; | ||
export declare const VERSION = "0.10.3-alpha.40+2052a24"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.10.3-alpha.35+2ee9f1a'; | ||
exports.VERSION = '0.10.3-alpha.40+2052a24'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/tracing", | ||
"version": "0.10.3-alpha.35+2ee9f1a", | ||
"version": "0.10.3-alpha.40+2052a24", | ||
"description": "OpenTelemetry Tracing", | ||
@@ -77,9 +77,9 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.10.3-alpha.35+2ee9f1a", | ||
"@opentelemetry/api": "^0.10.2", | ||
"@opentelemetry/context-base": "^0.10.2", | ||
"@opentelemetry/core": "^0.10.3-alpha.35+2ee9f1a", | ||
"@opentelemetry/resources": "^0.10.3-alpha.35+2ee9f1a", | ||
"@opentelemetry/semantic-conventions": "^0.10.3-alpha.35+2ee9f1a" | ||
"@opentelemetry/core": "^0.10.3-alpha.40+2052a24", | ||
"@opentelemetry/resources": "^0.10.3-alpha.40+2052a24", | ||
"@opentelemetry/semantic-conventions": "^0.10.2" | ||
}, | ||
"gitHead": "2ee9f1aaf7b61c4b4ae6b748f0a07f8fc708f07e" | ||
"gitHead": "2052a245bce0d7a6ddc273cb3657bed5d3d21dc4" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
90413
1399
+ Added@opentelemetry/api@0.10.2(transitive)
+ Added@opentelemetry/semantic-conventions@0.10.2(transitive)
- Removed@opentelemetry/semantic-conventions@0.10.3-canary.0(transitive)
Updated@opentelemetry/api@^0.10.2