Update API readme and doc links (#3401)
* Update readme docs link to reflect new API location * Update feature status * Fix API doc links and readme
This commit is contained in:
parent
258b677dbc
commit
d1621d2c8b
17
README.md
17
README.md
|
|
@ -4,9 +4,7 @@
|
|||
<strong>
|
||||
<a href="https://opentelemetry.io/docs/js/getting-started/">Getting Started</a>
|
||||
•
|
||||
<a href="https://open-telemetry.github.io/opentelemetry-js-api">API Reference</a>
|
||||
•
|
||||
<a href="https://open-telemetry.github.io/opentelemetry-js">SDK Reference</a>
|
||||
<a href="https://open-telemetry.github.io/opentelemetry-js">API and SDK Reference</a>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
|
|
@ -142,6 +140,7 @@ The below table describes which versions of each set of packages are expected to
|
|||
|
||||
| API | Stable Packages | Experimental Packages |
|
||||
| ----- | --------------- | --------------------- |
|
||||
| 1.3.x | 1.8.x | 0.34.x |
|
||||
| 1.2.x | 1.7.x | 0.33.x |
|
||||
| 1.2.x | 1.6.x | 0.32.x |
|
||||
| 1.1.x | 1.5.x | 0.31.x |
|
||||
|
|
@ -158,11 +157,11 @@ The current version for each package can be found in the respective `package.jso
|
|||
|
||||
## Feature Status
|
||||
|
||||
| Signal | API Status | SDK Status |
|
||||
| ------- | ----------- | ----------------- |
|
||||
| Tracing | Stable | Release Candidate |
|
||||
| Metrics | Development | Development |
|
||||
| Logs | Roadmap | Roadmap |
|
||||
| Signal | API Status | SDK Status |
|
||||
| ------- | ----------- | ----------- |
|
||||
| Tracing | Stable | Stable |
|
||||
| Metrics | Stable | Stable |
|
||||
| Logs | Development | Development |
|
||||
|
||||
For a more detailed breakdown of feature support see the [specification compliance matrix][compliance-matrix].
|
||||
|
||||
|
|
@ -550,7 +549,7 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
|
|||
[otel-shim-opentracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-shim-opentracing
|
||||
[otel-tracing]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base
|
||||
[otel-web]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web
|
||||
[otel-api]: https://github.com/open-telemetry/opentelemetry-js-api
|
||||
[otel-api]: https://github.com/open-telemetry/opentelemetry-js/tree/main/api
|
||||
[otel-core]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core
|
||||
[otel-propagator-b3]: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-propagator-b3
|
||||
|
||||
|
|
|
|||
|
|
@ -1,37 +1,16 @@
|
|||
|
||||
---
|
||||
<p align="center">
|
||||
<strong>
|
||||
<a href="https://open-telemetry.github.io/opentelemetry-js-api">API Documentation<a/>
|
||||
•
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-js/discussions">Getting In Touch (GitHub Discussions)<a/>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-js-api/releases">
|
||||
<img alt="GitHub release (latest by date including pre-releases)" src="https://img.shields.io/github/v/release/open-telemetry/opentelemetry-js-api?include_prereleases&style=for-the-badge">
|
||||
</a>
|
||||
<a href="https://codecov.io/gh/open-telemetry/opentelemetry-js-api/branch/main/">
|
||||
<img alt="Codecov Status" src="https://img.shields.io/codecov/c/github/open-telemetry/opentelemetry-js-api?style=for-the-badge">
|
||||
</a>
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-js/blob/main/api/LICENSE">
|
||||
<img alt="license" src="https://img.shields.io/badge/license-Apache_2.0-green.svg?style=for-the-badge">
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-js-api/actions/workflows/docs.yaml">
|
||||
<img alt="Build Status" src="https://github.com/open-telemetry/opentelemetry-js-api/actions/workflows/test.yaml/badge.svg?branch=main">
|
||||
</a>
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-js-api/actions/workflows/test.yaml?query=branch%3Amain">
|
||||
<img alt="Build Status" src="https://github.com/open-telemetry/opentelemetry-js-api/actions/workflows/docs.yaml/badge.svg">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
# OpenTelemetry API for JavaScript
|
||||
|
||||
[![NPM Published Version][npm-img]][npm-url]
|
||||
<p align="center">
|
||||
<strong>
|
||||
<a href="https://open-telemetry.github.io/opentelemetry-js/modules/_opentelemetry_api.html">API Reference</a>
|
||||
•
|
||||
<a href="https://opentelemetry.io/docs/instrumentation/js/">Documentation</a>
|
||||
</br>
|
||||
<a href="https://github.com/open-telemetry/opentelemetry-js/releases">
|
||||
<img alt="NPM Release" src="https://img.shields.io/npm/v/@opentelemetry/api?color=brightgreen&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAIRlWElmTU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAACQAAAAAQAAAJAAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABigAwAEAAAAAQAAABgAAAAA8A2UOAAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXN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BsAKi9jhHxNqagY2hiaYgRCm0f0QP7H4Fp11LSXiuBY2aYFlh0DeDIVVFUJQn5rCnpiNI2gvLxHnASn9DIVHJJlm5rXvQAGEo4zvKq2w5G1NxENN7jrft1oxMdekETjxdH2Z3x%2BVTVYsPb%2BO0C%2F9%2FauN6v2hNZw5b2UOmSbG5%2FrkC3LBA%2B1PdxFxORjxpQ81GcxKc%2BybVjEBvUJvaGJ7p7n5A5KSwe4AzkasA%2BcrmzFtowoIVTiLjANm8GDsrWW35ScI3JY8Urv83tnkF8JR0yLvEt2hO%2F0qNyy3Jb3YKeHeHeLeOuVLRpNF%2Bpkf85OW7%2FzJxWdXsbsKBUk2TC0BCPwMq5Q%2FCPvaJFkNS%2F1l1qUPe%2BuH3oD59erYGI%2FY4sce6KaXYElAIOLt%2B0O3t2%2B%2FxJDF1XvOlWGC1W1B8VMszbGfOvT5qaRRAIFK3BCO164nZ0uYLH2YjNN8thXS2v2BK9gTfD7jHVxzHr4roOlEvYYz9QIz%2BVl%2FsLDXInsctFsXjqIRnO2ZO387lxmIboLDZCJ59KLFliNIgh9ipt6tLg9SihpRPDO1ia5byw7de1aCQmF5geOQtK509rzfdwxaKOIq%2B73AvwCC5%2F5fcV4vo3%2B3LpMdtWHh0ywsJC%2FZGoCb8%2F9D8F%2FifgLLl8S8QWfU8cAAAAASUVORK5CYII%3D">
|
||||
</a>
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
This package provides everything needed to interact with the OpenTelemetry API, including all TypeScript interfaces, enums, and no-op implementations. It is intended for use both on the server and in the browser.
|
||||
|
||||
|
|
@ -134,7 +113,5 @@ Apache 2.0 - See [LICENSE][license-url] for more information.
|
|||
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
|
||||
[license-url]: https://github.com/open-telemetry/opentelemetry-js/blob/main/api/LICENSE
|
||||
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
|
||||
[npm-url]: https://www.npmjs.com/package/@opentelemetry/api
|
||||
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Fapi.svg
|
||||
[docs-tracing]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/tracing.md
|
||||
[docs-sdk-registration]: https://github.com/open-telemetry/opentelemetry-js/blob/main/doc/sdk-registration.md
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ This document describes the OpenTelemetry context API for JavaScript and how it
|
|||
|
||||
_Context Specification: <https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.0/specification/context/context.md>_
|
||||
|
||||
_Context API Reference: <https://open-telemetry.github.io/opentelemetry-js-api/classes/contextapi.html>_
|
||||
_Context API Reference: <https://open-telemetry.github.io/opentelemetry-js/classes/_opentelemetry_api.ContextAPI.html>_
|
||||
|
||||
- [Context Manager](#context-manager)
|
||||
- [Root Context](#root-context)
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@ api.propagation.setGlobalPropagator(httpTraceContextPropagator);
|
|||
api.context.setGlobalContextManager(asyncHooksContextManager);
|
||||
```
|
||||
|
||||
[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js-api/classes/traceapi.html
|
||||
[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js-api/classes/propagationapi.html
|
||||
[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js-api/classes/contextapi.html
|
||||
[trace-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/_opentelemetry_api.TraceAPI.html
|
||||
[propagation-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/_opentelemetry_api.PropagationAPI.html
|
||||
[context-api-docs]: https://open-telemetry.github.io/opentelemetry-js/classes/_opentelemetry_api.ContextAPI.html
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ For a high-level overview of OpenTelemetry tracing in general and definitions of
|
|||
|
||||
_Trace API Specification: <https://github.com/open-telemetry/opentelemetry-specification/blob/v1.6.0/specification/trace/api.md>_
|
||||
|
||||
_Trace API Reference: <https://open-telemetry.github.io/opentelemetry-js-api/classes/traceapi.html>_
|
||||
_Trace API Reference: <https://open-telemetry.github.io/opentelemetry-js/classes/_opentelemetry_api.TraceAPI.html>_
|
||||
|
||||
- [Acquiring a Tracer](#acquiring-a-tracer)
|
||||
- [Starting and Ending a Span](#starting-and-ending-a-span)
|
||||
|
|
@ -23,7 +23,7 @@ _Trace API Reference: <https://open-telemetry.github.io/opentelemetry-js-api/cla
|
|||
|
||||
## Acquiring a Tracer
|
||||
|
||||
In OpenTelemetry, tracing operations are performed using methods on a _tracer_. You can get a tracer by calling [`getTracer`](https://open-telemetry.github.io/opentelemetry-js-api/classes/traceapi.html#gettracer) on the global tracer provider. `getTracer` takes the name and version of the application or library acquiring the tracer, and provides a tracer which can be used to trace operations.
|
||||
In OpenTelemetry, tracing operations are performed using methods on a _tracer_. You can get a tracer by calling [`getTracer`](https://open-telemetry.github.io/opentelemetry-js/classes/_opentelemetry_api.TraceAPI.html#getTracer) on the global tracer provider. `getTracer` takes the name and version of the application or library acquiring the tracer, and provides a tracer which can be used to trace operations.
|
||||
|
||||
```typescript
|
||||
import { trace } from '@opentelemetry/api';
|
||||
|
|
@ -33,9 +33,9 @@ const tracer = trace.getTracer("my-application", "0.1.0");
|
|||
|
||||
## Starting and Ending a Span
|
||||
|
||||
In OpenTelemetry, all _traces_ are composed of [`Spans`](https://open-telemetry.github.io/opentelemetry-js-api/interfaces/span.html). A span describes a single operation with a start time and and end time like a database request, outgoing remote request, or a function invocation. These spans are linked together by parent-child relationships to form a tree. The resultant tree is your trace, and the root of the tree is commonly called the _root span_.
|
||||
In OpenTelemetry, all _traces_ are composed of [`Spans`](https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.Span.html). A span describes a single operation with a start time and and end time like a database request, outgoing remote request, or a function invocation. These spans are linked together by parent-child relationships to form a tree. The resultant tree is your trace, and the root of the tree is commonly called the _root span_.
|
||||
|
||||
You can create a span by calling [`Tracer#startSpan`](https://open-telemetry.github.io/opentelemetry-js-api/interfaces/tracer.html#startspan). The only required argument to `startSpan` is the _span name_, which should describe the operation being performed with low cardinality.
|
||||
You can create a span by calling [`Tracer#startSpan`](https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.Tracer.html#startSpan). The only required argument to `startSpan` is the _span name_, which should describe the operation being performed with low cardinality.
|
||||
|
||||
```typescript
|
||||
const span = tracer.startSpan("my-span-name");
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
[![NPM Published Version][npm-img]][npm-url]
|
||||
[![Apache License][license-image]][license-image]
|
||||
|
||||
This package provides two [`ContextManager`](https://open-telemetry.github.io/opentelemetry-js-api/interfaces/contextmanager.html) implementations built on APIs from Node.js's [`async_hooks`][async-hooks-doc] module. If you're looking for a `ContextManager` to use in browser environments, consider [opentelemetry-context-zone](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-context-zone) or [opentelemetry-context-zone-peer-dep](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-context-zone-peer-dep).
|
||||
This package provides two [`ContextManager`](https://open-telemetry.github.io/opentelemetry-js/interfaces/_opentelemetry_api.ContextManager.html) implementations built on APIs from Node.js's [`async_hooks`][async-hooks-doc] module. If you're looking for a `ContextManager` to use in browser environments, consider [opentelemetry-context-zone](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-context-zone) or [opentelemetry-context-zone-peer-dep](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-context-zone-peer-dep).
|
||||
|
||||
The definition of the `ContextManager` interface and the problem it solves can be found [here][def-context-manager].
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue