0.4.1 • Published 2 years ago

@oracle/trace-propagator v0.4.1

Weekly downloads
-
License
UPL-1.0
Repository
github
Last release
2 years ago

Trace Propagator

This utility will construct the various trace propagation formats. All you need to do is give it a valid traceId and spanId.

Installation

Install the package:

npm i --save @oracle/trace-propagator

Examples

To use it in your code:

import { constructPropagation } from '@oracle/trace-propagator';

let promise = fetch(url, {
  headers: constructPropagation({ traceId, spanId })
});

Or if you have your own headers already, such as auth:

import { constructPropagation } from '@oracle/trace-propagator';

let promise = fetch(url, {
  headers: {
    Authentication: 'secret',
    ...constructPropagation({ traceId, spanId })
  }
});

Help

Open a GitHub issue for bug reports, questions, or requests for enhancements.

Contributing

This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide.

Security

Please consult the security guide for our responsible security vulnerability disclosure process.

License

Copyright (c) 2021 Oracle and/or its affiliates. Released under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl/.