How to use the @opentelemetry/api.propagation function in @opentelemetry/api

To help you get started, we’ve selected a few @opentelemetry/api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GoogleCloudPlatform / esp-v2 / tests / endpoints / bookstore / http_bookstore.js View on Github external
    http: {
      enabled: true,
      path: '@opentelemetry/plugin-http',
const exporter = new TraceExporter();
provider.addSpanProcessor(new BatchSpanProcessor(exporter));

// Registration. Use W3C trace context propagation with `traceparent` header.
opentelemetry.propagation.setGlobalPropagator(new HttpTraceContext());

// Load express afterwords.
var express = require('express');
var bodyParser = require('body-parser');
var swaggerTools = require('swagger-tools');

 * @typedef {Object} InitializationOptions
 * @property {Boolean} log Log incoming requests.
 * @property {Object} swagger Swagger document object.

 * Creates an Express.js application which implements a Bookstore
 * API defined in `swagger.json`.


Public API for OpenTelemetry

Latest version published 3 months ago

Package Health Score

95 / 100
Full package analysis

Popular @opentelemetry/api functions