-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] - Extract OpenTelemetry to a separate package (#19734)
## What - Rewrite core-tracing using an abstraction of an instrumenter - Remove @opentelemetry packages from core-tracing - Introduce a stateful client that can be used to interact with the underlying instrumenter - Introduce @azure/opentelemetry-instrumentation-azure-sdk package providing an OTel instrumenter - Integrate this package with OpenTelemetry's instrumentation APIs to provide a plug-in that lights up OTel based tracing - Add a `chaiAzureTrace` chai plugin to allow for quick and simple validation of tracing logic for packages ## Why ### Core-tracing This is essentially a rewrite of core-tracing to abstract away from @opentelemetry/api for multiple reasons: 1. Decreased bundle size 2. Making OTel tracing truly opt-in. If you don't use OTel, there's no reason for us to call OTel APIs. While the APIs is now stable, it has been problematic for us in the past. 3. No enums, no TS > 3.9 features to downlevel 3. Finally, @opentelemetry/api is very flexible and able to support many scenarios at the cost of what is a very wide API surface area. We can avoid much of this complexity. ### new instrumentation package With the changes to core-tracing, we now need a way to tie our abstraction to a concrete OTel implementation. A new package, `@azure/opentelemetry-instrumentation-azure-sdk` provides this hook using well-known `registerInstrumentations` API to light-up OTel based tracing when a user opts-in. ### New chai plugin This is our attempt at reducing the boilerplate around tracing, providing what is essentially a custom assertion wrapped in a chai plugin. While this may change significantly, I feel comfortable merging this in and making follow-up changes on main.
- Loading branch information
Showing
61 changed files
with
3,483 additions
and
1,456 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Oops, something went wrong.