Skip to content

Conversation

phananh1010
Copy link
Owner

@phananh1010 phananh1010 commented Aug 27, 2025

User description

This PR mirrors the file changes from upstream PR elastic#133451 as a single commit for evaluation.


PR Type

Enhancement


Description

  • Add OpenTelemetry data plugin with protobuf support

  • Update build configuration for generated sources

  • Add protobuf dependencies and verification metadata

  • Include Google protobuf license files


Diagram Walkthrough

flowchart LR
  A["OpenTelemetry Plugin"] --> B["Protobuf Dependencies"]
  B --> C["Generated Sources"]
  C --> D["Build Configuration"]
  D --> E["License Files"]
Loading

File Walkthrough

Relevant files
Configuration changes
checkstyle_suppressions.xml
Suppress checkstyle for generated protobuf sources             

build-tools-internal/src/main/resources/checkstyle_suppressions.xml

  • Add checkstyle suppression for otel-data generated sources
+1/-0     
Dependencies
verification-metadata.xml
Add protobuf and OpenTelemetry dependency verification     

gradle/verification-metadata.xml

  • Add protobuf gradle plugin verification metadata
  • Add OS detector gradle plugin verification metadata
  • Add protobuf-java 4.32.0 verification metadata
  • Add protoc compiler verification for multiple platforms
  • Add OS maven plugin verification metadata
  • Add OpenTelemetry proto verification metadata
+57/-0   
Documentation
protobuf-LICENSE.txt
Add protobuf license file                                                               

x-pack/plugin/otel-data/licenses/protobuf-LICENSE.txt

  • Add Google protobuf BSD-style license text
+32/-0   
protobuf-NOTICE.txt
Add protobuf notice file                                                                 

x-pack/plugin/otel-data/licenses/protobuf-NOTICE.txt

  • Add Google protobuf notice file with copyright
+32/-0   

Copy link

qodo-merge-pro bot commented Aug 27, 2025

PR Reviewer Guide 🔍

(Review updated until commit 6a89573)

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Broad Suppression

The new Checkstyle suppression for generated sources under x-pack/plugin/otel-data/build/generated/sources/ suppresses all checks for the entire directory. Confirm this path targets only generated code and won’t mask issues in hand-written sources or accidentally match broader paths on different OS separators.

<suppress files="x-pack[/\\]plugin[/\\]otel-data[/\\]build[/\\]generated[/\\]sources[/\\]" checks="." />
Multiple Protobuf Versions

New entries add protobuf artifacts at versions 2.5.0, 3.25.5, and 4.32.0 along with protoc 4.32.0. Verify dependency resolution to avoid classpath conflicts and ensure consumers of otel-data don’t pull mixed protobuf versions at runtime.

<component group="com.google.protobuf" name="protobuf-java" version="4.32.0">
   <artifact name="protobuf-java-4.32.0.jar">
      <sha256 value="e902c91b454812b7d056b8d303a572733bf0587576ff157c1049116c9626241d" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.protobuf" name="protobuf-java-util" version="3.25.5">
   <artifact name="protobuf-java-util-3.25.5.jar">
      <sha256 value="dacc58b2c3d2fa8d4bddc1acb881e78d6cf7c137dd78bc1d67f6aca732436a8d" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.protobuf" name="protoc" version="4.32.0">
   <artifact name="protoc-4.32.0-linux-aarch_64.exe">
      <sha256 value="bc95ab180ef088eed3f97c30b213ac6439ccac01989d18f9e908eb5233432136" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-linux-ppcle_64.exe">
      <sha256 value="37d1c923270dcea474423994cae32e127d9aeb0cf97d40ccf652bd671358dc74" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-linux-s390_64.exe">
      <sha256 value="0b97e27d36456e8a29855f10e6dfacd27043131d44bed460b921641c7201ec0a" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-linux-x86_32.exe">
      <sha256 value="75abfd89ae91a12cfbd40fe9aca20a698cc6134fbc7bef999f5c8f3b8c604b13" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-linux-x86_64.exe">
      <sha256 value="373c7da2c1cae98ac1a494a8a53e28100af70450ab55c064daa92ba48af5fe23" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-osx-aarch_64.exe">
      <sha256 value="96c06aac6eb7e247a78f2ffe8b3aaf4419a6765e3d96d724cc3db0e296e7aa94" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-osx-universal_binary.exe">
      <sha256 value="35f98ecc7c0efeb7d63427a6f3b9f7f2adc9f59d79275c3f0ae87030876c187c" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-osx-x86_64.exe">
      <sha256 value="91b2b3b5ad84cfed2869c69830c926130d312e357b4f128796504b5448a6534c" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-windows-x86_32.exe">
      <sha256 value="dc71390eb8a113f37a24275bc57cc59ddaceeac39b98af2181c94755f2f411f9" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-windows-x86_64.exe">
      <sha256 value="a1e25d1b71e805233daefabba72a21566580354a192539cdab43bbf191dbf951" origin="Generated by Gradle"/>
   </artifact>
</component>
Tooling Plugins Hashes

Added verification for protobuf-gradle-plugin, osdetector-gradle-plugin, and os-maven-plugin. Ensure build logic pins these exact versions and that transitive classpaths in the build don’t introduce incompatible plugin versions.

<component group="com.google.gradle" name="osdetector-gradle-plugin" version="1.7.3">
   <artifact name="osdetector-gradle-plugin-1.7.3.jar">
      <sha256 value="6b4692f913a21b1fb603169ee78ba8f3e4ab2af9d762af9ca88b79126c1c0ad1" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="failureaccess" version="1.0">
   <artifact name="failureaccess-1.0.jar">
      <sha256 value="d084bef9cd07a8537a1753e4850a69b7e8bab1d1e22e9f3a1e4826309a7a2336" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="failureaccess" version="1.0.1">
   <artifact name="failureaccess-1.0.1.jar">
      <sha256 value="a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="failureaccess" version="1.0.2">
   <artifact name="failureaccess-1.0.2.jar">
      <sha256 value="8a8f81cf9b359e3f6dfa691a1e776985c061ef2f223c9b2c80753e1b458e8064" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="guava" version="16.0.1">
   <artifact name="guava-16.0.1.jar">
      <sha256 value="a896857d07845d38c7dc5bbc0457b6d9b0f62ecffda010e5e9ec12d561f676d3" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="guava" version="27.0-jre">
   <artifact name="guava-27.0-jre.jar">
      <sha256 value="63b09db6861011e7fb2481be7790c7fd4b03f0bb884b3de2ecba8823ad19bf3f" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="guava" version="28.2-jre">
   <artifact name="guava-28.2-jre.jar">
      <sha256 value="fc3aa363ad87223d1fbea584eee015a862150f6d34c71f24dc74088a635f08ef" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="guava" version="31.1-jre">
   <artifact name="guava-31.1-jre.jar">
      <sha256 value="a42edc9cab792e39fe39bb94f3fca655ed157ff87a8af78e1d6ba5b07c4a00ab" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="guava" version="32.0.1-jre">
   <artifact name="guava-32.0.1-jre.jar">
      <sha256 value="bd7fa227591fb8509677d0d1122cf95158f3b8a9f45653f58281d879f6dc48c5" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="guava" version="32.1.1-jre">
   <artifact name="guava-32.1.1-jre.jar">
      <sha256 value="91fbba37f1c8b251cf9ea9e7d3a369eb79eb1e6a5df1d4bbf483dd0380740281" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="guava" version="32.1.3-jre">
   <artifact name="guava-32.1.3-jre.jar">
      <sha256 value="6d4e2b5a118aab62e6e5e29d185a0224eed82c85c40ac3d33cf04a270c3b3744" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="guava" version="33.4.0-jre">
   <artifact name="guava-33.4.0-jre.jar">
      <sha256 value="b918c98a7e44dbe94ebd9fe3e40cddaadb5a93e6a78eb6008b42df237241e538" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.guava" name="listenablefuture" version="9999.0-empty-to-avoid-conflict-with-guava">
   <artifact name="listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar">
      <sha256 value="b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client" version="1.41.1">
   <artifact name="google-http-client-1.41.1.jar">
      <sha256 value="93bf43e033c7441f66f163f2cb1244d89765c492b844031258ae92b7081dde6e" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client" version="1.42.3">
   <artifact name="google-http-client-1.42.3.jar">
      <sha256 value="e395dd1765e3e6bceb0c610706bcf4128de84bd6e65cf1d4adbf998b4114161c" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client" version="1.46.3">
   <artifact name="google-http-client-1.46.3.jar">
      <sha256 value="2490a06e44b7f2adbcfe27e4099a576c0ee8d269437188d5391acd48c6d34310" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client-appengine" version="1.42.3">
   <artifact name="google-http-client-appengine-1.42.3.jar">
      <sha256 value="3a876b1f704ac6d8500b8430b288dbce78c52dc18c43c008a587a7377bb81e2e" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client-appengine" version="1.46.3">
   <artifact name="google-http-client-appengine-1.46.3.jar">
      <sha256 value="b0f48794b234439ad9e9b44f63874c78e8c553d03aa89f2864ca231e3c590b43" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client-gson" version="1.41.1">
   <artifact name="google-http-client-gson-1.41.1.jar">
      <sha256 value="29deba06c722e00dd31fe7e3b526bdfec0577660b868a1efaceeddb5e04208a8" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client-gson" version="1.42.3">
   <artifact name="google-http-client-gson-1.42.3.jar">
      <sha256 value="8196efaa89c5f73b00b2b48edad02fcd78524259407c37ab1860737988545cee" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client-gson" version="1.46.3">
   <artifact name="google-http-client-gson-1.46.3.jar">
      <sha256 value="74eee65c563871659469eb85d703e5a7223427010ad545982fdc53d7db573266" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client-jackson2" version="1.41.1">
   <artifact name="google-http-client-jackson2-1.41.1.jar">
      <sha256 value="3b9add5859979519236f45cc9c9f53da975e0b5b88e0cdfd4bb009b112b4d435" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client-jackson2" version="1.42.3">
   <artifact name="google-http-client-jackson2-1.42.3.jar">
      <sha256 value="b03a79f38e924e2eeaee673acf314626825284cb39948d06c2948ad083b4d089" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.http-client" name="google-http-client-jackson2" version="1.46.3">
   <artifact name="google-http-client-jackson2-1.46.3.jar">
      <sha256 value="06368f5e3704fbe1d983736f802ed172fbc7d957a4f76b381fd0d8c8e92830e4" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.inject" name="guice" version="3.0">
   <artifact name="guice-3.0.jar">
      <sha256 value="1a59d0421ffd355cc0b70b42df1c2e9af744c8a2d0c92da379f5fca2f07f1d22" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.inject" name="guice" version="4.0">
   <artifact name="guice-4.0.jar">
      <sha256 value="b378ffc35e7f7125b3c5f3a461d4591ae1685e3c781392f0c854ed7b7581d6d2" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.inject" name="guice" version="4.2.1">
   <artifact name="guice-4.2.1-no_aop.jar">
      <sha256 value="158fd8f52d2a4b4ce4293ac2b833bb2427f5ddfe30df4ae0fd4675a1038a3b79" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.inject.extensions" name="guice-servlet" version="3.0">
   <artifact name="guice-servlet-3.0.jar">
      <sha256 value="9e72a4b8582888d53c2f4297e93276a3c14c82880124490f2da7b16a9df1c618" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.inject.extensions" name="guice-servlet" version="4.0">
   <artifact name="guice-servlet-4.0.jar">
      <sha256 value="651e18a98af376ac0717d22ddc89863dbc0c7512e28340a6642a8612ab82b15d" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.j2objc" name="j2objc-annotations" version="1.1">
   <artifact name="j2objc-annotations-1.1.jar">
      <sha256 value="2994a7eb78f2710bd3d3bfb639b2c94e219cedac0d4d084d516e78c16dddecf6" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.j2objc" name="j2objc-annotations" version="1.3">
   <artifact name="j2objc-annotations-1.3.jar">
      <sha256 value="21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.jimfs" name="jimfs" version="1.3.0">
   <artifact name="jimfs-1.3.0.jar">
      <sha256 value="82494408bb513f5512652e7b7f63d6f31f01eff57ce35c878644ffc2d25aee4f" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.oauth-client" name="google-oauth-client" version="1.34.1">
   <artifact name="google-oauth-client-1.34.1.jar">
      <sha256 value="193edf97aefa28b93c5892bdc598bac34fa4c396588030084f290b1440e8b98a" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.protobuf" name="protobuf-gradle-plugin" version="0.9.5">
   <artifact name="protobuf-gradle-plugin-0.9.5.jar">
      <sha256 value="d007dda81afeaead5dab05c27fe023ccbac97790e4d11787f4be68e6716557f8" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.protobuf" name="protobuf-java" version="2.5.0">
   <artifact name="protobuf-java-2.5.0.jar">
      <sha256 value="e0c1c64575c005601725e7c6a02cebf9e1285e888f756b2a1d73ffa8d725cc74" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.protobuf" name="protobuf-java" version="3.25.5">
   <artifact name="protobuf-java-3.25.5.jar">
      <sha256 value="8540247fad9e06baefa8fb45eb313802d019f485f14300e0f9d6b556ed88e753" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.protobuf" name="protobuf-java" version="4.32.0">
   <artifact name="protobuf-java-4.32.0.jar">
      <sha256 value="e902c91b454812b7d056b8d303a572733bf0587576ff157c1049116c9626241d" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.protobuf" name="protobuf-java-util" version="3.25.5">
   <artifact name="protobuf-java-util-3.25.5.jar">
      <sha256 value="dacc58b2c3d2fa8d4bddc1acb881e78d6cf7c137dd78bc1d67f6aca732436a8d" origin="Generated by Gradle"/>
   </artifact>
</component>
<component group="com.google.protobuf" name="protoc" version="4.32.0">
   <artifact name="protoc-4.32.0-linux-aarch_64.exe">
      <sha256 value="bc95ab180ef088eed3f97c30b213ac6439ccac01989d18f9e908eb5233432136" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-linux-ppcle_64.exe">
      <sha256 value="37d1c923270dcea474423994cae32e127d9aeb0cf97d40ccf652bd671358dc74" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-linux-s390_64.exe">
      <sha256 value="0b97e27d36456e8a29855f10e6dfacd27043131d44bed460b921641c7201ec0a" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-linux-x86_32.exe">
      <sha256 value="75abfd89ae91a12cfbd40fe9aca20a698cc6134fbc7bef999f5c8f3b8c604b13" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-linux-x86_64.exe">
      <sha256 value="373c7da2c1cae98ac1a494a8a53e28100af70450ab55c064daa92ba48af5fe23" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-osx-aarch_64.exe">
      <sha256 value="96c06aac6eb7e247a78f2ffe8b3aaf4419a6765e3d96d724cc3db0e296e7aa94" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-osx-universal_binary.exe">
      <sha256 value="35f98ecc7c0efeb7d63427a6f3b9f7f2adc9f59d79275c3f0ae87030876c187c" origin="Generated by Gradle"/>
   </artifact>
   <artifact name="protoc-4.32.0-osx-x86_64.exe">
      <sha256 value="91b2b3b5ad84cfed2869c69830c926130d312e357b4f128796504b5448a6534c" origin="Generated by Gradle"/>
   </artifact>

@phananh1010
Copy link
Owner Author

/review

Copy link

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Add OpenTelemetry license files

You introduce opentelemetry-proto (Apache 2.0) but only add Google Protobuf
license/notice; this likely leaves required OpenTelemetry license/notice files
and third-party attributions missing from the plugin. For compliance and
distribution, include the OpenTelemetry Proto license and NOTICE in
x-pack/plugin/otel-data/licenses (and update any aggregated notices) and verify
only build-time plugins/binaries (e.g., protoc, protobuf-gradle-plugin) are not
shipped at runtime.

Examples:

gradle/verification-metadata.xml [2057-2061]
      <component group="open-telemetry" name="opentelemetry-proto" version="1.7.0">
         <artifact name="opentelemetry-proto-1.7.0.zip">
            <sha256 value="ddb80357ff146f5e3bda584907185b1f635412a4b31edf6f96b102a18b8e05dc" origin="Generated by Gradle"/>
         </artifact>
      </component>
x-pack/plugin/otel-data/licenses/protobuf-LICENSE.txt [1-32]
Copyright 2008 Google Inc.  All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

    * Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer

 ... (clipped 22 lines)

Solution Walkthrough:

Before:

// File structure in x-pack/plugin/otel-data/licenses/

protobuf-LICENSE.txt
protobuf-NOTICE.txt

// Note: License files for the 'opentelemetry-proto' dependency are missing.

After:

// File structure in x-pack/plugin/otel-data/licenses/

protobuf-LICENSE.txt
protobuf-NOTICE.txt
opentelemetry-proto-LICENSE.txt // Apache 2.0 License
opentelemetry-proto-NOTICE.txt  // NOTICE file for OpenTelemetry

Suggestion importance[1-10]: 10

__

Why: The suggestion correctly identifies a critical licensing compliance issue by pointing out the missing license and notice files for the newly added opentelemetry-proto dependency.

High
Possible issue
Fix suppression path matching

Append a wildcard to match files under the generated sources directory. Without
it, the suppression may not apply to nested files and Checkstyle could run on
generated code, breaking builds.

build-tools-internal/src/main/resources/checkstyle_suppressions.xml [16]

-<suppress files="x-pack[/\\]plugin[/\\]otel-data[/\\]build[/\\]generated[/\\]sources[/\\]" checks="." />
+<suppress files="x-pack[/\\]plugin[/\\]otel-data[/\\]build[/\\]generated[/\\]sources[/\\].*" checks="." />
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies that the regular expression for the file path suppression is incomplete and would not match files within the target directory, making the new rule ineffective.

Medium
  • More

Copy link

Persistent review updated to latest commit 6a89573

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant