Skip to content

Commit 0229434

Browse files
feat(instrumentation): make InstrumentationAbstract.init public (#4418)
* Make InstrumentationAbstract.init public * Update changelog * Update JSDoc --------- Co-authored-by: Marc Pichler <[email protected]>
1 parent 72c60f1 commit 0229434

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/
1111

1212
### :rocket: (Enhancement)
1313

14+
* feat(instrumentation): Make `init()` method public [#4418](https://github.com/open-telemetry/opentelemetry-js/pull/4418)
15+
1416
### :bug: (Bug Fix)
1517

1618
### :books: (Refine Doc)

experimental/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All notable changes to experimental packages in this project will be documented
88

99
### :rocket: (Enhancement)
1010

11+
* feat(instrumentation): Make `init()` method public [#4418](https://github.com/open-telemetry/opentelemetry-js/pull/4418)
1112
* feat(exporter-metrics-otlp-http): add option to set the exporter aggregation preference [#4409](https://github.com/open-telemetry/opentelemetry-js/pull/4409) @AkselAllas
1213
* feat(node-sdk): add spanProcessors option [#4454](https://github.com/open-telemetry/opentelemetry-js/pull/4454) @naseemkullah
1314

experimental/packages/opentelemetry-instrumentation/src/instrumentation.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,12 @@ export abstract class InstrumentationAbstract<T = any>
134134

135135
/**
136136
* Init method in which plugin should define _modules and patches for
137-
* methods
137+
* methods.
138+
* Use `enable()` if you are trying to turn on this plugin. This method
139+
* will return objects to patch specific modules with the appropriate
140+
* instrumentation (or not return anything).
138141
*/
139-
protected abstract init():
142+
abstract init():
140143
| InstrumentationModuleDefinition<T>
141144
| InstrumentationModuleDefinition<T>[]
142145
| void;

0 commit comments

Comments
 (0)