cf8d25ff5e
After moving to ESM/tshy, we no longer build tests/samples. This PR enables running "typecheck" as an optional rush bulk command, and fixes some of the errors found. The known errors reported on files from vite/vitest/chai are ignored. The update-snippets dev-tool command throws error of reading undefined in some cases, adding a null check fixes it. Snippets are updated as well after snippets.spec.ts files are fixed. |
||
---|---|---|
.. | ||
config | ||
review | ||
samples/v1 | ||
samples-dev | ||
src | ||
test | ||
CHANGELOG.md | ||
LICENSE | ||
README.md | ||
api-extractor.json | ||
package.json | ||
sample.env | ||
tsconfig.browser.config.json | ||
tsconfig.json | ||
tsdoc.json | ||
vitest.browser.config.ts | ||
vitest.config.ts |
README.md
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
This package is primarily used in Azure client libraries and not meant to be used directly by consumers of Azure SDKs.
Key Concepts
TracingClient
is the primary interface providing tracing functionality to client libraries. Client libraries should only be aware of and interact with aTracingClient
instance.- A
TracingClient
implementation can be created using thecreateTracingClient
factory function.
- A
Instrumenter
provides an abstraction over an instrumentation and acts as the interop point for using third party libraries like OpenTelemetry. By default, a no-opInstrumenter
is used. Customers who wish to enableOpenTelemetry
based tracing will do so by installing and registering the @azure/opentelemetry-instrumentation-azure-sdk package.TracingContext
is an immutable data container, used to pass operation-specific information around (such as span parenting information).TracingSpan
is an abstraction of aSpan
which can be used to record events, attributes, and exceptions.
Examples
Examples can be found in the samples
folder.
Next steps
You can build and run the tests locally by executing rushx test
. Explore the test
folder to see advanced usage and behavior of the public classes.
Troubleshooting
If you run into issues while using this library, please feel free to file an issue.
Contributing
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.