@azure/core-tracing
Provides low-level interfaces and helper methods for tracing in Azure SDK
Last updated 5 years ago by azure-sdk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @azure/core-tracing 
SYNC missed versions from official npm registry.

Azure Core tracing library for JavaScript

This is the core tracing library that provides low-level interfaces and helper methods for tracing in Azure SDK JavaScript libraries which work in the browser and Node.js.

Getting started

Installation

Install this library using npm as follows

npm install @azure/core-tracing

Key Concepts

The @azure/core-tracing package supports enabling tracing for Azure SDK packages, using an OpenTelemetry Tracer. If you are using OpenCensus instead, we provide an OpenCensusTracerWrapper that allows you to convert an OpenCensus Tracer into an OpenTelemetry Tracer.

By default, all libraries log with a NoOpTracer that takes no action. To change this, you have to use setTracer to set a new default Tracer.

Examples

Example 1 - Setting an OpenTelemetry Tracer

const opentelemetry = require("@opentelemetry/core");
const { BasicTracer, SimpleSpanProcessor } = require("@opentelemetry/tracing");
const { ZipkinExporter } = require("@opentelemetry/exporter-zipkin");
const { setTracer } = require("@azure/core-tracing");

const exporter = new ZipkinExporter({
  serviceName: "azure-tracing-sample"
});
const tracer = new BasicTracer();
tracer.addSpanProcessor(new SimpleSpanProcessor(exporter));

opentelemetry.initGlobalTracer(tracer);

const rootSpan = opentelemetry.getTracer().startSpan("root");

// Call some client library methods and pass rootSpan via tracingOptions.

rootSpan.end();
exporter.shutdown();

Example 2 - Setting an OpenCensus Tracer

const tracing = require("@opencensus/nodejs");
const { ZipkinTraceExporter } = require("@opencensus/exporter-zipkin");
const {
  setTracer,
  OpenCensusTracerWrapper,
  OpenCensusSpanWrapper
} = require("@azure/core-tracing");

const tracer = tracing.start({ samplingRate: 1 }).tracer;

tracer.registerSpanEventListener(
  new ZipkinTraceExporter({
    serviceName: "azure-tracing-sample",
    bufferTimeout: 2
  })
);
setTracer(new OpenCensusTracerWrapper(tracer));
tracer.startRootSpan({ name: "root" }, async (rootSpanEx) => {
  const rootSpan = new OpenCensusSpanWrapper(rootSpanEx);
  // Call some client library methods and pass rootSpan via tracingOptions.
  rootSpanEx.end(); // rootSpan.end() should work as well
});

Example 3 - Passing parent Spans to library operations

// Given a BlobClient from @azure/storage-blob
const result = await blobClient.download(undefined, undefined, {
  tracingOptions: {
    spanOptions: { parent: rootSpan }
  }
});

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

If you'd like to contribute to this library, please read the contributing guide to learn more about how to build and test the code.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Impressions

Current Tags

  • 1.2.1-alpha.20241022.3                                ...           dev (23 days ago)
  • 1.2.0                                ...           latest (a month ago)

275 Versions

  • 1.2.1-alpha.20241022.3                                ...           23 days ago
  • 1.2.1-alpha.20241021.2                                ...           24 days ago
  • 1.2.1-alpha.20241016.3                                ...           a month ago
  • 1.2.1-alpha.20241015.2                                ...           a month ago
  • 1.2.1-alpha.20241014.5                                ...           a month ago
  • 1.2.1-alpha.20241011.2                                ...           a month ago
  • 1.2.1-alpha.20241010.2                                ...           a month ago
  • 1.2.1-alpha.20241009.1                                ...           a month ago
  • 1.2.1-alpha.20241008.3                                ...           a month ago
  • 1.2.1-alpha.20241007.3                                ...           a month ago
  • 1.2.0-alpha.20241003.3                                ...           a month ago
  • 1.2.0                                ...           a month ago
  • 1.1.3-alpha.20240930.1                                ...           a month ago
  • 1.1.3-alpha.20240927.3                                ...           2 months ago
  • 1.1.3-alpha.20240926.5                                ...           2 months ago
  • 1.1.3-alpha.20240925.5                                ...           2 months ago
  • 1.1.3-alpha.20240924.1                                ...           2 months ago
  • 1.1.3-alpha.20240920.2                                ...           2 months ago
  • 1.1.3-alpha.20240919.1                                ...           2 months ago
  • 1.1.3-alpha.20240918.1                                ...           2 months ago
  • 1.1.3-alpha.20240916.2                                ...           2 months ago
  • 1.1.3-alpha.20240913.2                                ...           2 months ago
  • 1.1.3-alpha.20240912.4                                ...           2 months ago
  • 1.1.3-alpha.20240828.1                                ...           3 months ago
  • 1.1.3-alpha.20240826.2                                ...           3 months ago
  • 1.1.3-alpha.20240909.1                                ...           2 months ago
  • 1.1.3-alpha.20240906.2                                ...           2 months ago
  • 1.1.3-alpha.20240905.2                                ...           2 months ago
  • 1.1.3-alpha.20240903.2                                ...           2 months ago
  • 1.1.3-alpha.20240902.1                                ...           2 months ago
  • 1.1.3-alpha.20240830.2                                ...           3 months ago
  • 1.1.3-alpha.20240829.2                                ...           3 months ago
  • 1.1.3-alpha.20240823.1                                ...           3 months ago
  • 1.1.3-alpha.20240822.3                                ...           3 months ago
  • 1.1.3-alpha.20240821.4                                ...           3 months ago
  • 1.1.3-alpha.20240820.8                                ...           3 months ago
  • 1.1.3-alpha.20240819.2                                ...           3 months ago
  • 1.1.3-alpha.20240816.2                                ...           3 months ago
  • 1.1.3-alpha.20240815.2                                ...           3 months ago
  • 1.1.3-alpha.20240814.1                                ...           3 months ago
  • 1.1.3-alpha.20240813.2                                ...           3 months ago
  • 1.1.3-alpha.20240809.2                                ...           3 months ago
  • 1.1.3-alpha.20240808.1                                ...           3 months ago
  • 1.1.3-alpha.20240807.4                                ...           3 months ago
  • 1.1.3-alpha.20240806.1                                ...           3 months ago
  • 1.1.3-alpha.20240802.1                                ...           3 months ago
  • 1.1.3-alpha.20240801.3                                ...           3 months ago
  • 1.1.3-alpha.20240731.2                                ...           3 months ago
  • 1.1.3-alpha.20240730.3                                ...           4 months ago
  • 1.1.3-alpha.20240729.3                                ...           4 months ago
  • 1.1.3-alpha.20240725.2                                ...           4 months ago
  • 1.1.3-alpha.20240724.2                                ...           4 months ago
  • 1.1.3-alpha.20240723.2                                ...           4 months ago
  • 1.1.3-alpha.20240722.3                                ...           4 months ago
  • 1.1.3-alpha.20240719.1                                ...           4 months ago
  • 1.1.3-alpha.20240718.1                                ...           4 months ago
  • 1.1.3-alpha.20240716.2                                ...           4 months ago
  • 1.1.3-alpha.20240715.2                                ...           4 months ago
  • 1.1.3-alpha.20240711.2                                ...           4 months ago
  • 1.1.3-alpha.20240710.2                                ...           4 months ago
  • 1.1.3-alpha.20240709.3                                ...           4 months ago
  • 1.1.3-alpha.20240705.2                                ...           4 months ago
  • 1.1.3-alpha.20240704.2                                ...           4 months ago
  • 1.1.3-alpha.20240701.3                                ...           4 months ago
  • 1.1.3-alpha.20240628.2                                ...           5 months ago
  • 1.1.3-alpha.20240627.5                                ...           5 months ago
  • 1.1.3-alpha.20240626.1                                ...           5 months ago
  • 1.1.3-alpha.20240625.1                                ...           5 months ago
  • 1.1.3-alpha.20240621.10                                ...           5 months ago
  • 1.1.3-alpha.20240619.3                                ...           5 months ago
  • 1.1.3-alpha.20240618.1                                ...           5 months ago
  • 1.1.3-alpha.20240614.3                                ...           5 months ago
  • 1.1.3-alpha.20240613.1                                ...           5 months ago
  • 1.1.3-alpha.20240611.3                                ...           5 months ago
  • 1.1.3-alpha.20240610.1                                ...           5 months ago
  • 1.1.3-alpha.20240607.1                                ...           5 months ago
  • 1.1.3-alpha.20240606.1                                ...           5 months ago
  • 1.1.3-alpha.20240605.2                                ...           5 months ago
  • 1.1.3-alpha.20240604.1                                ...           5 months ago
  • 1.1.3-alpha.20240530.3                                ...           6 months ago
  • 1.1.3-alpha.20240529.1                                ...           6 months ago
  • 1.1.3-alpha.20240528.2                                ...           6 months ago
  • 1.1.3-alpha.20240527.1                                ...           6 months ago
  • 1.1.3-alpha.20240524.1                                ...           6 months ago
  • 1.1.3-alpha.20240523.4                                ...           6 months ago
  • 1.1.3-alpha.20240522.4                                ...           6 months ago
  • 1.1.3-alpha.20240521.1                                ...           6 months ago
  • 1.1.3-alpha.20240520.1                                ...           6 months ago
  • 1.1.3-alpha.20240517.1                                ...           6 months ago
  • 1.1.3-alpha.20240516.2                                ...           6 months ago
  • 1.1.3-alpha.20240515.1                                ...           6 months ago
  • 1.1.3-alpha.20240514.3                                ...           6 months ago
  • 1.1.3-alpha.20240513.1                                ...           6 months ago
  • 1.1.3-alpha.20240510.3                                ...           6 months ago
  • 1.1.3-alpha.20240509.1                                ...           6 months ago
  • 1.1.3-alpha.20240508.2                                ...           6 months ago
  • 1.1.3-alpha.20240507.2                                ...           6 months ago
  • 1.1.3-alpha.20240506.1                                ...           6 months ago
  • 1.1.3-alpha.20240503.1                                ...           6 months ago
  • 1.1.3-alpha.20240502.4                                ...           6 months ago
  • 1.1.3-alpha.20240501.2                                ...           6 months ago
  • 1.1.3-alpha.20240429.3                                ...           7 months ago
  • 1.1.3-alpha.20240426.4                                ...           7 months ago
  • 1.1.3-alpha.20240425.2                                ...           7 months ago
  • 1.1.3-alpha.20240424.3                                ...           7 months ago
  • 1.1.3-alpha.20240423.2                                ...           7 months ago
  • 1.1.3-alpha.20240419.1                                ...           7 months ago
  • 1.1.3-alpha.20240418.3                                ...           7 months ago
  • 1.1.3-alpha.20240416.4                                ...           7 months ago
  • 1.1.3-alpha.20240415.4                                ...           7 months ago
  • 1.1.3-alpha.20240412.3                                ...           7 months ago
  • 1.1.2-alpha.20240411.3                                ...           7 months ago
  • 1.1.2                                ...           7 months ago
  • 1.1.2-alpha.20240410.4                                ...           7 months ago
  • 1.1.2-alpha.20240329.3                                ...           8 months ago
  • 1.1.2-alpha.20240322.2                                ...           8 months ago
  • 1.1.1                                ...           8 months ago
  • 1.1.1-alpha.20240320.4                                ...           8 months ago
  • 1.1.0-alpha.20240314.2                                ...           8 months ago
  • 1.1.0                                ...           8 months ago
  • 1.0.2-alpha.20240228.1                                ...           9 months ago
  • 1.0.2-alpha.20240226.9                                ...           9 months ago
  • 1.0.2-alpha.20240226.1                                ...           9 months ago
  • 1.0.2-alpha.20240223.2                                ...           9 months ago
  • 1.0.2-alpha.20240202.3                                ...           9 months ago
  • 1.0.2-alpha.20240101.1                                ...           10 months ago
  • 1.0.2-alpha.20231213.2                                ...           a year ago
  • 1.0.2-alpha.20231206.3                                ...           a year ago
  • 1.0.2-alpha.20231120.4                                ...           a year ago
  • 1.0.2-alpha.20231107.1                                ...           a year ago
  • 1.0.2-alpha.20231102.2                                ...           a year ago
  • 1.0.2-alpha.20231031.3                                ...           a year ago
  • 1.0.2-alpha.20231024.1                                ...           a year ago
  • 1.0.2-alpha.20231010.2                                ...           a year ago
  • 1.0.2-alpha.20231002.2                                ...           a year ago
  • 1.0.2-alpha.20230925.3                                ...           a year ago
  • 1.0.2-alpha.20230904.1                                ...           a year ago
  • 1.0.2-alpha.20230824.1                                ...           a year ago
  • 1.0.2-alpha.20230727.2                                ...           a year ago
  • 1.0.2-alpha.20230613.2                                ...           a year ago
  • 1.0.2-alpha.20230419.2                                ...           2 years ago
  • 1.0.2-alpha.20230307.4                                ...           2 years ago
  • 1.0.2-alpha.20221107.4                                ...           2 years ago
  • 1.0.2-alpha.20221020.2                                ...           2 years ago
  • 1.0.2-alpha.20220923.1                                ...           2 years ago
  • 1.0.2-alpha.20220523.1                                ...           2 years ago
  • 1.0.2-alpha.20220518.2                                ...           2 years ago
  • 1.0.2-alpha.20220506.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.1-alpha.20220505.3                                ...           3 years ago
  • 1.0.1-alpha.20220421.2                                ...           3 years ago
  • 1.0.1-alpha.20220420.2                                ...           3 years ago
  • 1.0.1-alpha.20220415.2                                ...           3 years ago
  • 1.0.1-alpha.20220406.3                                ...           3 years ago
  • 1.0.1-alpha.20220401.10                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 1.0.0-alpha.20220322.1                                ...           3 years ago
  • 1.0.0-alpha.20220315.1                                ...           3 years ago
  • 1.0.0-alpha.20220310.3                                ...           3 years ago
  • 1.0.0-alpha.20220309.5                                ...           3 years ago
  • 1.0.0-alpha.20220307.7                                ...           3 years ago
  • 1.0.0-alpha.20220204.4                                ...           3 years ago
  • 1.0.0-preview.14                                ...           3 years ago
  • 1.0.0-alpha.20220131.3                                ...           3 years ago
  • 1.0.0-alpha.20220120.2                                ...           3 years ago
  • 1.0.0-alpha.20220114.1                                ...           3 years ago
  • 1.0.0-alpha.20220104.5                                ...           3 years ago
  • 1.0.0-alpha.20211214.4                                ...           3 years ago
  • 1.0.0-alpha.20211208.10                                ...           3 years ago
  • 1.0.0-alpha.20210930.2                                ...           3 years ago
  • 1.0.0-alpha.20210903.3                                ...           3 years ago
  • 1.0.0-alpha.20210830.2                                ...           3 years ago
  • 1.0.0-alpha.20210816.6                                ...           3 years ago
  • 1.0.0-alpha.20210716.1                                ...           3 years ago
  • 1.0.0-preview.13                                ...           3 years ago
  • 1.0.0-alpha.20210713.1                                ...           3 years ago
  • 1.0.0-alpha.20210702.4                                ...           3 years ago
  • 1.0.0-preview.12                                ...           3 years ago
  • 1.0.0-alpha.20210623.4                                ...           3 years ago
  • 1.0.0-alpha.20210617.1                                ...           3 years ago
  • 1.0.0-alpha.20210611.2                                ...           3 years ago
  • 1.0.0-alpha.20210518.2                                ...           3 years ago
  • 1.0.0-preview.11                                ...           4 years ago
  • 1.0.0-alpha.20210326.1                                ...           4 years ago
  • 1.0.0-alpha.20210317.1                                ...           4 years ago
  • 1.0.0-preview.10                                ...           4 years ago
  • 1.0.0-alpha.20210301.1                                ...           4 years ago
  • 1.0.0-alpha.20210226.1                                ...           4 years ago
  • 1.0.0-alpha.20210118.1                                ...           4 years ago
  • 1.0.0-alpha.20201224.1                                ...           4 years ago
  • 1.0.0-alpha.20201218.1                                ...           4 years ago
  • 1.0.0-alpha.20201217.1                                ...           4 years ago
  • 1.0.0-alpha.20201215.1                                ...           4 years ago
  • 1.0.0-alpha.20201201.1                                ...           4 years ago
  • 1.0.0-alpha.20201123.1                                ...           4 years ago
  • 1.0.0-alpha.20200929.1                                ...           4 years ago
  • 1.0.0-alpha.20200903.1                                ...           4 years ago
  • 1.0.0-dev.20200807.1                                ...           4 years ago
  • 1.0.0-dev.20200806.1                                ...           4 years ago
  • 1.0.0-preview.9                                ...           4 years ago
  • 1.0.0-dev.20200626.1                                ...           4 years ago
  • 1.0.0-dev.20200611.1                                ...           4 years ago
  • 1.0.0-dev.20200604.1                                ...           4 years ago
  • 1.0.0-preview.8                                ...           5 years ago
  • 1.0.0-dev.20200428.2                                ...           5 years ago
  • 1.0.0-dev.20200427.1                                ...           5 years ago
  • 1.0.0-dev.20200424.1                                ...           5 years ago
  • 1.0.0-dev.20200417.1                                ...           5 years ago
  • 1.0.0-dev.20200401.1                                ...           5 years ago
  • 1.0.0-dev.20200326.1                                ...           5 years ago
  • 1.0.0-dev.20200325.1                                ...           5 years ago
  • 1.0.0-dev.20200312.1                                ...           5 years ago
  • 1.0.0-dev.20200225.1                                ...           5 years ago
  • 1.0.0-dev.20200208.1                                ...           5 years ago
  • 1.0.0-dev.20200204.1                                ...           5 years ago
  • 1.0.0-dev.20200131.1                                ...           5 years ago
  • 1.0.0-dev.20200129.1                                ...           5 years ago
  • 1.0.0-dev.20200128.1                                ...           5 years ago
  • 1.0.0-dev.20200124.1                                ...           5 years ago
  • 1.0.0-dev.20200122.1                                ...           5 years ago
  • 1.0.0-dev.20200121.1                                ...           5 years ago
  • 1.0.0-dev.20200120.1                                ...           5 years ago
  • 1.0.0-dev.20200119.1                                ...           5 years ago
  • 1.0.0-dev.20200118.1                                ...           5 years ago
  • 1.0.0-dev.20200117.1                                ...           5 years ago
  • 1.0.0-dev.20200116.1                                ...           5 years ago
  • 1.0.0-dev.20200115.1                                ...           5 years ago
  • 1.0.0-dev.20200114.1                                ...           5 years ago
  • 1.0.0-dev.20200113.1                                ...           5 years ago
  • 1.0.0-dev.20200112.1                                ...           5 years ago
  • 1.0.0-dev.20200111.1                                ...           5 years ago
  • 1.0.0-dev.20200110.1                                ...           5 years ago
  • 1.0.0-dev.20200109.1                                ...           5 years ago
  • 1.0.0-dev.20200108.1                                ...           5 years ago
  • 1.0.0-dev.20200107.1                                ...           5 years ago
  • 1.0.0-dev.20200106.1                                ...           5 years ago
  • 1.0.0-dev.20200105.1                                ...           5 years ago
  • 1.0.0-dev.20200104.1                                ...           5 years ago
  • 1.0.0-dev.20200103.1                                ...           5 years ago
  • 1.0.0-dev.20200102.1                                ...           5 years ago
  • 1.0.0-dev.20200101.1                                ...           5 years ago
  • 1.0.0-dev.20191231.1                                ...           5 years ago
  • 1.0.0-dev.20191228.1                                ...           5 years ago
  • 1.0.0-dev.20191227.1                                ...           5 years ago
  • 1.0.0-dev.20191226.1                                ...           5 years ago
  • 1.0.0-dev.20191225.1                                ...           5 years ago
  • 1.0.0-dev.20191224.1                                ...           5 years ago
  • 1.0.0-dev.20191223.1                                ...           5 years ago
  • 1.0.0-dev.20191222.1                                ...           5 years ago
  • 1.0.0-dev.20191221.1                                ...           5 years ago
  • 1.0.0-dev.20191220.1                                ...           5 years ago
  • 1.0.0-dev.20191219.1                                ...           5 years ago
  • 1.0.0-dev.20191217.1                                ...           5 years ago
  • 1.0.0-dev.20191216.1                                ...           5 years ago
  • 1.0.0-dev.20191215.1                                ...           5 years ago
  • 1.0.0-dev.20191214.1                                ...           5 years ago
  • 1.0.0-dev.20191212.1                                ...           5 years ago
  • 1.0.0-dev.20191211.1                                ...           5 years ago
  • 1.0.0-dev.20191210.1                                ...           5 years ago
  • 1.0.0-dev.20191209.1                                ...           5 years ago
  • 1.0.0-dev.20191207.1                                ...           5 years ago
  • 1.0.0-dev.20191206.1                                ...           5 years ago
  • 1.0.0-dev.20191205.1                                ...           5 years ago
  • 1.0.0-dev.20191204.1                                ...           5 years ago
  • 1.0.0-preview.7                                ...           5 years ago
  • 1.0.0-dev.20191118.1                                ...           5 years ago
  • 1.0.0-dev.20191117.1                                ...           5 years ago
  • 1.0.0-dev.20191116.1                                ...           5 years ago
  • 1.0.0-dev.20191115.2                                ...           5 years ago
  • 1.0.0-dev.20191115.1                                ...           5 years ago
  • 1.0.0-preview.5                                ...           5 years ago
  • 1.0.0-preview.4                                ...           5 years ago
  • 1.0.0-preview.3                                ...           5 years ago
  • 1.0.0-preview.2                                ...           5 years ago
  • 1.0.0-preview.1                                ...           5 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE