exceptionfactory opened a new pull request, #7830: URL: https://github.com/apache/nifi/pull/7830
# Summary [NIFI-12115](https://issues.apache.org/jira/browse/NIFI-12115) Adds a `ListenOTLP` Processor to collect OpenTelemetry information, supporting [OTLP Specification 1.0.0](https://opentelemetry.io/docs/specs/otlp/). OTLP defines HTTP as the basic communication protocol and outlines the following transport encoding options: - Protobuf over gRPC - Protobuf over HTTP - JSON over HTTP OTLP also includes support for [gzip](https://en.wikipedia.org/wiki/Gzip) compression over gRPC or HTTP. The `ListenOTLP` Processor supports the standard transport encoding options and uses content negotiation based on the HTTP `Content-Type` header to select the appropriate parsing implementation. The Processor converts incoming requests to standard OpenTelemetry objects and writes objects using the standard JSON encoding, which includes special handling for hexadecimal-encoding identifiers. Using JSON as the standard output format allows subsequent Processors to select or filter as necessary. Output FlowFiles can contain a batch of one or more resource elements, depending on data volumes and batch size configuration. `ListenOTLP` adds the `client.socket.address` and `client.socket.port` attributes to the `Resource` definition of received requests to provide an additional level of source tracking. The Processor requires an `SSL Context Service` property to enforce communication over HTTPS. The gRPC protocol requires HTTP/2, which uses Application Protocol Negotiation in the TLS handshake to select the HTTP version. With the potentially sensitive nature of telemetry information, the initial version of `ListenOTLP` requires HTTPS, and can be configured for mTLS with `Client Authentication` required. Additional changes include updates to the `nifi-event-transport` library supporting configurable TLS Cipher Suites through optional `SSLParameters` settings. HTTP/2 requires a restricted set of TLS Cipher Suites, so this adjustment supports that approach. The [opentelemetry-proto](https://github.com/open-telemetry/opentelemetry-proto) and [jackson-datatype-protobuf](https://github.com/HubSpot/jackson-datatype-protobuf) libraries are both licensed under Apache Software License Version 2 with no additional notice files. OTLP 1.0.0 JSON examples are available in the [opentelemetry-proto](https://github.com/open-telemetry/opentelemetry-proto/tree/v1.0.0/examples/) examples directory. For testing with an instrumented system, the [OpenTelemetry Java Agent](https://opentelemetry.io/docs/instrumentation/java/automatic/agent-config/) can be configured using Java System properties in `bootstrap.conf` for basic instrumentation of JVM memory and Jetty calls using the following properties: ``` java.arg.otelAgent=-javaagent:./opentelemetry-javaagent.jar java.arg.otelCertificate=-Dotel.exporter.otlp.certificate=./conf/trusted.pem java.arg.otelEndpoint=-Dotel.exporter.otlp.endpoint=https://localhost:4317 ``` The `trusted.pem` file must contain the issuer of the server certificate configured for `ListenOTLP`. The OpenTelemetry Java Agent defaults to using gRPC for transport encoding without compression, but additional options can be configured based on the [OTLP exporter properties](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk-extensions/autoconfigure/README.md#otlp-exporter-span-metric-and-log-exporters). This pull request targets the main branch, with the intent of backporting the addition following minor adjustments. # Tracking Please complete the following tracking steps prior to pull request creation. ### Issue Tracking - [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created ### Pull Request Tracking - [X] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000` - [X] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000` ### Pull Request Formatting - [X] Pull Request based on current revision of the `main` branch - [X] Pull Request refers to a feature branch with one commit containing changes # Verification Please indicate the verification steps performed prior to pull request creation. ### Build - [X] Build completed using `mvn clean install -P contrib-check` - [X] JDK 21 ### Licensing - [X] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html) - [X] New dependencies are documented in applicable `LICENSE` and `NOTICE` files ### Documentation - [X] Documentation formatting appears as expected in rendered files -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
