build.gradle.kts 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. }
  4. muzzle {
  5. pass {
  6. group.set("software.amazon.awssdk")
  7. module.set("aws-core")
  8. versions.set("[2.2.0,)")
  9. // Used by all SDK services, the only case it isn't is an SDK extension such as a custom HTTP
  10. // client, which is not target of instrumentation anyways.
  11. extraDependency("software.amazon.awssdk:protocol-core")
  12. excludeInstrumentationName("aws-sdk-2.2-sqs")
  13. // several software.amazon.awssdk artifacts are missing for this version
  14. skip("2.17.200")
  15. }
  16. fail {
  17. group.set("software.amazon.awssdk")
  18. module.set("aws-core")
  19. versions.set("[2.2.0,)")
  20. // Used by all SDK services, the only case it isn't is an SDK extension such as a custom HTTP
  21. // client, which is not target of instrumentation anyways.
  22. extraDependency("software.amazon.awssdk:protocol-core")
  23. // "fail" asserts that *all* the instrumentation modules fail to load, but the core one is
  24. // actually expected to succeed, so exclude it from checks.
  25. excludeInstrumentationName("aws-sdk-2.2-core")
  26. // several software.amazon.awssdk artifacts are missing for this version
  27. skip("2.17.200")
  28. }
  29. pass {
  30. group.set("software.amazon.awssdk")
  31. module.set("sqs")
  32. versions.set("[2.2.0,)")
  33. // Used by all SDK services, the only case it isn't is an SDK extension such as a custom HTTP
  34. // client, which is not target of instrumentation anyways.
  35. extraDependency("software.amazon.awssdk:protocol-core")
  36. // several software.amazon.awssdk artifacts are missing for this version
  37. skip("2.17.200")
  38. }
  39. }
  40. dependencies {
  41. implementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:library-autoconfigure"))
  42. implementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:library"))
  43. library("software.amazon.awssdk:aws-core:2.2.0")
  44. library("software.amazon.awssdk:sqs:2.2.0")
  45. testImplementation(project(":instrumentation:aws-sdk:aws-sdk-2.2:testing"))
  46. // Make sure these don't add HTTP headers
  47. testImplementation(project(":instrumentation:apache-httpclient:apache-httpclient-4.0:javaagent"))
  48. testImplementation(project(":instrumentation:netty:netty-4.1:javaagent"))
  49. latestDepTestLibrary("software.amazon.awssdk:aws-json-protocol:+")
  50. latestDepTestLibrary("software.amazon.awssdk:aws-core:+")
  51. latestDepTestLibrary("software.amazon.awssdk:dynamodb:+")
  52. latestDepTestLibrary("software.amazon.awssdk:ec2:+")
  53. latestDepTestLibrary("software.amazon.awssdk:kinesis:+")
  54. latestDepTestLibrary("software.amazon.awssdk:rds:+")
  55. latestDepTestLibrary("software.amazon.awssdk:s3:+")
  56. latestDepTestLibrary("software.amazon.awssdk:sqs:+")
  57. }
  58. tasks {
  59. val testExperimentalSqs by registering(Test::class) {
  60. group = "verification"
  61. systemProperty("otel.instrumentation.aws-sdk.experimental-use-propagator-for-messaging", "true")
  62. }
  63. check {
  64. dependsOn(testExperimentalSqs)
  65. }
  66. withType<Test>().configureEach {
  67. systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean)
  68. // TODO run tests both with and without experimental span attributes
  69. systemProperty("otel.instrumentation.aws-sdk.experimental-span-attributes", "true")
  70. }
  71. withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>().configureEach {
  72. mergeServiceFiles {
  73. include("software/amazon/awssdk/global/handlers/execution.interceptors")
  74. }
  75. }
  76. }