Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
56 changes: 55 additions & 1 deletion docs/instrumentation-list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -923,6 +923,7 @@ libraries:
- name: aws-lambda-core-1.0
description: |
Provides lightweight instrumentation of the Lambda core library, supporting all versions. It generates FaaS SERVER spans with the `faas.invocation_id` attribute. Use this package if you only use `RequestStreamHandler` or know you don't use any event classes from `aws-lambda-java-events`. This also includes when you are using `aws-serverless-java-container` to run e.g., a Spring Boot application on Lambda.
For custom wrappers when using library instrumentation, you can configure the `OTEL_INSTRUMENTATION_AWS_LAMBDA_HANDLER` env property to your lambda handler method in following format `package.ClassName::methodName` and use one of wrappers as your lambda `Handler`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd replace env property with environment variable

source_path: instrumentation/aws-lambda/aws-lambda-core-1.0
scope:
name: io.opentelemetry.aws-lambda-core-1.0
Expand All @@ -945,7 +946,7 @@ libraries:
type: STRING
- name: aws-lambda-events-2.2
description: |
Provides full instrumentation of the Lambda library, including standard and custom event types, from `aws-lambda-java-events` 2.2+.
This version of the library instrumentation is deprecated, please use the aws-lambda-events-3.11 library instrumentation instead. This instrumentation builds on top of the lightweight `aws-lambda-core-1.0` instrumentation, expanding support to cover the Lambda library, including standard and custom event types.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove lightweight

source_path: instrumentation/aws-lambda/aws-lambda-events-2.2
scope:
name: io.opentelemetry.aws-lambda-events-2.2
Expand All @@ -960,6 +961,11 @@ libraries:
description: Flush timeout in milliseconds.
type: int
default: 10000
- name: otel.instrumentation.http.known-methods
description: |
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
type: list
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
telemetry:
- when: default
spans:
Expand All @@ -984,13 +990,51 @@ libraries:
- name: user_agent.original
type: STRING
- name: aws-lambda-events-3.11
description: |
This instrumentation builds on top of the lightweight `aws-lambda-core-1.0` instrumentation, expanding support to cover the Lambda library, including standard and custom event types.
source_path: instrumentation/aws-lambda/aws-lambda-events-3.11
scope:
name: io.opentelemetry.aws-lambda-events-3.11
target_versions:
library:
- com.amazonaws:aws-lambda-java-events:3.11.0
- com.amazonaws:aws-lambda-java-core:1.0.0
configurations:
- name: otel.instrumentation.aws-lambda.flush-timeout
description: Flush timeout in milliseconds.
type: int
default: 10000
telemetry:
- when: default
spans:
- span_kind: CONSUMER
attributes:
- name: messaging.destination.name
type: STRING
- name: messaging.message.id
type: STRING
- name: messaging.operation
type: STRING
- name: messaging.system
type: STRING
- span_kind: SERVER
attributes:
- name: cloud.account.id
type: STRING
- name: cloud.resource_id
type: STRING
- name: faas.invocation_id
type: STRING
- name: faas.trigger
type: STRING
- name: http.request.method
type: STRING
- name: http.response.status_code
type: LONG
- name: url.full
type: STRING
- name: user_agent.original
type: STRING
- name: aws-sdk-1.11
description: |
This instrumentation covers the AWS SDK 1.11+ client library, enabling messaging and client spans and metrics for calls to AWS services including DynamoDB, EC2, Kinesis, Lambda, RDS, S3, secrets manager, SNS/SQS and step functions.
Expand Down Expand Up @@ -3964,6 +4008,16 @@ libraries:
target_versions:
library:
- org.apache.kafka:kafka-clients:2.6.0
configurations:
- name: otel.instrumentation.messaging.experimental.capture-headers
description: A comma-separated list of header names to capture as span attributes.
type: list
default: ''
- name: otel.instrumentation.messaging.experimental.receive-telemetry.enabled
description: |
Enables experimental receive telemetry, which will cause consumers to start a new trace, with only a span link connecting it to the producer trace.
type: boolean
default: false
- name: kafka-streams-0.11
source_path: instrumentation/kafka/kafka-streams-0.11
scope:
Expand Down
1 change: 1 addition & 0 deletions instrumentation-docs/instrumentations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ readonly INSTRUMENTATIONS=(
"openai:openai-java-1.1:javaagent:test"
"aws-lambda:aws-lambda-core-1.0:javaagent:test"
"aws-lambda:aws-lambda-events-2.2:javaagent:test"
"aws-lambda:aws-lambda-events-3.11:library:test"
"cassandra:cassandra-3.0:javaagent:test"
"cassandra:cassandra-3.0:javaagent:testStableSemconv"
"cassandra:cassandra-4.0:javaagent:test"
Expand Down
7 changes: 5 additions & 2 deletions instrumentation/aws-lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ We provide two packages for instrumenting AWS lambda functions.
`aws-lambda-java-events`. This also includes when you are using `aws-serverless-java-container` to run e.g., a
Spring Boot application on Lambda.

- [aws-lambda-events-2.2](./aws-lambda-events-2.2/library) provides full instrumentation of the Lambda library, including standard
and custom event types, from `aws-lambda-java-events` 2.2+.
- [aws-lambda-events-2.2](./aws-lambda-events-2.2/library) (Library instrumentation is deprecated) provides instrumentation of the Lambda library,
including standard and custom event types, from `aws-lambda-java-events` 2.2+.

- [aws-lambda-events-3.11](./aws-lambda-events-2.2/library) provides instrumentation of the Lambda library, including standard and custom event
types, from `aws-lambda-java-events` 3.11+.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ description: >
use `RequestStreamHandler` or know you don't use any event classes from `aws-lambda-java-events`.
This also includes when you are using `aws-serverless-java-container` to run e.g., a Spring Boot
application on Lambda.

For custom wrappers when using library instrumentation, you can configure the `OTEL_INSTRUMENTATION_AWS_LAMBDA_HANDLER`
env property to your lambda handler method in following format `package.ClassName::methodName` and use one of wrappers
as your lambda `Handler`.
configurations:
- name: otel.instrumentation.aws-lambda.flush-timeout
type: int
Expand Down
13 changes: 10 additions & 3 deletions instrumentation/aws-lambda/aws-lambda-events-2.2/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
description: >
Provides full instrumentation of the Lambda library, including standard and custom event types,
from `aws-lambda-java-events` 2.2+.
This version of the library instrumentation is deprecated, please use the aws-lambda-events-3.11
library instrumentation instead. This instrumentation builds on top of the lightweight
`aws-lambda-core-1.0` instrumentation, expanding support to cover the Lambda library, including
standard and custom event types.
configurations:
- name: otel.instrumentation.aws-lambda.flush-timeout
type: int
default: 10000
description: Flush timeout in milliseconds.

- name: otel.instrumentation.http.known-methods
description: >
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
other methods will be treated as `_OTHER`.
type: list
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ dependencies {
testImplementation("uk.org.webcompere:system-stubs-jupiter")
}

tasks.withType<Test>().configureEach {
// required on jdk17
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("--add-opens=java.base/java.util=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
tasks {
withType<Test>().configureEach {
// required on jdk17
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("--add-opens=java.base/java.util=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}

test {
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
description: >
This instrumentation builds on top of the lightweight `aws-lambda-core-1.0` instrumentation,
expanding support to cover the Lambda library, including standard and custom event types.
configurations:
- name: otel.instrumentation.aws-lambda.flush-timeout
type: int
default: 10000
description: Flush timeout in milliseconds.