@opencensus/nodejs-base
Version:
OpenCensus is a toolkit for collecting application performance and behavior data.
62 lines (61 loc) • 2.25 kB
TypeScript
/**
* Copyright 2019, OpenCensus Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import * as core from '@opencensus/core';
/** Implements a Tracing. */
export declare class TracingBase implements core.Tracing {
/** A tracer object */
readonly tracer: core.TracerBase;
/** A plugin loader object */
private pluginLoader?;
/** Plugin names */
protected defaultPlugins: core.PluginNames;
/** A configuration object to start the tracing */
private configLocal;
/** An object to log information to. Logs to the JS console by default. */
private logger;
/** Singleton instance */
private static singletonInstance;
/** Indicates if the tracing is active */
private activeLocal;
/** Constructs a new TracingImpl instance. */
constructor(pluginNames?: string[]);
/** Gets the tracing instance. */
static get instance(): core.Tracing;
/** Gets active status */
get active(): boolean;
/** Gets config */
get config(): core.Config;
/**
* Starts tracing.
* @param userConfig A configuration object to start tracing.
* @returns The started Tracing instance.
*/
start(userConfig?: core.Config): core.Tracing | TracingBase;
/** Stops the tracing. */
stop(): void;
/** Gets the exporter. */
get exporter(): core.Exporter;
/**
* Registers an exporter to send the collected traces to.
* @param exporter The exporter to send the traces to.
*/
registerExporter(exporter: core.Exporter): core.Tracing | TracingBase;
/**
* Unregisters an exporter.
* @param exporter The exporter to stop sending traces to.
*/
unregisterExporter(exporter: core.Exporter): core.Tracing;
}