You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/extension/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,12 +67,12 @@ Extensions are designed to override or customize the instrumentation provided by
67
67
68
68
Consider an instrumented database client that creates a span per database call and extracts data from the database connection to provide span attributes. The following are sample use cases for that scenario that can be solved by using extensions.
69
69
70
-
### "I want to customize instrumentation without modifying core code"
70
+
### "I want to customize instrumentation without modifying the instrumentation"
71
71
72
-
The `InstrumenterCustomizerProvider` extension point allows you to customize instrumentation behavior without modifying core code:
72
+
The `InstrumenterCustomizerProvider` extension point allows you to customize instrumentation behavior without modifying the instrumentation:
73
73
74
74
- Add custom attributes and metrics to existing instrumentations
75
-
-Implement context customizers for request correlation
75
+
-Customize context
76
76
- Transform span names to match your naming conventions
77
77
- Apply customizations conditionally based on instrumentation type and span kind
Copy file name to clipboardExpand all lines: instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/instrumenter/InstrumenterCustomizer.java
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -12,36 +12,36 @@
12
12
importjava.util.function.Function;
13
13
14
14
/**
15
-
* A service provider interface (SPI) for providing customizations for instrumentation, including
16
-
* operation metrics, attributes extraction, and context customization.
15
+
* Provides customizations for instrumentation, including operation metrics, attributes extraction,
16
+
* and context customization.
17
17
*
18
-
* <p>This allows external modules or plugins to contribute custom logic for specific instrumented
19
-
* libraries, without modifying core instrumentation code. This class is internal and is hence not
20
-
* for public use. Its APIs are unstable and can change at any time.
18
+
* <p>This class is passed to {@link
19
+
* InstrumenterCustomizerProvider#customize(InstrumenterCustomizer)} to allow external modules or
20
+
* plugins to contribute custom logic for specific instrumented libraries, without modifying core
21
+
* instrumentation code. This class is internal and is hence not for public use. Its APIs are
22
+
* unstable and can change at any time.
21
23
*/
22
24
publicinterfaceInstrumenterCustomizer {
23
25
24
26
/**
25
-
* Returns the name of the instrumentation that this customizer applies to. This allows for
26
-
* efficient mapping of customizers to specific instrumentations rather than using predicates for
27
-
* matching.
27
+
* Returns the name of the instrumentation that this customizer applies to.
28
28
*
29
29
* @return the name of the instrumentation this customizer targets
30
30
*/
31
31
StringgetInstrumentationName();
32
32
33
33
/**
34
-
* Adds a single AttributesExtractor to the instrumenter. This extractor will be used to extract
35
-
* attributes from requests and responses during span creation and enrichment.
34
+
* Adds a single {@link AttributesExtractor} to the instrumenter. This extractor will be used to
35
+
* extract attributes from requests and responses during the request lifecycle.
36
36
*
37
37
* @param extractor the attributes extractor to add
38
38
* @return this InstrumenterCustomizer for method chaining
0 commit comments