Skip to content

Commit 827403e

Browse files
committed
Add server span name feature
1 parent 561042d commit 827403e

File tree

11 files changed

+41
-28
lines changed

11 files changed

+41
-28
lines changed

docs/contributing/documenting-instrumentation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ the relevant functionality descriptions.
201201

202202
List of possible options:
203203

204-
* `HTTP_ROUTE`: Instrumentation that enriches HTTP spans with route information
204+
* `HTTP_ROUTE`: Instrumentation that enriches HTTP spans with route information (e.g., `/users/{id}`). Sets both the span name and the `http.route` attribute.
205+
* `SERVER_SPAN_NAME`: Instrumentation that enriches the HTTP server span name with controller, view, or operation information. This feature applies to instrumentations that update the server span name based on framework-specific information (like JSF view IDs or JAX-WS operation names) without setting the `http.route` attribute. The key distinction from `HTTP_ROUTE` is that `SERVER_SPAN_NAME` only updates the span name, while `HTTP_ROUTE` updates both the span name and the `http.route` attribute.
205206
* `CONTEXT_PROPAGATION`: Instrumentation that propagates OpenTelemetry context across application or thread boundaries. This applies to:
206207
* Inter-process/application context propagation: Passing context through headers between applications (HTTP, gRPC, messaging, etc.)
207208
* Inter-thread context propagation: Passing context from one thread to another (executors, actors, reactive streams, etc.)

docs/instrumentation-list.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5681,10 +5681,10 @@ libraries:
56815681
- name: jaxws-2.0-axis2-1.6
56825682
display_name: Apache Axis2 1.6 JAX-WS 2.x
56835683
description: |
5684-
This instrumentation enriches HTTP server spans with route information, and enables controller spans for Apache Axis2 JAX-WS web services (controller spans are disabled by default).
5684+
This instrumentation enriches server span names with web service operation information, and enables controller spans for Apache Axis2 JAX-WS web services (controller spans are disabled by default).
56855685
library_link: https://axis.apache.org/axis2/java/core/
56865686
features:
5687-
- HTTP_ROUTE
5687+
- SERVER_SPAN_NAME
56885688
- CONTROLLER_SPANS
56895689
source_path: instrumentation/jaxws/jaxws-2.0-axis2-1.6
56905690
scope:
@@ -5705,10 +5705,10 @@ libraries:
57055705
- name: jaxws-cxf-3.0
57065706
display_name: Apache CXF 3.x JAX-WS
57075707
description: |
5708-
This instrumentation enriches HTTP server spans with route information, and enables controller spans for Apache CXF JAX-WS web services (controller spans are disabled by default).
5708+
This instrumentation enriches server span names with web service operation information, and enables controller spans for Apache CXF JAX-WS web services (controller spans are disabled by default).
57095709
library_link: https://cxf.apache.org/
57105710
features:
5711-
- HTTP_ROUTE
5711+
- SERVER_SPAN_NAME
57125712
- CONTROLLER_SPANS
57135713
source_path: instrumentation/jaxws/jaxws-cxf-3.0
57145714
scope:
@@ -5757,10 +5757,10 @@ libraries:
57575757
- name: jaxws-metro-2.2
57585758
display_name: Metro JAX-WS
57595759
description: |
5760-
This instrumentation enriches HTTP server spans with route information, and enables controller spans for Metro JAX-WS web services (controller spans are disabled by default).
5760+
This instrumentation enriches server span names with web service operation information, and enables controller spans for Metro JAX-WS web services (controller spans are disabled by default).
57615761
library_link: https://javaee.github.io/metro/
57625762
features:
5763-
- HTTP_ROUTE
5763+
- SERVER_SPAN_NAME
57645764
- CONTROLLER_SPANS
57655765
source_path: instrumentation/jaxws/jaxws-metro-2.2
57665766
scope:
@@ -6659,9 +6659,10 @@ libraries:
66596659
- name: jsf-mojarra-1.2
66606660
display_name: JSF
66616661
description: |
6662-
This instrumentation enables controller spans for Mojarra JSF action listeners (controller spans are disabled by default).
6662+
This instrumentation enriches server span names with JSF view information, and enables controller spans for Mojarra JSF action listeners (controller spans are disabled by default).
66636663
library_link: https://github.com/eclipse-ee4j/mojarra
66646664
features:
6665+
- SERVER_SPAN_NAME
66656666
- CONTROLLER_SPANS
66666667
source_path: instrumentation/jsf/jsf-mojarra-1.2
66676668
scope:
@@ -6686,9 +6687,10 @@ libraries:
66866687
- name: jsf-mojarra-3.0
66876688
display_name: JSF
66886689
description: |
6689-
This instrumentation enables controller spans for Mojarra JSF action listeners (controller spans are disabled by default).
6690+
This instrumentation enriches server span names with JSF view information, and enables controller spans for Mojarra JSF action listeners (controller spans are disabled by default).
66906691
library_link: https://github.com/eclipse-ee4j/mojarra
66916692
features:
6693+
- SERVER_SPAN_NAME
66926694
- CONTROLLER_SPANS
66936695
source_path: instrumentation/jsf/jsf-mojarra-3.0
66946696
minimum_java_version: 11
@@ -6710,9 +6712,10 @@ libraries:
67106712
- name: jsf-myfaces-1.2
67116713
display_name: JSF
67126714
description: |
6713-
This instrumentation enables controller spans for Apache MyFaces action listeners (controller spans are disabled by default).
6715+
This instrumentation enriches server span names with JSF view information, and enables controller spans for Apache MyFaces action listeners (controller spans are disabled by default).
67146716
library_link: https://myfaces.apache.org/
67156717
features:
6718+
- SERVER_SPAN_NAME
67166719
- CONTROLLER_SPANS
67176720
source_path: instrumentation/jsf/jsf-myfaces-1.2
67186721
scope:
@@ -6733,9 +6736,10 @@ libraries:
67336736
- name: jsf-myfaces-3.0
67346737
display_name: JSF
67356738
description: |
6736-
This instrumentation enables controller spans for Apache MyFaces action listeners (controller spans are disabled by default).
6739+
This instrumentation enriches server span names with JSF view information, and enables controller spans for Apache MyFaces action listeners (controller spans are disabled by default).
67376740
library_link: https://myfaces.apache.org/
67386741
features:
6742+
- SERVER_SPAN_NAME
67396743
- CONTROLLER_SPANS
67406744
source_path: instrumentation/jsf/jsf-myfaces-3.0
67416745
minimum_java_version: 11

instrumentation-docs/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ public class SpringWebInstrumentationModule extends InstrumentationModule
138138
* The specific functionality that the instrumentation provides
139139
* Options are:
140140
* HTTP_ROUTE
141+
* SERVER_SPAN_NAME
141142
* CONTEXT_PROPAGATION
142143
* AUTO_INSTRUMENTATION_SHIM
143144
* CONTROLLER_SPANS

instrumentation-docs/src/main/java/io/opentelemetry/instrumentation/docs/internal/InstrumentationFeature.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212
public enum InstrumentationFeature {
1313
HTTP_ROUTE,
14+
SERVER_SPAN_NAME,
1415
CONTEXT_PROPAGATION,
1516
AUTO_INSTRUMENTATION_SHIM,
1617
CONTROLLER_SPANS,

instrumentation/jaxws/jaxws-2.0-axis2-1.6/metadata.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
display_name: Apache Axis2 1.6 JAX-WS 2.x
22
description: >
3-
This instrumentation enriches HTTP server spans with route information, and enables controller
4-
spans for Apache Axis2 JAX-WS web services (controller spans are disabled by default).
3+
This instrumentation enriches server span names with web service operation information, and
4+
enables controller spans for Apache Axis2 JAX-WS web services (controller spans are disabled by
5+
default).
56
library_link: https://axis.apache.org/axis2/java/core/
67
features:
7-
- HTTP_ROUTE
8+
- SERVER_SPAN_NAME
89
- CONTROLLER_SPANS
910
configurations:
1011
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled

instrumentation/jaxws/jaxws-cxf-3.0/metadata.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
display_name: Apache CXF 3.x JAX-WS
22
description: >
3-
This instrumentation enriches HTTP server spans with route information, and enables controller
4-
spans for Apache CXF JAX-WS web services (controller spans are disabled by default).
3+
This instrumentation enriches server span names with web service operation information, and
4+
enables controller spans for Apache CXF JAX-WS web services (controller spans are disabled by
5+
default).
56
library_link: https://cxf.apache.org/
67
features:
7-
- HTTP_ROUTE
8+
- SERVER_SPAN_NAME
89
- CONTROLLER_SPANS
910
configurations:
1011
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled

instrumentation/jaxws/jaxws-metro-2.2/metadata.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
display_name: Metro JAX-WS
22
description: >
3-
This instrumentation enriches HTTP server spans with route information, and enables controller
4-
spans for Metro JAX-WS web services (controller spans are disabled by default).
3+
This instrumentation enriches server span names with web service operation information, and
4+
enables controller spans for Metro JAX-WS web services (controller spans are disabled by default).
55
library_link: https://javaee.github.io/metro/
66
features:
7-
- HTTP_ROUTE
7+
- SERVER_SPAN_NAME
88
- CONTROLLER_SPANS
99
configurations:
1010
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled

instrumentation/jsf/jsf-mojarra-1.2/metadata.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
display_name: JSF
22
description: >
3-
This instrumentation enables controller spans for Mojarra JSF action listeners (controller spans
4-
are disabled by default).
3+
This instrumentation enriches server span names with JSF view information, and enables controller
4+
spans for Mojarra JSF action listeners (controller spans are disabled by default).
55
features:
6+
- SERVER_SPAN_NAME
67
- CONTROLLER_SPANS
78
library_link: https://github.com/eclipse-ee4j/mojarra
89
configurations:

instrumentation/jsf/jsf-mojarra-3.0/metadata.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
display_name: JSF
22
description: >
3-
This instrumentation enables controller spans for Mojarra JSF action listeners (controller spans
4-
are disabled by default).
3+
This instrumentation enriches server span names with JSF view information, and enables controller
4+
spans for Mojarra JSF action listeners (controller spans are disabled by default).
55
features:
6+
- SERVER_SPAN_NAME
67
- CONTROLLER_SPANS
78
library_link: https://github.com/eclipse-ee4j/mojarra
89
configurations:

instrumentation/jsf/jsf-myfaces-1.2/metadata.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
display_name: JSF
22
description: >
3-
This instrumentation enables controller spans for Apache MyFaces action listeners (controller
4-
spans are disabled by default).
3+
This instrumentation enriches server span names with JSF view information, and enables controller
4+
spans for Apache MyFaces action listeners (controller spans are disabled by default).
55
features:
6+
- SERVER_SPAN_NAME
67
- CONTROLLER_SPANS
78
library_link: https://myfaces.apache.org/
89
configurations:

0 commit comments

Comments
 (0)