This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
292 additions
and
124 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Context | ||
|
||
TODO | ||
|
||
_Context API reference: <https://open-telemetry.github.io/opentelemetry-js-api/classes/contextapi.html>_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# OpenTelemetry for Library Authors | ||
|
||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Propagation | ||
|
||
TODO | ||
|
||
_Propagation API reference: <https://open-telemetry.github.io/opentelemetry-js-api/classes/propagationapi.html>_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# SDK Registration Methods | ||
|
||
These methods are used to register a compatible OpenTelemetry SDK. Some SDKs like the [OpenTelemetry JS SDK][opentelemetry-js] provide convenience methods which call these registration methods for you. | ||
|
||
- [Trace API Documentation][trace-api-docs] | ||
- [Propagation API Documentation][propagation-api-docs] | ||
- [Context API Documentation][context-api-docs] | ||
|
||
```javascript | ||
const api = require("@opentelemetry/api"); | ||
|
||
/* Register a global TracerProvider */ | ||
api.trace.setGlobalTracerProvider(tracerProvider); | ||
/* returns tracerProvider (no-op if a working provider has not been initialized) */ | ||
api.trace.getTracerProvider(); | ||
/* returns a tracer from the registered global tracer provider (no-op if a working provider has not been initialized) */ | ||
api.trace.getTracer(name, version); | ||
|
||
/* Register a global Propagator */ | ||
api.propagation.setGlobalPropagator(httpTraceContextPropagator); | ||
|
||
/* Register a global Context Manager */ | ||
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 |
Oops, something went wrong.