@opentelemetry/tracing
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -16,3 +16,4 @@ /*! | ||
*/ | ||
export * from './BasicTracer'; | ||
export * from './Tracer'; | ||
export * from './BasicTracerRegistry'; | ||
export * from './export/ConsoleSpanExporter'; | ||
@@ -19,0 +20,0 @@ export * from './export/BatchSpanProcessor'; |
@@ -21,3 +21,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./BasicTracer")); | ||
__export(require("./Tracer")); | ||
__export(require("./BasicTracerRegistry")); | ||
__export(require("./export/ConsoleSpanExporter")); | ||
@@ -24,0 +25,0 @@ __export(require("./export/BatchSpanProcessor")); |
@@ -18,3 +18,3 @@ /*! | ||
import { ReadableSpan } from './export/ReadableSpan'; | ||
import { BasicTracer } from './BasicTracer'; | ||
import { Tracer } from './Tracer'; | ||
/** | ||
@@ -40,3 +40,3 @@ * This class represents a span. | ||
/** Constructs a new Span instance. */ | ||
constructor(parentTracer: BasicTracer, spanName: string, spanContext: types.SpanContext, kind: types.SpanKind, parentSpanId?: string, links?: types.Link[], startTime?: types.TimeInput); | ||
constructor(parentTracer: Tracer, spanName: string, spanContext: types.SpanContext, kind: types.SpanKind, parentSpanId?: string, links?: types.Link[], startTime?: types.TimeInput); | ||
context(): types.SpanContext; | ||
@@ -43,0 +43,0 @@ setAttribute(key: string, value: unknown): this; |
@@ -43,3 +43,3 @@ "use strict"; | ||
this._traceParams = parentTracer.getActiveTraceParams(); | ||
this._spanProcessor = parentTracer.activeSpanProcessor; | ||
this._spanProcessor = parentTracer.getActiveSpanProcessor(); | ||
this._spanProcessor.onStart(this); | ||
@@ -46,0 +46,0 @@ } |
@@ -20,5 +20,5 @@ /*! | ||
/** | ||
* BasicTracerConfig provides an interface for configuring a Basic Tracer. | ||
* TracerConfig provides an interface for configuring a Basic Tracer. | ||
*/ | ||
export interface BasicTracerConfig { | ||
export interface TracerConfig { | ||
/** | ||
@@ -25,0 +25,0 @@ * Binary formatter which can serialize/deserialize Spans. |
@@ -16,3 +16,3 @@ /*! | ||
*/ | ||
import { BasicTracerConfig } from './types'; | ||
import { TracerConfig } from './types'; | ||
/** | ||
@@ -22,3 +22,3 @@ * Function to merge Default configuration (as specified in './config') with | ||
*/ | ||
export declare function mergeConfig(userConfig: BasicTracerConfig): { | ||
export declare function mergeConfig(userConfig: TracerConfig): { | ||
defaultAttributes: {}; | ||
@@ -35,2 +35,2 @@ binaryFormat: import("@opentelemetry/core").BinaryTraceContext; | ||
}; | ||
} & BasicTracerConfig; | ||
} & TracerConfig; |
@@ -19,3 +19,2 @@ "use strict"; | ||
const config_1 = require("./config"); | ||
const config_2 = require("./config"); | ||
/** | ||
@@ -27,3 +26,3 @@ * Function to merge Default configuration (as specified in './config') with | ||
const traceParams = userConfig.traceParams; | ||
const target = Object.assign({}, config_2.DEFAULT_CONFIG, userConfig); | ||
const target = Object.assign({}, config_1.DEFAULT_CONFIG, userConfig); | ||
// the user-provided value will be used to extend the default value. | ||
@@ -30,0 +29,0 @@ if (traceParams) { |
@@ -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/tracing", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "OpenTelemetry Tracing", | ||
@@ -69,3 +69,3 @@ "main": "build/src/index.js", | ||
"ts-mocha": "^6.0.0", | ||
"ts-node": "^8.0.0", | ||
"ts-node": "^8.6.2", | ||
"tslint-consistent-codestyle": "^1.16.0", | ||
@@ -77,7 +77,7 @@ "tslint-microsoft-contrib": "^6.2.0", | ||
"dependencies": { | ||
"@opentelemetry/base": "^0.3.2", | ||
"@opentelemetry/core": "^0.3.2", | ||
"@opentelemetry/scope-base": "^0.3.2", | ||
"@opentelemetry/types": "^0.3.2" | ||
"@opentelemetry/base": "^0.3.3", | ||
"@opentelemetry/core": "^0.3.3", | ||
"@opentelemetry/scope-base": "^0.3.3", | ||
"@opentelemetry/types": "^0.3.3" | ||
} | ||
} |
@@ -28,18 +28,15 @@ # OpenTelemetry Tracing | ||
const opentelemetry = require('@opentelemetry/core'); | ||
const { BasicTracer } = require('@opentelemetry/tracing'); | ||
const { BasicTracerRegistry } = require('@opentelemetry/tracing'); | ||
// To start a trace, you first need to initialize the Tracer. | ||
// NOTE: the default OpenTelemetry tracer does not record any tracing information. | ||
const tracer = new BasicTracer(); | ||
// To start a trace, you first need to initialize the Tracer registry. | ||
// NOTE: the default OpenTelemetry tracer registry does not record any tracing information. | ||
opentelemetry.initGlobalTracer(new BasicTracerRegistry()); | ||
// Initialize the OpenTelemetry APIs to use the BasicTracer bindings | ||
opentelemetry.initGlobalTracer(tracer); | ||
// To create a span in a trace, we used the global singleton tracer to start a new span. | ||
const span = opentelemetry.getTracer().startSpan('foo'); | ||
const span = opentelemetry.getTracer('default').startSpan('foo'); | ||
// Create an Attributes | ||
// Set a span attribute | ||
span.setAttribute('key', 'value'); | ||
// We must end the spans so they becomes available for exporting. | ||
// We must end the spans so they become available for exporting. | ||
span.end(); | ||
@@ -46,0 +43,0 @@ ``` |
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
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
79896
39
1681
66
Updated@opentelemetry/base@^0.3.3
Updated@opentelemetry/core@^0.3.3
Updated@opentelemetry/types@^0.3.3