#!/usr/bin/env bash

set -euo pipefail

# This file is sourced by collect.sh and ci-collect.sh

# shellcheck disable=SC2034
readonly INSTRUMENTATIONS=(
  # <module path (colon-separated)> : <javaagent|library> : [ gradle-task-suffix ]
  "activej-http-6.0:javaagent:test"
  "akka:akka-http-10.0:javaagent:test"
  "alibaba-druid-1.0:javaagent:test"
  "alibaba-druid-1.0:javaagent:testStableSemconv"
  "apache-dbcp-2.0:javaagent:test"
  "apache-dbcp-2.0:javaagent:testStableSemconv"
  "apache-dubbo-2.7:javaagent:testDubbo"
  "apache-httpasyncclient-4.1:javaagent:test"
  "apache-httpclient:apache-httpclient-2.0:javaagent:test"
  "apache-httpclient:apache-httpclient-4.0:javaagent:test"
  "apache-httpclient:apache-httpclient-4.3:library:test"
  "apache-httpclient:apache-httpclient-5.0:javaagent:test"
  "apache-httpclient:apache-httpclient-5.2:library:test"
  "armeria:armeria-1.3:javaagent:test"
  "armeria:armeria-grpc-1.14:javaagent:test"
  "async-http-client:async-http-client-1.9:javaagent:test"
  "async-http-client:async-http-client-2.0: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"
  "aws-sdk:aws-sdk-1.11:javaagent:test"
  "aws-sdk:aws-sdk-1.11:javaagent:testStableSemconv"
  "aws-sdk:aws-sdk-2.2:javaagent:test"
  "aws-sdk:aws-sdk-2.2:javaagent:testBedrockRuntime"
  "aws-sdk:aws-sdk-2.2:javaagent:testStableSemconv"
  "c3p0-0.9:javaagent:test"
  "c3p0-0.9:javaagent:testStableSemconv"
  "camel-2.20:javaagent:test"
  "camel-2.20:javaagent:testExperimental"
  "camel-2.20:javaagent:testStableSemconv"
  "cassandra:cassandra-3.0:javaagent:test"
  "cassandra:cassandra-3.0:javaagent:testStableSemconv"
  "cassandra:cassandra-4.0:javaagent:test"
  "cassandra:cassandra-4.0:javaagent:testStableSemconv"
  "cassandra:cassandra-4.4:javaagent:test"
  "cassandra:cassandra-4.4:javaagent:testStableSemconv"
  "clickhouse:clickhouse-client-v1-0.5:javaagent:test"
  "clickhouse:clickhouse-client-v1-0.5:javaagent:testStableSemconv"
  "clickhouse:clickhouse-client-v2-0.8:javaagent:test"
  "clickhouse:clickhouse-client-v2-0.8:javaagent:testStableSemconv"
  "couchbase:couchbase-2.0:javaagent:test"
  "couchbase:couchbase-2.0:javaagent:testStableSemconv"
  "couchbase:couchbase-2.6:javaagent:test"
  "couchbase:couchbase-2.6:javaagent:testExperimental"
  "couchbase:couchbase-2.6:javaagent:testStableSemconv"
  "dropwizard:dropwizard-views-0.7:javaagent:test"
  "elasticsearch:elasticsearch-api-client-7.16:javaagent:test"
  "elasticsearch:elasticsearch-api-client-7.16:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-rest-7.0:javaagent:test"
  "elasticsearch:elasticsearch-rest-7.0:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-transport-5.0:javaagent:test"
  "elasticsearch:elasticsearch-transport-5.0:javaagent:testExperimental"
  "elasticsearch:elasticsearch-transport-5.0:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-transport-5.3:javaagent:test"
  "elasticsearch:elasticsearch-transport-5.3:javaagent:testExperimental"
  "elasticsearch:elasticsearch-transport-5.3:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch65Test"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch65TestExperimental"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch65TestStableSemconv"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch6Test"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch6TestExperimental"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch6TestStableSemconv"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch7Test"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch7TestExperimental"
  "elasticsearch:elasticsearch-transport-6.0:javaagent:elasticsearch7TestStableSemconv"
  "failsafe-3.0:library:test"
  "finagle-http-23.11:javaagent:test"
  "finatra-2.9:javaagent:test"
  "geode-1.4:javaagent:test"
  "geode-1.4:javaagent:testStableSemconv"
  "google-http-client-1.19:javaagent:test"
  "grails-3.0:javaagent:test"
  "graphql-java:graphql-java-12.0:javaagent:test"
  "graphql-java:graphql-java-20.0:javaagent:test"
  "graphql-java:graphql-java-20.0:javaagent:testDataFetcher"
  "grizzly-2.3:javaagent:test"
  "grpc-1.6:javaagent:test"
  "grpc-1.6:javaagent:testExperimental"
  "gwt-2.0:javaagent:test"
  "helidon-4.3:javaagent:test"
  "hibernate:hibernate-3.3:javaagent:test"
  "hibernate:hibernate-3.3:javaagent:testExperimental"
  "hibernate:hibernate-4.0:javaagent:test"
  "hibernate:hibernate-4.0:javaagent:testExperimental"
  "hibernate:hibernate-6.0:javaagent:test"
  "hibernate:hibernate-6.0:javaagent:testExperimental"
  "hibernate:hibernate-procedure-call-4.3:javaagent:test"
  "hibernate:hibernate-procedure-call-4.3:javaagent:testExperimental"
  "hikaricp-3.0:javaagent:test"
  "hikaricp-3.0:javaagent:testStableSemconv"
  "http-url-connection:javaagent:test"
  "hystrix-1.4:javaagent:test"
  "hystrix-1.4:javaagent:testExperimental"
  "influxdb-2.4:javaagent:test"
  "influxdb-2.4:javaagent:testStableSemconv"
  "java-http-client:javaagent:test"
  "java-http-server:javaagent:test"
  "jaxrs:jaxrs-1.0:javaagent:test"
  "jaxrs:jaxrs-2.0:jaxrs-2.0-annotations:javaagent:test"
  "jaxrs:jaxrs-2.0:jaxrs-2.0-cxf-3.2:javaagent:test"
  "jaxrs:jaxrs-2.0:jaxrs-2.0-cxf-3.2:javaagent:testExperimental"
  "jaxrs:jaxrs-2.0:jaxrs-2.0-jersey-2.0:javaagent:test"
  "jaxrs:jaxrs-2.0:jaxrs-2.0-jersey-2.0:javaagent:testExperimental"
  "jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-3.0:javaagent:test"
  "jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-3.0:javaagent:testExperimental"
  "jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-3.1:javaagent:test"
  "jaxrs:jaxrs-2.0:jaxrs-2.0-resteasy-3.1:javaagent:testExperimental"
  "jaxrs:jaxrs-3.0:jaxrs-3.0-annotations:javaagent:test"
  "jaxrs:jaxrs-3.0:jaxrs-3.0-jersey-3.0:javaagent:test"
  "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"
  "nats:nats-2.17:javaagent:test"
  "nats:nats-2.17:javaagent:testExperimental"
  "netty:netty-3.8:javaagent:test"
  "netty:netty-4.0:javaagent:test"
  "netty:netty-4.1:javaagent:test"
  "okhttp:okhttp-2.2:javaagent:test"
  "okhttp:okhttp-3.0:javaagent:test"
  "openai:openai-java-1.1:javaagent:test"
  "opensearch:opensearch-java-3.0:javaagent:test"
  "opensearch:opensearch-java-3.0:javaagent:testStableSemconv"
  "opensearch:opensearch-rest-1.0:javaagent:test"
  "opensearch:opensearch-rest-1.0:javaagent:testStableSemconv"
  "opensearch:opensearch-rest-3.0:javaagent:test"
  "opensearch:opensearch-rest-3.0:javaagent:testStableSemconv"
  "oshi:javaagent:test"
  "oshi:javaagent:testExperimental"
  "pekko:pekko-http-1.0:javaagent:test"
  "play:play-ws:play-ws-1.0:javaagent:test"
  "play:play-ws:play-ws-2.0:javaagent:test"
  "play:play-ws:play-ws-2.1:javaagent:test"
  "reactor:reactor-netty:reactor-netty-0.9:javaagent:test"
  "reactor:reactor-netty:reactor-netty-1.0:javaagent:test"
  "spring:spring-batch-3.0:javaagent:test"
  "spring:spring-data:spring-data-1.8:javaagent:test"
  "spring:spring-integration-4.1:javaagent:test"
  "spring:spring-integration-4.1:javaagent:testWithProducerInstrumentation"
  "spring:spring-integration-4.1:javaagent:testWithRabbitInstrumentation"
  "spring:spring-jms:spring-jms-2.0:javaagent:test"
  "spring:spring-kafka-2.7:javaagent:test"
  "spring:spring-kafka-2.7:javaagent:testNoReceiveTelemetry"
  "spring:spring-pulsar-1.0:javaagent:test"
  "spring:spring-rabbit-1.0:javaagent:test"
  "spring:spring-rmi-4.0:javaagent:test"
  "spring:spring-scheduling-3.1:javaagent:test"
  "spring:spring-scheduling-3.1:javaagent:testExperimental"
  "spring:spring-web:spring-web-3.1:library:test"
  "spring:spring-web:spring-web-6.0:javaagent:test"
  "spring:spring-webflux:spring-webflux-5.0:javaagent:test"
  "spring:spring-webflux:spring-webflux-5.0:javaagent:test"
  "spring:spring-webflux:spring-webflux-5.3:library:test"
  "spring:spring-webmvc:spring-webmvc-3.1:javaagent:test"
  "spring:spring-webmvc:spring-webmvc-3.1:javaagent:testExperimental"
  "spring:spring-webmvc:spring-webmvc-3.1:javaagent:testExperimental"
  "spring:spring-webmvc:spring-webmvc-5.3:library:test"
  "spring:spring-webmvc:spring-webmvc-6.0:javaagent:test"
  "spring:spring-webmvc:spring-webmvc-6.0:javaagent:test"
  "spring:spring-webmvc:spring-webmvc-6.0:javaagent:testExperimental"
  "tomcat:tomcat-jdbc:javaagent:test"
  "tomcat:tomcat-jdbc:javaagent:testStableSemconv"
  "vertx:vertx-http-client:vertx-http-client-3.0:javaagent:test"
  "vertx:vertx-http-client:vertx-http-client-4.0:javaagent:test"
  "vertx:vertx-http-client:vertx-http-client-5.0:javaagent:test"
  "vertx:vertx-redis-client-4.0:javaagent:test"
  "vertx:vertx-redis-client-4.0:javaagent:testStableSemconv"
  "vertx:vertx-sql-client:vertx-sql-client-4.0:javaagent:test"
  "vertx:vertx-sql-client:vertx-sql-client-4.0:javaagent:testStableSemconv"
  "vertx:vertx-sql-client:vertx-sql-client-5.0:javaagent:test"
  "vertx:vertx-sql-client:vertx-sql-client-5.0:javaagent:testStableSemconv"
  "vibur-dbcp-11.0:javaagent:test"
  "vibur-dbcp-11.0:javaagent:testStableSemconv"
)

#  Some instrumentation test suites don't run ARM, so we use colima to run them in an x86_64
#  container.
# shellcheck disable=SC2034
readonly COLIMA_INSTRUMENTATIONS=(
  "elasticsearch:elasticsearch-rest-5.0:javaagent:test"
  "elasticsearch:elasticsearch-rest-5.0:javaagent:testStableSemconv"
  "elasticsearch:elasticsearch-rest-6.4:javaagent:test"
  "elasticsearch:elasticsearch-rest-6.4:javaagent:testStableSemconv"
  "oracle-ucp-11.2:javaagent:test"
  "oracle-ucp-11.2:javaagent:testStableSemconv"
  "spring:spring-jms:spring-jms-6.0:javaagent:test"
)
