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

@opentelemetry/web

Package Overview
Dependencies
Maintainers
4
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/web - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

1

build/src/StackScopeManager.d.ts

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

* @param scope
* @private
*/

@@ -37,0 +36,0 @@ private _bindFunction;

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

* @param scope
* @private
*/

@@ -36,0 +35,0 @@ _bindFunction(target, scope) {

17

build/src/WebTracer.d.ts

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

*/
import { BasePlugin } from '@opentelemetry/core';
import { BasicTracer, BasicTracerConfig } from '@opentelemetry/tracing';
/**
* WebTracerConfig provides an interface for configuring a Web Tracer.
*/
export interface WebTracerConfig extends BasicTracerConfig {
/**
* plugins to be used with tracer, they will be enabled automatically
*/
plugins?: BasePlugin<unknown>[];
}
/**
* This class represents a web tracer with {@link StackScopeManager}

@@ -24,8 +34,5 @@ */

* Constructs a new Tracer instance.
* @param config Web Tracer config
*/
/**
*
* @param {BasicTracerConfig} config Web Tracer config
*/
constructor(config?: BasicTracerConfig);
constructor(config?: WebTracerConfig);
}

@@ -26,7 +26,4 @@ "use strict";

* Constructs a new Tracer instance.
* @param config Web Tracer config
*/
/**
*
* @param {BasicTracerConfig} config Web Tracer config
*/
constructor(config = {}) {

@@ -36,4 +33,10 @@ if (typeof config.scopeManager === 'undefined') {

}
if (typeof config.plugins === 'undefined') {
config.plugins = [];
}
super(Object.assign({}, { scopeManager: config.scopeManager }, config));
config.scopeManager.enable();
super(Object.assign({}, { scopeManager: config.scopeManager }, config));
for (const plugin of config.plugins) {
plugin.enable([], this, this.logger, {});
}
}

@@ -40,0 +43,0 @@ }

{
"name": "@opentelemetry/web",
"version": "0.1.1",
"version": "0.2.0",
"description": "OpenTelemetry Web Tracer",

@@ -9,10 +9,11 @@ "main": "build/src/index.js",

"scripts": {
"test:browser": "nyc karma start --single-run",
"tdd": "karma start",
"check": "gts check",
"clean": "rimraf build/*",
"codecov:browser": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../",
"clean": "rimraf build/*",
"check": "gts check",
"compile": "tsc -p .",
"fix": "gts fix",
"prepare": "npm run compile"
"prepare": "npm run compile",
"tdd": "karma start",
"test:browser": "nyc karma start --single-run",
"watch": "tsc -w"
},

@@ -43,12 +44,14 @@ "keywords": [

"devDependencies": {
"@babel/core": "^7.6.0",
"@types/mocha": "^5.2.5",
"@types/node": "^12.6.8",
"@types/sinon": "^7.0.13",
"@types/webpack-env": "1.13.9",
"@types/sinon": "^7.0.13",
"@babel/core": "^7.6.0",
"babel-loader": "^8.0.6",
"codecov": "^3.1.0",
"gts": "^1.0.0",
"karma": "^4.1.0",
"karma-chrome-launcher": "^2.2.0",
"istanbul-instrumenter-loader": "^3.0.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage-istanbul-reporter": "^2.1.0",
"karma-mocha": "^1.3.0",

@@ -61,7 +64,7 @@ "karma-spec-reporter": "^0.0.32",

"sinon": "^7.5.0",
"tslint-consistent-codestyle": "^1.16.0",
"tslint-microsoft-contrib": "^6.2.0",
"ts-loader": "^6.0.4",
"ts-mocha": "^6.0.0",
"ts-node": "^8.0.0",
"tslint-consistent-codestyle": "^1.16.0",
"tslint-microsoft-contrib": "^6.2.0",
"typescript": "^3.6.3",

@@ -73,7 +76,7 @@ "webpack": "^4.35.2",

"dependencies": {
"@opentelemetry/core": "^0.1.0",
"@opentelemetry/scope-base": "^0.1.0",
"@opentelemetry/types": "^0.1.0",
"@opentelemetry/tracing": "^0.1.0"
"@opentelemetry/core": "^0.2.0",
"@opentelemetry/scope-base": "^0.2.0",
"@opentelemetry/tracing": "^0.2.0",
"@opentelemetry/types": "^0.2.0"
}
}
}

@@ -14,4 +14,16 @@ # OpenTelemetry Web

## How does automatic tracing work?
> Automatic Instrumentation is in progress, manual instrumentation only supported
```js
import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracer } from '@opentelemetry/web';
import { DocumentLoad } from '@opentelemetry/plugin-document-load';
const webTracer = new WebTracer({
plugins: [
new DocumentLoad()
]
});
webTracer.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));
```
## Installation

@@ -31,3 +43,2 @@

webTracer.withSpan(span, function () {
// this === span
this.addEvent('start');

@@ -34,0 +45,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