Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions docs/contributing/documenting-instrumentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ instrumentation.
Example:

```yaml
display_name: "Example Instrumentation"
description: "This instrumentation enables..."
semantic_conventions:
- HTTP_CLIENT_SPANS
Expand Down Expand Up @@ -117,6 +118,15 @@ additional_telemetry:
type: "STRING"
```

### Display Name (optional)

Display name is mostly used for UI purposes, and has two main uses:

- Providing a more user-friendly name for the instrumentation than the module name
(e.g., "Apache CXF JAX-RS 2.x" instead of "jaxrs-2.0-cxf-3.2").
- Collapsing multiple related modules into a single display name
(e.g., "Akka Actors" for both "akka-actor-2.3" and "akka-actor-fork-join-2.5").

### Description (required)

At a minimum, every instrumentation metadata file should include a `description`.
Expand Down Expand Up @@ -150,6 +160,13 @@ Some notes when writing descriptions:
the description unless they are essential to understanding the purpose of the instrumentation.
* It is not usually necessary to include specific library or framework version numbers in the
description, unless that context is significant in some way.
* When describing instrumentations with controller or view spans:
* Always explicitly state that controller/view spans are disabled by default
* Use the phrase "(controller spans are disabled by default)" or "(view spans are disabled by default)"
* When an instrumentation has both enabled-by-default features (like HTTP_ROUTE) and disabled-by-default
features (like CONTROLLER_SPANS or VIEW_SPANS), describe the enabled features first, then the disabled features
* Example: "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)."


### Semantic Conventions
Expand Down Expand Up @@ -185,11 +202,13 @@ the relevant functionality descriptions.
List of possible options:

* `HTTP_ROUTE`: Instrumentation that enriches HTTP spans with route information
* `EXPERIMENTAL_ONLY`: Instrumentation that is experimental and may not be stable
* `CONTEXT_PROPAGATION`: Instrumentation that provides context propagation capabilities
* `CONTEXT_PROPAGATION`: Instrumentation that propagates OpenTelemetry context across application or thread boundaries. This applies to:
* Inter-process/application context propagation: Passing context through headers between applications (HTTP, gRPC, messaging, etc.)
* Inter-thread context propagation: Passing context from one thread to another (executors, actors, reactive streams, etc.)
* Does not include standard single-threaded scope management or normal span creation patterns
* `AUTO_INSTRUMENTATION_SHIM`: Instrumentation that adapts or bridges instrumentation from upstream libraries or frameworks
* `CONTROLLER_SPANS`: Instrumentation that generates controller-level spans
* `VIEW_SPANS`: Instrumentation that generates view-level spans
* `CONTROLLER_SPANS`: Instrumentation that generates controller-level spans for controller/handler methods in web frameworks (disabled by default, experimental)
* `VIEW_SPANS`: Instrumentation that generates view-level spans for view rendering such as templates or JSP (disabled by default, experimental)

### Library Link

Expand Down
46 changes: 46 additions & 0 deletions docs/instrumentation-list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4608,34 +4608,80 @@ libraries:
type: BOOLEAN
jaxws:
- name: jaxws-2.0
display_name: JAX-WS
description: |
This instrumentation enables controller spans for JAX-WS Provider implementations (controller spans are disabled by default).
library_link: https://github.com/jakartaee/jax-ws-api
features:
- CONTROLLER_SPANS
source_path: instrumentation/jaxws/jaxws-2.0
scope:
name: io.opentelemetry.jaxws-2.0
target_versions:
javaagent:
- javax.xml.ws:jaxws-api:[2.0,]
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller (INTERNAL) spans.
type: boolean
default: false
- name: jaxws-2.0-axis2-1.6
display_name: Apache Axis2 1.6 JAX-WS 2.x
description: |
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).
library_link: https://axis.apache.org/axis2/java/core/
features:
- HTTP_ROUTE
- CONTROLLER_SPANS
source_path: instrumentation/jaxws/jaxws-2.0-axis2-1.6
scope:
name: io.opentelemetry.jaxws-2.0-axis2-1.6
target_versions:
javaagent:
- org.apache.axis2:axis2-jaxws:[1.6.0,)
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller (INTERNAL) spans.
type: boolean
default: false
- name: jaxws-cxf-3.0
display_name: Apache CXF 3.x JAX-WS
description: |
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).
library_link: https://cxf.apache.org/
features:
- HTTP_ROUTE
- CONTROLLER_SPANS
source_path: instrumentation/jaxws/jaxws-cxf-3.0
scope:
name: io.opentelemetry.jaxws-cxf-3.0
target_versions:
javaagent:
- org.apache.cxf:cxf-rt-frontend-jaxws:[3.0.0,)
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller (INTERNAL) spans.
type: boolean
default: false
- name: jaxws-jws-api-1.1
display_name: JWS API
description: |
This instrumentation enables controller spans for methods annotated with the @WebService annotation from the JWS API (controller spans are disabled by default).
library_link: https://github.com/jakartaee/jws-api
disabled_by_default: true
features:
- CONTROLLER_SPANS
source_path: instrumentation/jaxws/jaxws-jws-api-1.1
scope:
name: io.opentelemetry.jaxws-jws-api-1.1
target_versions:
javaagent:
- javax.jws:javax.jws-api:[1.1,]
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller (INTERNAL) spans.
type: boolean
default: false
- name: jaxws-metro-2.2
source_path: instrumentation/jaxws/jaxws-metro-2.2
scope:
Expand Down
4 changes: 4 additions & 0 deletions instrumentation-docs/instrumentations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ readonly INSTRUMENTATIONS=(
"jaxrs:jaxrs-3.0:jaxrs-3.0-jersey-3.0:javaagent:testExperimental"
"jaxrs:jaxrs-3.0:jaxrs-3.0-resteasy-6.0:javaagent:test"
"jaxrs:jaxrs-3.0:jaxrs-3.0-resteasy-6.0:javaagent:testExperimental"
"jaxws:jaxws-2.0:javaagent:test"
"jaxws:jaxws-2.0-axis2-1.6:javaagent:test"
"jaxws:jaxws-cxf-3.0:javaagent:test"
"jaxws:jaxws-jws-api-1.1:javaagent:test"
"jetty-httpclient:jetty-httpclient-12.0:javaagent:test"
"jetty-httpclient:jetty-httpclient-9.2:javaagent:test"
"jodd-http-4.2:javaagent:test"
Expand Down
1 change: 0 additions & 1 deletion instrumentation-docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public class SpringWebInstrumentationModule extends InstrumentationModule
* The specific functionality that the instrumentation provides
* Options are:
* HTTP_ROUTE
* EXPERIMENTAL_ONLY
* CONTEXT_PROPAGATION
* AUTO_INSTRUMENTATION_SHIM
* CONTROLLER_SPANS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
public enum InstrumentationFeature {
HTTP_ROUTE,
EXPERIMENTAL_ONLY,
CONTEXT_PROPAGATION,
AUTO_INSTRUMENTATION_SHIM,
CONTROLLER_SPANS,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,54 @@ muzzle {
}
}

val axis2Version = "1.6.0"

dependencies {
bootstrap(project(":instrumentation:servlet:servlet-common:bootstrap"))

library("org.apache.axis2:axis2-jaxws:1.6.0")

compileOnly(project(":muzzle"))
compileOnly("jakarta.servlet:jakarta.servlet-api:5.0.0")

testLibrary("org.apache.axis2:axis2-jaxws:$axis2Version")
testLibrary("org.apache.axis2:axis2-transport-http:$axis2Version")
testLibrary("org.apache.axis2:axis2-transport-local:$axis2Version")

testImplementation(project(":instrumentation:jaxws:jaxws-2.0-common-testing"))

testInstrumentation(project(":instrumentation:jaxws:jaxws-2.0:javaagent"))
testInstrumentation(project(":instrumentation:jaxws:jaxws-jws-api-1.1:javaagent"))
testInstrumentation(project(":instrumentation:jaxws:jaxws-2.0-axis2-1.6:javaagent"))

testInstrumentation(project(":instrumentation:servlet:servlet-3.0:javaagent"))
testInstrumentation(project(":instrumentation:jetty:jetty-8.0:javaagent"))

testImplementation("javax.xml.bind:jaxb-api:2.2.11")
testImplementation("com.sun.xml.bind:jaxb-core:2.2.11")
testImplementation("com.sun.xml.bind:jaxb-impl:2.2.11")

testImplementation("com.sun.xml.ws:jaxws-rt:2.2.8")
testImplementation("com.sun.xml.ws:jaxws-tools:2.2.8")

latestDepTestLibrary("org.apache.axis2:axis2-jaxws:1.+") // see jaxws-3.0-axis2-2.0-testing module
latestDepTestLibrary("org.apache.axis2:axis2-transport-http:1.+") // see jaxws-3.0-axis2-2.0-testing module
latestDepTestLibrary("org.apache.axis2:axis2-transport-local:1.+") // see jaxws-3.0-axis2-2.0-testing module
}

configurations.configureEach {
if (name.contains("test")) {
// axis has a dependency on servlet2 api, get rid of it - otherwise the servlet3 instrumentation
// will fail during tests
exclude("javax.servlet", "servlet-api")
}
}

tasks.withType<Test>().configureEach {
// required on jdk17
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
systemProperty("metadataConfig", "otel.instrumentation.common.experimental.controller-telemetry.enabled=true")
}
13 changes: 13 additions & 0 deletions instrumentation/jaxws/jaxws-2.0-axis2-1.6/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
display_name: Apache Axis2 1.6 JAX-WS 2.x
description: >
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).
library_link: https://axis.apache.org/axis2/java/core/
features:
- HTTP_ROUTE
- CONTROLLER_SPANS
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller (INTERNAL) spans.
type: boolean
default: false
2 changes: 2 additions & 0 deletions instrumentation/jaxws/jaxws-2.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ dependencies {

tasks.withType<Test>().configureEach {
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
systemProperty("metadataConfig", "otel.instrumentation.common.experimental.controller-telemetry.enabled=true")
}
12 changes: 12 additions & 0 deletions instrumentation/jaxws/jaxws-2.0/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
display_name: JAX-WS
description: >
This instrumentation enables controller spans for JAX-WS Provider implementations (controller
spans are disabled by default).
library_link: https://github.com/jakartaee/jax-ws-api
features:
- CONTROLLER_SPANS
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller (INTERNAL) spans.
type: boolean
default: false
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,6 @@ tasks.withType<Test>().configureEach {
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
systemProperty("metadataConfig", "otel.instrumentation.common.experimental.controller-telemetry.enabled=true")
}
13 changes: 13 additions & 0 deletions instrumentation/jaxws/jaxws-cxf-3.0/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
display_name: Apache CXF 3.x JAX-WS
description: >
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).
library_link: https://cxf.apache.org/
features:
- HTTP_ROUTE
- CONTROLLER_SPANS
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller (INTERNAL) spans.
type: boolean
default: false
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ dependencies {

tasks.withType<Test>().configureEach {
jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
systemProperty("metadataConfig", "otel.instrumentation.common.experimental.controller-telemetry.enabled=true")
}
12 changes: 12 additions & 0 deletions instrumentation/jaxws/jaxws-jws-api-1.1/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
display_name: JWS API
description: >
This instrumentation enables controller spans for methods annotated with the @WebService
annotation from the JWS API (controller spans are disabled by default).
library_link: https://github.com/jakartaee/jws-api
features:
- CONTROLLER_SPANS
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller (INTERNAL) spans.
type: boolean
default: false
disabled_by_default: true
1 change: 0 additions & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ include(":instrumentation:jaxrs-client:jaxrs-client-2.0-testing")
include(":instrumentation:jaxws:jaxws-2.0:javaagent")
include(":instrumentation:jaxws:jaxws-2.0-arquillian-testing")
include(":instrumentation:jaxws:jaxws-2.0-axis2-1.6:javaagent")
include(":instrumentation:jaxws:jaxws-2.0-axis2-1.6-testing")
include(":instrumentation:jaxws:jaxws-2.0-common-testing")
include(":instrumentation:jaxws:jaxws-2.0-metro-2.2-testing")
include(":instrumentation:jaxws:jaxws-2.0-tomee-testing")
Expand Down