@google-cloud/opentelemetry-cloud-trace-propagator
    TypeScript icon, indicating that this package has built-in type declarations

    0.13.0 • Public • Published

    OpenTelemetry Google Cloud Trace Propagator

    NPM Published Version Apache License

    OpenTelemetry Google Cloud Trace Propagator allows other services to create spans with the right context.

    Format: TRACE_ID/SPAN_ID;o=TRACE_TRUE

    • {TRACE_ID}

      • is a 32-character hexadecimal value representing a 128-bit number.
      • It should be unique between your requests, unless you intentionally want to bundle the requests together.
    • {SPAN_ID}

      • is the decimal representation of the (unsigned) span ID.
      • It should be randomly generated and unique in your trace.
      • For subsequent requests, set SPAN_ID to the span ID of the parent request.
    • {TRACE_TRUE}

      • must be 1 to trace request. Specify 0 to not trace the request.

    Usage

    const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
    const { CloudPropagator } = require('@google-cloud/opentelemetry-cloud-trace-propagator');
    
    const provider = new NodeTracerProvider();
    provider.register({
      // Use CloudPropagator
      propagator: new CloudPropagator()
    });

    Useful links

    Install

    npm i @google-cloud/opentelemetry-cloud-trace-propagator

    DownloadsWeekly Downloads

    36,038

    Version

    0.13.0

    License

    Apache-2.0

    Unpacked Size

    21.4 kB

    Total Files

    9

    Last publish

    Collaborators

    • ofrobots
    • google-wombot
    • google-admin
    • soldair