NodeJS OpenTracing
Datadog の調査レポート: サーバーレスの状態 レポート: サーバーレスの状態

NodeJS OpenTracing

このページは英語では対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

This library is OpenTracing compliant. Use the (OpenTracing API and the Datadog Tracer (dd-trace) library to measure execution times for specific pieces of code. In the following example, a Datadog Tracer is initialized and used as a global tracer:

// server.js

const tracer = require('dd-trace').init();
const opentracing = require('opentracing');

opentracing.initGlobalTracer(tracer);

const app = require('./app.js');

// app.js

const tracer = opentracing.globalTracer();

The following tags are available to override Datadog specific options:

  • service.name: The service name to be used for this span. The service name from the tracer is used if this is not provided.
  • resource.name: The resource name to be used for this span. The operation name is used if this is not provided.
  • span.type: The span type to be used for this span. The span type falls back to custom if not provided.

Further Reading