0.12.0 • Published 4 years ago

@opentelemetry/plugin-xml-http-request v0.12.0

Weekly downloads
942
License
Apache-2.0
Repository
github
Last release
4 years ago

OpenTelemetry XMLHttpRequest Instrumentation for web

Gitter chat NPM Published Version dependencies devDependencies Apache License

This module provides auto instrumentation for web using XMLHttpRequest .

Installation

npm install --save @opentelemetry/plugin-xml-http-request

Usage

import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/tracing';
import { WebTracer } from '@opentelemetry/web';
import { XMLHttpRequestPlugin } from '@opentelemetry/plugin-xml-http-request';
import { ZoneContextManager } from '@opentelemetry/context-zone';

const webTracerWithZone = new WebTracer({
  contextManager: new ZoneContextManager(),
  plugins: [
    new XMLHttpRequestPlugin({
      propagateTraceHeaderCorsUrls: ['http://localhost:8090']
    })
  ]
});
webTracerWithZone.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter()));

// and some test
const req = new XMLHttpRequest();
req.open('GET', 'http://localhost:8090/xml-http-request.js', true);
req.send();

Example Screenshots

Screenshot of the running example Screenshot of the running example Screenshot of the running example

See examples/tracer-web for a short example.

Useful links

License

Apache 2.0 - See LICENSE for more information.

0.12.1-alpha.4

4 years ago

0.12.1-alpha.7

4 years ago

0.12.1-alpha.3

4 years ago

0.12.0

4 years ago

0.11.1-alpha.53

4 years ago

0.12.1-alpha.54

4 years ago

0.11.1-alpha.44

4 years ago

0.11.1-alpha.36

4 years ago

0.11.1-alpha.35

4 years ago

0.11.1-alpha.15

4 years ago

0.11.1-alpha.48

4 years ago

0.11.0

4 years ago

0.10.3-alpha.41

4 years ago

0.10.3-alpha.40

4 years ago

0.10.3-alpha.35

4 years ago

0.10.3-alpha.34

4 years ago

0.10.3-alpha.28

4 years ago

0.10.3-canary.0

4 years ago

0.10.2

4 years ago

0.10.1

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago

0.8.3

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago