diff --git a/.github/renovate.json5 b/.github/renovate.json5 index b5c67b27..985589ba 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -47,31 +47,6 @@ matchPackageNames: [ "nodejs"], enabled: false }, - { - // keep spring 2 examples - "matchFileNames": [ - "examples/**/build.gradle", - ], - "matchPackagePrefixes": [ - "org.springframework.boot:", - "io.spring.dependency-management", - "redis.clients:" - // spring 2 examples can't use the next major version - ], - "matchUpdateTypes": [ - "major" - ], - "enabled": false - }, - { - "matchFileNames": [ - "examples/**/build.gradle", - ], - "labels": [ - "oats" - ], - "groupName": "examples" - } ], "vulnerabilityAlerts": { "enabled": true, @@ -105,17 +80,5 @@ "# renovate: datasource=(?[a-z-]+?)(?: depName=(?.+?))? packageName=(?.+?)(?: versioning=(?[a-z-]+?))?\\s(?:ENV|ARG) .+?_VERSION=(?.+?)\\s" ] }, - { - "customType": "regex", - "description": "Update release in run-example.sh", - "depNameTemplate": "grafana/grafana-opentelemetry-java", - "datasourceTemplate": "github-releases", - "fileMatch": [ - "^examples/run-example.sh$", - ], - "matchStrings": [ - "RELEASE=(?[^\\s]+)" - ] - } ] } diff --git a/.github/workflows/acceptance-tests.yml b/.github/workflows/acceptance-tests.yml deleted file mode 100644 index 746a3691..00000000 --- a/.github/workflows/acceptance-tests.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Acceptance Tests label trigger - -on: - pull_request: - branches: - - main - types: - - labeled - - opened - - synchronize - - reopened - -jobs: - acceptance-tests: - uses: ./.github/workflows/reusable-acceptance-tests.yml diff --git a/.github/workflows/reusable-acceptance-tests.yml b/.github/workflows/reusable-acceptance-tests.yml deleted file mode 100644 index bbd3d98d..00000000 --- a/.github/workflows/reusable-acceptance-tests.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Acceptance Tests - -on: - workflow_dispatch: - workflow_call: - -jobs: - acceptance-tests: - # see https://stackoverflow.com/questions/62325286/run-github-actions-when-pull-requests-have-a-specific-label - if: contains(github.event.pull_request.labels.*.name, 'oats') - runs-on: ubuntu-latest - steps: - - name: Check out - uses: actions/checkout@v4 - - name: Check out oats - uses: actions/checkout@v4 - with: - repository: grafana/oats - ref: 7cd5ca42fff009fd67ea986d42c79134ac99ae48 - path: oats - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: 17 - distribution: temurin - cache: "gradle" - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: '1.23' - cache-dependency-path: oats/go.sum - - name: Setup Gradle and run build - uses: gradle/actions/setup-gradle@v4 - - name: Build - run: ./gradlew assemble - - name: Run acceptance tests - run: ./scripts/run-acceptance-tests.sh - - name: upload log file - uses: actions/upload-artifact@v4 - if: failure() - with: - name: docker-compose.log - path: oats/yaml/build/**/output.log diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 120d7568..68b898ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,16 +23,6 @@ javaagent.jar as well as our custom extension. - Markdown link checker: `find . -name '*.md' -print0 | xargs -0 -n1 markdown-link-check -c .markdown-link-check.json` (requires [markdown-link-check](https://github.com/tcort/markdown-link-check)) -## Debugging - -If one of the test applications in the "examples" directory fails to produce the right telemetry -(usually detected by the oats test), you can run the application with the javaagent attached to it -by adding the following command line arguments: - -```sh -./run.sh --attachDebugger --debugLogging --debugInstrumentations --includeAllInstrumentations -``` - ## Smoke Tests Smoke tests test the entire javaagent distribution, including the custom extension. To run the smoke tests, @@ -42,39 +32,14 @@ run the following command: SMOKE_TEST_JAVA_VERSION=8 ./gradlew :smoke-tests:test ``` -## Acceptance Tests - -Unlike smoke tests, acceptance tests are only run if the pull request has the "oats" label. - -Acceptance test cases are defined in `oats.yaml` files in the examples directory. The test cases are run by [oats]. -The declarative yaml tests are described in . - -If a test case fails (lets say "examples/jdbc/spring-boot-reactive-2"), follows these steps: - -1. Check out the [oats] repo -2. Go to the oats folder -3. `cd yaml` -4. Install ginkgo: `go install github.com/onsi/ginkgo/v2/ginkgo` -5. `TESTCASE_TIMEOUT=2h TESTCASE_BASE_PATH=/path/to/this/repo/examples ginkgo -v -r -focus 'jdbc-spring-boot-reactive-2'` -6. go to and login with admin/admin - -Use `-focus 'yaml'` to run all acceptance tests. - -Also see [Java specific options](https://github.com/grafana/oats/blob/main/yaml/README.md#java-specific-options) -for additional options. - ### Common problems -First, check the [java specific oats options](https://github.com/grafana/oats/tree/main/yaml#java-specific-options), -which can be used for debugging. - #### Instrumentation not included Check if the test passes with `TESTCASE_INCLUDE_ALL_INSTRUMENTATIONS=true`. If yes, check what the instrumentation scope is, and include this instrumentation in the list of -[tested instrumentations](./README.md#tested-instrumentations). You should also include a test case -for this instrumentation, similar to the other tests in the examples directory. +[tested instrumentations](https://github.com/grafana/grafana-opentelemetry-java/blob/main/custom/src/main/java/com/grafana/extensions/instrumentations/Instrumentations.java). Where you can find the instrumentation scope: @@ -85,20 +50,7 @@ Where you can find the instrumentation scope: See [RELEASING](RELEASING.md). -## Debugging GitHub Actions - -GitHub Actions for Acceptance test store the output log files - which can be found in the artifacts section of the -GitHub Actions run. - -- If you need more files, you can change the `path` for `actions/upload-artifact@v3` in acceptance-tests.yml. -- If you want to run a single test only, you can change the ginkgo command in run-acceptance-tests.sh to - e.g. `ginkgo -v -r -focus 'redis-spring-boot-reactive-2'`. - -![oats acceptance tests](./docs/oats-logs.png) - ## Known Issues The tests occasionally fail due to TestContainers not starting in time. Please rerun the build for now, until a new wait strategy can be determined. - -[oats]: https://github.com/grafana/oats diff --git a/custom/build.gradle b/custom/build.gradle index cc3f845e..eec77ed2 100644 --- a/custom/build.gradle +++ b/custom/build.gradle @@ -56,73 +56,5 @@ public class DistributionVersion { } } -//private String[] readmeLines() { -// // scrape the table from https://grafana.com/docs/grafana-cloud/monitor-applications/application-observability/setup/instrument/java/ once published -//// return new File("${projectDir}/../README.md").text.split("\n") -//} -// -//task manageTestedInstrumentationsClass() { -// doLast { -// def instrumentations = readmeLines() -// .dropWhile { !it.startsWith("| ID") } -// .takeWhile { it.startsWith("|") } -// .drop(2) -// .collect { " \"${it.split("\\|")[1].trim()}\"" } -// .join(",\n") -// -// updateGeneratedFile(new File("${projectDir}/src/main/java/com/grafana/extensions/instrumentations", "Instrumentations.java"), """/* -// * Copyright Grafana Labs -// * SPDX-License-Identifier: Apache-2.0 -// */ -// -//package com.grafana.extensions.instrumentations; -// -//// This class is generated from README.md in custom/build.gradle. Do not edit. -// -//import java.util.Arrays; -//import java.util.List; -// -//public class Instrumentations { -// -// public static final List TESTED_INSTRUMENTATIONS = -// Arrays.asList( -//$instrumentations); -//} -//""") -// } -//} -// -//task manageDefaultMetricsClass() { -// doLast { -// def metrics = readmeLines() -// .dropWhile { !it.startsWith("| Metric") } -// .takeWhile { it.startsWith("|") } -// .drop(2) -// .collect { " \"${it.split("\\|")[1].trim()}\"" } -// .join(",\n") -// -// updateGeneratedFile(new File("${projectDir}/src/main/java/com/grafana/extensions/filter", "DefaultMetrics.java"), """/* -// * Copyright Grafana Labs -// * SPDX-License-Identifier: Apache-2.0 -// */ -// -//package com.grafana.extensions.filter; -// -//// This class is generated from README.md in custom/build.gradle. Do not edit. -// -//import java.util.Arrays; -//import java.util.List; -// -//public class DefaultMetrics { -// -// public static final List DEFAULT_METRICS = -// Arrays.asList( -//$metrics); -//} -//""") -// } -//} - -//compileJava.dependsOn(manageVersionClass, manageTestedInstrumentationsClass, manageDefaultMetricsClass) compileJava.dependsOn(manageVersionClass) diff --git a/custom/src/main/java/com/grafana/extensions/instrumentations/Instrumentations.java b/custom/src/main/java/com/grafana/extensions/instrumentations/Instrumentations.java index 0000e69e..b1782077 100644 --- a/custom/src/main/java/com/grafana/extensions/instrumentations/Instrumentations.java +++ b/custom/src/main/java/com/grafana/extensions/instrumentations/Instrumentations.java @@ -5,8 +5,6 @@ package com.grafana.extensions.instrumentations; -// This class is generated from README.md in custom/build.gradle. Do not edit. - import java.util.Arrays; import java.util.List; diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index ca51eb50..00000000 --- a/examples/README.md +++ /dev/null @@ -1,255 +0,0 @@ -# Overview - -The example applications tests various instrumentation libraries. - -The goal is to make it very easy to check if a certain combination of libraries and frameworks is observable -using the [Java Agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation), -e.g. Java 8 with [IBM Message Queue](https://developer.ibm.com/tutorials/mq-jms-application-development-with-spring-boot/). - -## Running the examples - -Each example project is run in the same way - so these instructions apply to all of them. - -## Setup - -### Java - -Use to switch jdk versions - or just look at `.tool-versions` and select the JDK manually -before running any of the examples. - -### Alloy - -- Go to Grafana Home page -- Click on "Connect data" -- search for "OpenTelemetry (OTLP)" -- follow the instructions there - -If you're running on Linux, the script will also start Alloy if it is not running already. - -## Starting the example application - -Use `./run.sh` to start each example application. - -### Debugging the example application - -- Use `./run.sh --attachDebugger` to attach a debugger to - as explained in [debugging](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/contributing/debugging.md). -- Use `./run.sh --debugInstrumentations` to output the instrumentations that are loaded by the java agent. -- Use `./run.sh --debugLogging` to output all telemetry data to the console. -- Use `./run.sh --includeAllInstrumentations` to enable all instrumentations. - -These options can be combined. - -## Results - -### Traces - -Full trace for a request to the Cart Controller: - -![trace](doc/trace.png) - -For a reactive spring application - -![reactive trace](doc/trace-reactive.png) - -Notes: - -- the nesting level in the reactive trace is "too flat" - not investigated why -- the server span "GET /controller" is missing - not investigated why - -#### Web Server span - -Name: GET /cart - -Attributes: - - -
http.method
"GET"
http.response_content_length
29
http.route
"/cart"
http.scheme
"http"
http.status_code
200
http.target
"/cart"
net.host.name
"localhost"
net.host.port
8080
net.protocol.name
"http"
net.protocol.version
"1.1"
net.sock.host.addr
"127.0.0.1"
net.sock.peer.addr
"127.0.0.1"
net.sock.peer.port
57108
otel.library.name
"io.opentelemetry.tomcat-10.0"
otel.library.version
"1.26.0-alpha"
span.kind
"server"
status.code
0
thread.id
56
thread.name
"http-nio-8080-exec-7"
user_agent.original
"curl/7.81.0"
- - -#### Spring Web MVC span - -- Shows the Java method name of the controller - -Name: `CartController.getCart` - -Attributes: - - -
otel.library.name
"io.opentelemetry.spring-webmvc-6.0"
otel.library.version
"1.26.0-alpha"
span.kind
"internal"
status.code
0
thread.id
56
thread.name
"http-nio-8080-exec-7"
- - -#### Kafka client span - -Name: `topic1 send` - -Attributes: - - -
messaging.destination.kind
"topic"
messaging.destination.name
"topic1"
messaging.kafka.client_id
"producer-1"
messaging.kafka.destination.partition
2
messaging.kafka.message.offset
6
messaging.system
"kafka"
otel.library.name
"io.opentelemetry.kafka-clients-0.11"
otel.library.version
"1.26.0-alpha"
span.kind
"producer"
status.code
0
thread.id
56
thread.name
"http-nio-8080-exec-7"
- - -#### RestTemplate client span - -Name: `GET` - -Attributes: - - -
http.method
"GET"
http.response_content_length
4
http.status_code
200
http.url
net.peer.name
"localhost"
net.peer.port
8080
net.protocol.name
"http"
net.protocol.version
"1.1"
otel.library.name
"io.opentelemetry.http-url-connection"
otel.library.version
"1.26.0-alpha"
span.kind
"client"
status.code
0
thread.id
56
thread.name
"http-nio-8080-exec-7"
- - -#### Spring Data MongoDB internal span - -Name: `CustomerMongoRepository.findByFirstName` - -Attributes: - - -
code.function
"findByFirstName"
code.namespace
"com.grafana.springbootdemo.CustomerMongoRepository"
otel.library.name
"io.opentelemetry.spring-data-1.8"
otel.library.version
"1.26.0-alpha"
span.kind
"internal"
status.code
0
thread.id
51
thread.name
"http-nio-8080-exec-2"
- - -#### MongoDB client span - -Name: `find test.customer` - -Attributes: - - -
db.connection_string
"mongodb://localhost:27017"
db.mongodb.collection
"customer"
db.name
"test"
db.operation
"find"
db.statement
{ - "find": "customer", - "filter": { - "firstName": "?" - }, - "limit": "?", - "$db": "?", - "lsid": { - "id": "?" - } -}
db.system
"mongodb"
net.peer.name
"localhost"
net.peer.port
27017
otel.library.name
"io.opentelemetry.mongo-3.1"
otel.library.version
"1.26.0-alpha"
span.kind
"client"
status.code
0
thread.id
51
thread.name
"http-nio-8080-exec-2"
- - -#### Jedis client span - -Name: `SADD` - -Attributes: - - -
db.operation
"SADD"
db.statement
"SADD planets ?"
db.system
"redis"
net.sock.peer.addr
"127.0.0.1"
net.sock.peer.name
"127.0.0.1"
net.sock.peer.port
6379
otel.library.name
"io.opentelemetry.jedis-4.0"
otel.library.version
"1.26.0-alpha"
span.kind
"client"
status.code
0
thread.id
52
thread.name
"http-nio-8080-exec-3"
- - -#### Spring Data JPA internal span - -Name: `ProductJpaRepository.findById` - -Attributes: - - -
code.function
"findById"
code.namespace
"com.grafana.springbootdemo.ProductJpaRepository"
otel.library.name
"io.opentelemetry.spring-data-1.8"
otel.library.version
"1.26.0-alpha"
span.kind
"internal"
status.code
0
thread.id
52
thread.name
"http-nio-8080-exec-3"
- - -#### Hibernate internal span - -Name: `Session.find com.grafana.springbootdemo.Product` - -Attributes: - - -
otel.library.name
"io.opentelemetry.hibernate-6.0"
otel.library.version
"1.26.0-alpha"
span.kind
"internal"
status.code
0
thread.id
52
thread.name
"http-nio-8080-exec-3"
- - -#### JDBC client span - -Name: `SELECT 7a4ae095-d193-45c6-bcb0-baa64fd4241e.product` - -Attributes: - - -
db.connection_string
"h2:mem:"
db.name
"7a4ae095-d193-45c6-bcb0-baa64fd4241e"
db.operation
"SELECT"
db.sql.table
"product"
db.statement
"select p1_0.id,p1_0.name,p1_0.picture_url,p1_0.price from product p1_0 where p1_0.id=?"
db.system
"h2"
db.user
"sa"
otel.library.name
"io.opentelemetry.jdbc"
otel.library.version
"1.26.0-alpha"
span.kind
"client"
status.code
0
thread.id
52
thread.name
"http-nio-8080-exec-3"
- - -#### JMS Trace - -Name: `jms_destination publish` - - -
messaging.destination.kind
"queue"
messaging.destination.name
"jms_destination"
messaging.message.id
"ID:nevla-33549-1686830860119-4:1:1:1:5"
messaging.system
"jms"
otel.library.name
"io.opentelemetry.jms-1.1"
otel.library.version
"1.26.0-alpha"
span.kind
"producer"
status.code
0
thread.id
56
thread.name
"reactor-http-epoll-3"
- - -### Logging - -Using the [Java Log pattern](https://grafana.com/docs/opentelemetry/visualization/loki-data/#common-framework-formats) -is a reasonable default: - - -`2023-06-08 10:51:31.021 -INFO [nevla/main] -- com.grafana.demo.DemoApplication -- Started DemoApplication in 1.161 seconds (process running for 1.526)` - - -![logs](doc/logs.png) - -Log message attributes: - - -
Fields
attributes_thread_id
1
attributes_thread_name
main
body
Tomcat started on port(s): 8080 (http) with context path ''
exporter
OTLP
instance
nevla
instrumentation_scope_name
org.springframework.boot.web.embedded.tomcat.TomcatWebServer
job
demo-app
level
INFO
resources_host_arch
amd64
resources_host_name
nevla
resources_os_description
Linux 5.19.0-42-generic
resources_os_type
linux
resources_process_command_line
/home/foo/.asdf/installs/java/temurin-19.0.2+7/bin/java -XX:TieredStopAtLevel=1 -Dfile.encoding=UTF-8 -Duser.country=US -Duser.language=en -Duser.variant com.grafana.demo.DemoApplication
resources_process_executable_path
/home/foo/.asdf/installs/java/temurin-19.0.2+7/bin/java
resources_process_pid
866314
resources_process_runtime_description
Eclipse Adoptium OpenJDK 64-Bit Server VM 19.0.2+7
resources_process_runtime_name
OpenJDK Runtime Environment
resources_process_runtime_version
19.0.2+7
resources_service_instance_id
nevla
resources_service_name
demo-app
resources_telemetry_sdk_language
java
resources_telemetry_sdk_name
opentelemetry
resources_telemetry_sdk_version
1.25.0
severity
INFO
- - -### Metrics - -#### JVM overview metrics - -Use or the Application Observability app - -#### Web Server metrics - -Use Application Observability app - -or manually: - - -- Duration: `(sum by (instance)(rate(http_server_duration_sum{job=~"$job", instance=~"$instance"}[$__rate_interval]))) / -on (instance) -(sum by (instance)(rate(http_server_duration_count{job=~"$job", instance=~"$instance"}[$__rate_interval]))) -` -- Errors: `(sum by (instance)(rate(http_server_duration_count{job=~"$job", instance=~"$instance", http_status_code="500"}[$__rate_interval]))) / on (instance) (sum by (instance)(rate(http_server_duration_count{job=~"$job", instance=~"$instance"}[$__rate_interval])))` - -- Rate: `sum by (instance) (rate(http_server_duration_count{job=~"$job", instance=~"$instance"}[$__rate_interval]))` - - -#### JDBC / HikariCP - -A very useful set of metrics is the current and max. number of connections to detect a draining connection pool - -- max: `db_client_connections_max{pool_name="HikariPool-1"}` -- current: `db_client_connections_usage{pool_name="HikariPool-1", state="used"}` - -For reactive, `r2dbc_pool_acquired_connections{}` seems like a good metric to monitor pool usage. - -#### Kafka client metrics - -There are [many metrics](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/kafka/kafka-clients/kafka-clients-2.6/library/README.md). -Not sure what the best practice is to get a good overview, maybe error rate: `sum(rate(kafka_producer_record_error_total[$__rate_interval]))` - -#### RestTemplate client - -Same metrics as for [http server](README.md#web-server-metrics), just replace `server` by `client`, -e.g. for rate: `sum by (instance) (rate(http_client_duration_count{}[$__rate_interval]))` - -#### MongoDB client - -`mongodb_driver_pool_size{}` seems like a good metric. -(Note that this is a micrometer metric). - -#### Jedis client - -JMX provides good connection pool metrics (e.g. `NumActive`) - and JMX metrics can be turned into -OpenTelemetry metrics as described -[here](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/3d0971b318d523022ea66555cb02f2c5e9607bd2/instrumentation/jmx-metrics/javaagent/README.md#configuration-files). - -![jmx console](doc/jmx.png) - -#### JMS Metrics - -- ActiveMQ: not available -- RabbitMQ: should be available in micrometer - not tested diff --git a/examples/doc/jmx.png b/examples/doc/jmx.png deleted file mode 100644 index 86ad2d1e..00000000 Binary files a/examples/doc/jmx.png and /dev/null differ diff --git a/examples/doc/logs.png b/examples/doc/logs.png deleted file mode 100644 index 11fb58fe..00000000 Binary files a/examples/doc/logs.png and /dev/null differ diff --git a/examples/doc/trace-reactive.png b/examples/doc/trace-reactive.png deleted file mode 100644 index 887646f6..00000000 Binary files a/examples/doc/trace-reactive.png and /dev/null differ diff --git a/examples/doc/trace.png b/examples/doc/trace.png deleted file mode 100644 index c205ef0d..00000000 Binary files a/examples/doc/trace.png and /dev/null differ diff --git a/examples/jdbc/README.md b/examples/jdbc/README.md deleted file mode 100644 index fd5c04bd..00000000 --- a/examples/jdbc/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Overview - -Example projects for database access using JDBC. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). - -## Dashboards - -- [non-reactive](jdbc-dashboard.json) -- [reactive](reactive-jdbc-dashboard.json) diff --git a/examples/jdbc/jdbc-dashboard.json b/examples/jdbc/jdbc-dashboard.json deleted file mode 100644 index fe91db87..00000000 --- a/examples/jdbc/jdbc-dashboard.json +++ /dev/null @@ -1,393 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_GRAFANACLOUD-GREGORZEITLINGER-PROM", - "label": "grafanacloud-gregorzeitlinger-prom", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.0-58063pre" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Dashboard for JDBC metrics with OpenTelemetry instrumentation", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 17582, - "graphTooltip": 0, - "id": null, - "links": [ - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Semantic Conventions: 1.20.0", - "tooltip": "", - "type": "link", - "url": "https://github.com/open-telemetry/semantic-conventions/blob/main/schemas/1.20.0" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "description": "Ratio of currently used to maximum number of allowed connections in the JDBC connection pool.\n\n100% means that all available database connections are in use - and it's likely that there's already a queue of waiting connections.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMax": 1, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 0, - "y": 0 - }, - "id": 38, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "editorMode": "code", - "expr": "sum by (instance, pool_name) (db_client_connections_usage{job=~\"$job\", instance=~\"$instance\", state=\"used\"}) / on (instance, pool_name) \nsum by (instance, pool_name) (db_client_connections_max{job=~\"$job\", instance=~\"$instance\"})", - "legendFormat": "{{instance}} - {{pool_name}}", - "range": true, - "refId": "A" - } - ], - "title": "Connection pool utilization", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "description": "The number of requests that wait for a connection from the pool", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 7, - "y": 0 - }, - "id": 39, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "editorMode": "code", - "expr": "db_client_connections_pending_requests{job=~\"$job\", instance=~\"$instance\"}", - "legendFormat": "{{instance}} - {{pool_name}}", - "range": true, - "refId": "A" - } - ], - "title": "Connection pool waiting requests", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": [ - "JVM", - "open-telemetry", - "Java", - "otel", - "opentelemetry", - "otlp" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "grafanacloud-gregorzeitlinger-prom", - "value": "grafanacloud-prom" - }, - "description": "Choose a Prometheus data source", - "hide": 0, - "includeAll": false, - "label": "Data source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "queryValue": "", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "allValue": ".+", - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "definition": "label_values(process_runtime_jvm_memory_usage,job)", - "hide": 0, - "includeAll": true, - "label": "Job", - "multi": true, - "name": "job", - "options": [], - "query": { - "query": "label_values(process_runtime_jvm_memory_usage,job)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".+", - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "definition": "label_values(process_runtime_jvm_memory_usage{job=~\"$job\"},instance)", - "description": "The instance of the application, e.g. pod1", - "hide": 0, - "includeAll": true, - "label": "Instance", - "multi": true, - "name": "instance", - "options": [], - "query": { - "query": "label_values(process_runtime_jvm_memory_usage{job=~\"$job\"},instance)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "OpenTelemetry JDBC Dashboard", - "uid": "e08362aa-aead-4270-86ac-9be6249b13fa", - "version": 4, - "weekStart": "" -} diff --git a/examples/jdbc/oats-non-reactive-template.yaml b/examples/jdbc/oats-non-reactive-template.yaml deleted file mode 100644 index e38e275a..00000000 --- a/examples/jdbc/oats-non-reactive-template.yaml +++ /dev/null @@ -1,18 +0,0 @@ -docker-compose: - generator: java -input: - - path: /stock -expected: - traces: - - traceql: '{ name =~ "SELECT .*product"}' - spans: - - name: 'regex:SELECT .*' - attributes: - db.system: h2 - dashboards: - - path: ../jdbc-dashboard.json - panels: - - title: Connection pool waiting requests - value: "== 0" - - title: Connection pool utilization - value: ">= 0" diff --git a/examples/jdbc/oats-reactive-template.yaml b/examples/jdbc/oats-reactive-template.yaml deleted file mode 100644 index 3e1aa85e..00000000 --- a/examples/jdbc/oats-reactive-template.yaml +++ /dev/null @@ -1,18 +0,0 @@ -docker-compose: - generator: java -input: - - path: /stock -expected: - traces: - - traceql: '{ name =~ "SELECT .*product"}' - spans: - - name: 'regex:SELECT .*' - attributes: - db.system: h2 - dashboards: - - path: ../reactive-jdbc-dashboard.json - panels: - - title: Connection pool waiting requests # data comes from micrometer - value: "== 0" - - title: Connection pool utilization # data comes from micrometer - value: ">= 0" diff --git a/examples/jdbc/reactive-jdbc-dashboard.json b/examples/jdbc/reactive-jdbc-dashboard.json deleted file mode 100644 index f673a4be..00000000 --- a/examples/jdbc/reactive-jdbc-dashboard.json +++ /dev/null @@ -1,386 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_GRAFANACLOUD-GREGORZEITLINGER-PROM", - "label": "grafanacloud-gregorzeitlinger-prom", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.1.0-58063pre" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Dashboard for JVM metrics with OpenTelemetry instrumentation", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 17582, - "graphTooltip": 0, - "id": null, - "links": [ - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Semantic Conventions: 1.20.0", - "tooltip": "", - "type": "link", - "url": "https://github.com/open-telemetry/semantic-conventions/blob/main/schemas/1.20.0" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "description": "Ratio of currently used to maximum number of allowed connections in the JDBC connection pool.\n\n100% means that all available database connections are in use - and it's likely that there's already a queue of waiting connections.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisSoftMax": 1, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 0, - "y": 0 - }, - "id": 38, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "editorMode": "code", - "expr": "sum by (instance, name) (r2dbc_pool_acquired_connections{job=~\"$job\", instance=~\"$instance\"}) / on (instance, name) \nsum by (instance, name) (r2dbc_pool_max_allocated_connections{job=~\"$job\", instance=~\"$instance\"})", - "legendFormat": "{{instance}} - {{name}}", - "range": true, - "refId": "A" - } - ], - "title": "Connection pool utilization", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "description": "The number of requests that wait for a connection from the pool", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 7, - "y": 0 - }, - "id": 39, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "editorMode": "code", - "expr": "r2dbc_pool_pending_connections{job=~\"$job\", instance=~\"$instance\"}", - "legendFormat": "{{instance}} - {{name}}", - "range": true, - "refId": "A" - } - ], - "title": "Connection pool waiting requests", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "grafanacloud-gregorzeitlinger-prom", - "value": "grafanacloud-prom" - }, - "description": "Choose a Prometheus data source", - "hide": 0, - "includeAll": false, - "label": "Data source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "queryValue": "", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "allValue": ".+", - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "definition": "label_values(process_runtime_jvm_memory_usage,job)", - "hide": 0, - "includeAll": true, - "label": "Job", - "multi": true, - "name": "job", - "options": [], - "query": { - "query": "label_values(process_runtime_jvm_memory_usage,job)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".+", - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "definition": "label_values(process_runtime_jvm_memory_usage{job=~\"$job\"},instance)", - "description": "The instance of the application, e.g. pod1", - "hide": 0, - "includeAll": true, - "label": "Instance", - "multi": true, - "name": "instance", - "options": [], - "query": { - "query": "label_values(process_runtime_jvm_memory_usage{job=~\"$job\"},instance)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "OpenTelemetry JDBC (reactive)", - "uid": "c0cf1745-3a11-4c73-9ad0-c890c6c90c9d", - "version": 2, - "weekStart": "" -} diff --git a/examples/jdbc/spring-boot-non-reactive-2/.tool-versions b/examples/jdbc/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/jdbc/spring-boot-non-reactive-2/build.gradle b/examples/jdbc/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index e7160ce8..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-web' - runtimeOnly 'com.h2database:h2' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jdbc/spring-boot-non-reactive-2/oats.yaml b/examples/jdbc/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 885f2cfb..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-non-reactive-template.yaml diff --git a/examples/jdbc/spring-boot-non-reactive-2/run.sh b/examples/jdbc/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jdbc/spring-boot-non-reactive-2/settings.gradle b/examples/jdbc/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/Product.java b/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/Product.java deleted file mode 100644 index 537f6440..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/Product.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import javax.persistence.Basic; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; - -@Entity -public class Product { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - @Basic(optional = false) - private String name; - - private Double price; - - private String pictureUrl; - - public Product(Long id, String name, Double price, String pictureUrl) { - this.id = id; - this.name = name; - this.price = price; - this.pictureUrl = pictureUrl; - } - - public Product() {} - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Double getPrice() { - return price; - } - - public void setPrice(Double price) { - this.price = price; - } - - public String getPictureUrl() { - return pictureUrl; - } - - public void setPictureUrl(String pictureUrl) { - this.pictureUrl = pictureUrl; - } - - @Override - public String toString() { - return "Product{" + "id=" + id + ", name='" + name + '\'' + ", price=" + price + '}'; - } -} diff --git a/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/ProductJpaRepository.java b/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/ProductJpaRepository.java deleted file mode 100644 index 1180cd22..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/ProductJpaRepository.java +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.repository.CrudRepository; - -public interface ProductJpaRepository extends CrudRepository {} diff --git a/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 6f3e3a5e..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - private final ProductJpaRepository productJpaRepository; - - public StockController(ProductJpaRepository productJpaRepository) { - this.productJpaRepository = productJpaRepository; - } - - @GetMapping("/stock") - public String getStock() { - return "product found: " + productJpaRepository.findById(1L); - } -} diff --git a/examples/jdbc/spring-boot-non-reactive-2/src/main/resources/application.properties b/examples/jdbc/spring-boot-non-reactive-2/src/main/resources/application.properties deleted file mode 100644 index 17566b15..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/src/main/resources/application.properties +++ /dev/null @@ -1,6 +0,0 @@ -spring.datasource.username=sa -spring.datasource.password=password -spring.jpa.database-platform=org.hibernate.dialect.H2Dialect - -spring.r2dbc.url=r2dbc:h2:mem:///testdb -spring.jpa.hibernate.ddl-auto=create diff --git a/examples/jdbc/spring-boot-non-reactive-2/src/main/resources/schema.sql b/examples/jdbc/spring-boot-non-reactive-2/src/main/resources/schema.sql deleted file mode 100644 index f3fae612..00000000 --- a/examples/jdbc/spring-boot-non-reactive-2/src/main/resources/schema.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS product (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255), PRIMARY KEY (id)); diff --git a/examples/jdbc/spring-boot-non-reactive-3/.tool-versions b/examples/jdbc/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/jdbc/spring-boot-non-reactive-3/build.gradle b/examples/jdbc/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index fc4f36bc..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-web' - runtimeOnly 'com.h2database:h2' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jdbc/spring-boot-non-reactive-3/oats.yaml b/examples/jdbc/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 885f2cfb..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-non-reactive-template.yaml diff --git a/examples/jdbc/spring-boot-non-reactive-3/run.sh b/examples/jdbc/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jdbc/spring-boot-non-reactive-3/settings.gradle b/examples/jdbc/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/Product.java b/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/Product.java deleted file mode 100644 index 52f29564..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/Product.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import jakarta.persistence.Basic; -import jakarta.persistence.Entity; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.GenerationType; -import jakarta.persistence.Id; - -@Entity -public class Product { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; - - @Basic(optional = false) - private String name; - - private Double price; - - private String pictureUrl; - - public Product(Long id, String name, Double price, String pictureUrl) { - this.id = id; - this.name = name; - this.price = price; - this.pictureUrl = pictureUrl; - } - - public Product() {} - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Double getPrice() { - return price; - } - - public void setPrice(Double price) { - this.price = price; - } - - public String getPictureUrl() { - return pictureUrl; - } - - public void setPictureUrl(String pictureUrl) { - this.pictureUrl = pictureUrl; - } - - @Override - public String toString() { - return "Product{" + "id=" + id + ", name='" + name + '\'' + ", price=" + price + '}'; - } -} diff --git a/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/ProductJpaRepository.java b/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/ProductJpaRepository.java deleted file mode 100644 index 1180cd22..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/ProductJpaRepository.java +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.repository.CrudRepository; - -public interface ProductJpaRepository extends CrudRepository {} diff --git a/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 6f3e3a5e..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - private final ProductJpaRepository productJpaRepository; - - public StockController(ProductJpaRepository productJpaRepository) { - this.productJpaRepository = productJpaRepository; - } - - @GetMapping("/stock") - public String getStock() { - return "product found: " + productJpaRepository.findById(1L); - } -} diff --git a/examples/jdbc/spring-boot-non-reactive-3/src/main/resources/application.properties b/examples/jdbc/spring-boot-non-reactive-3/src/main/resources/application.properties deleted file mode 100644 index 17566b15..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/src/main/resources/application.properties +++ /dev/null @@ -1,6 +0,0 @@ -spring.datasource.username=sa -spring.datasource.password=password -spring.jpa.database-platform=org.hibernate.dialect.H2Dialect - -spring.r2dbc.url=r2dbc:h2:mem:///testdb -spring.jpa.hibernate.ddl-auto=create diff --git a/examples/jdbc/spring-boot-non-reactive-3/src/main/resources/schema.sql b/examples/jdbc/spring-boot-non-reactive-3/src/main/resources/schema.sql deleted file mode 100644 index f3fae612..00000000 --- a/examples/jdbc/spring-boot-non-reactive-3/src/main/resources/schema.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS product (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255), PRIMARY KEY (id)); diff --git a/examples/jdbc/spring-boot-reactive-2/.tool-versions b/examples/jdbc/spring-boot-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/jdbc/spring-boot-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/jdbc/spring-boot-reactive-2/build.gradle b/examples/jdbc/spring-boot-reactive-2/build.gradle deleted file mode 100644 index afb1f0ec..00000000 --- a/examples/jdbc/spring-boot-reactive-2/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - runtimeOnly 'com.h2database:h2' - runtimeOnly 'io.r2dbc:r2dbc-h2' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jdbc/spring-boot-reactive-2/oats.yaml b/examples/jdbc/spring-boot-reactive-2/oats.yaml deleted file mode 100644 index 578d4faf..00000000 --- a/examples/jdbc/spring-boot-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-reactive-template.yaml diff --git a/examples/jdbc/spring-boot-reactive-2/run.sh b/examples/jdbc/spring-boot-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jdbc/spring-boot-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jdbc/spring-boot-reactive-2/settings.gradle b/examples/jdbc/spring-boot-reactive-2/settings.gradle deleted file mode 100644 index 186841af..00000000 --- a/examples/jdbc/spring-boot-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-2' diff --git a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/JdbcConfig.java b/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/JdbcConfig.java deleted file mode 100644 index dfb140e3..00000000 --- a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/JdbcConfig.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import io.r2dbc.spi.ConnectionFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.io.ClassPathResource; -import org.springframework.r2dbc.connection.init.ConnectionFactoryInitializer; -import org.springframework.r2dbc.connection.init.ResourceDatabasePopulator; - -@Configuration -public class JdbcConfig { - @Bean - ConnectionFactoryInitializer initializer(ConnectionFactory connectionFactory) { - - ConnectionFactoryInitializer initializer = new ConnectionFactoryInitializer(); - initializer.setConnectionFactory(connectionFactory); - initializer.setDatabasePopulator( - new ResourceDatabasePopulator(new ClassPathResource("schema.sql"))); - - return initializer; - } -} diff --git a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/Product.java b/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/Product.java deleted file mode 100644 index 7921b49f..00000000 --- a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/Product.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import javax.persistence.*; -import org.springframework.data.relational.core.mapping.Table; - -@Entity -@Table("product") -public class Product { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @org.springframework.data.annotation.Id - private Long id; - - @Basic(optional = false) - private String name; - - public Product(Long id, String name) { - this.id = id; - this.name = name; - } - - public Product() {} - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "Product{" + "id=" + id + ", name='" + name + '\'' + '}'; - } -} diff --git a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/ProductJpaRepository.java b/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/ProductJpaRepository.java deleted file mode 100644 index a5734a8e..00000000 --- a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/ProductJpaRepository.java +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.repository.reactive.ReactiveCrudRepository; - -public interface ProductJpaRepository extends ReactiveCrudRepository {} diff --git a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 3577aa35..00000000 --- a/examples/jdbc/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - private final ProductJpaRepository productJpaRepository; - - public StockController(ProductJpaRepository productJpaRepository) { - this.productJpaRepository = productJpaRepository; - } - - @GetMapping("/stock") - public Mono getStock() { - return productJpaRepository.findById(1L).map(Product::getName); - } -} diff --git a/examples/jdbc/spring-boot-reactive-2/src/main/resources/application.properties b/examples/jdbc/spring-boot-reactive-2/src/main/resources/application.properties deleted file mode 100644 index 17566b15..00000000 --- a/examples/jdbc/spring-boot-reactive-2/src/main/resources/application.properties +++ /dev/null @@ -1,6 +0,0 @@ -spring.datasource.username=sa -spring.datasource.password=password -spring.jpa.database-platform=org.hibernate.dialect.H2Dialect - -spring.r2dbc.url=r2dbc:h2:mem:///testdb -spring.jpa.hibernate.ddl-auto=create diff --git a/examples/jdbc/spring-boot-reactive-2/src/main/resources/schema.sql b/examples/jdbc/spring-boot-reactive-2/src/main/resources/schema.sql deleted file mode 100644 index f3fae612..00000000 --- a/examples/jdbc/spring-boot-reactive-2/src/main/resources/schema.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS product (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255), PRIMARY KEY (id)); diff --git a/examples/jdbc/spring-boot-reactive-3/.tool-versions b/examples/jdbc/spring-boot-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/jdbc/spring-boot-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/jdbc/spring-boot-reactive-3/build.gradle b/examples/jdbc/spring-boot-reactive-3/build.gradle deleted file mode 100644 index 31954248..00000000 --- a/examples/jdbc/spring-boot-reactive-3/build.gradle +++ /dev/null @@ -1,32 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - runtimeOnly 'com.h2database:h2' - runtimeOnly 'io.r2dbc:r2dbc-h2' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jdbc/spring-boot-reactive-3/oats.yaml b/examples/jdbc/spring-boot-reactive-3/oats.yaml deleted file mode 100644 index 578d4faf..00000000 --- a/examples/jdbc/spring-boot-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-reactive-template.yaml diff --git a/examples/jdbc/spring-boot-reactive-3/run.sh b/examples/jdbc/spring-boot-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jdbc/spring-boot-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jdbc/spring-boot-reactive-3/settings.gradle b/examples/jdbc/spring-boot-reactive-3/settings.gradle deleted file mode 100644 index 2bfc2706..00000000 --- a/examples/jdbc/spring-boot-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-3' diff --git a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/JdbcConfig.java b/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/JdbcConfig.java deleted file mode 100644 index dfb140e3..00000000 --- a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/JdbcConfig.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import io.r2dbc.spi.ConnectionFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.io.ClassPathResource; -import org.springframework.r2dbc.connection.init.ConnectionFactoryInitializer; -import org.springframework.r2dbc.connection.init.ResourceDatabasePopulator; - -@Configuration -public class JdbcConfig { - @Bean - ConnectionFactoryInitializer initializer(ConnectionFactory connectionFactory) { - - ConnectionFactoryInitializer initializer = new ConnectionFactoryInitializer(); - initializer.setConnectionFactory(connectionFactory); - initializer.setDatabasePopulator( - new ResourceDatabasePopulator(new ClassPathResource("schema.sql"))); - - return initializer; - } -} diff --git a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/Product.java b/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/Product.java deleted file mode 100644 index 6f900842..00000000 --- a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/Product.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import jakarta.persistence.Basic; -import jakarta.persistence.Entity; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.GenerationType; -import jakarta.persistence.Id; -import org.springframework.data.relational.core.mapping.Table; - -@Entity -@Table("product") -public class Product { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @org.springframework.data.annotation.Id - private Long id; - - @Basic(optional = false) - private String name; - - public Product(Long id, String name) { - this.id = id; - this.name = name; - } - - public Product() {} - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "Product{" + "id=" + id + ", name='" + name + '\'' + '}'; - } -} diff --git a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/ProductJpaRepository.java b/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/ProductJpaRepository.java deleted file mode 100644 index a5734a8e..00000000 --- a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/ProductJpaRepository.java +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.repository.reactive.ReactiveCrudRepository; - -public interface ProductJpaRepository extends ReactiveCrudRepository {} diff --git a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 3577aa35..00000000 --- a/examples/jdbc/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - private final ProductJpaRepository productJpaRepository; - - public StockController(ProductJpaRepository productJpaRepository) { - this.productJpaRepository = productJpaRepository; - } - - @GetMapping("/stock") - public Mono getStock() { - return productJpaRepository.findById(1L).map(Product::getName); - } -} diff --git a/examples/jdbc/spring-boot-reactive-3/src/main/resources/application.properties b/examples/jdbc/spring-boot-reactive-3/src/main/resources/application.properties deleted file mode 100644 index 17566b15..00000000 --- a/examples/jdbc/spring-boot-reactive-3/src/main/resources/application.properties +++ /dev/null @@ -1,6 +0,0 @@ -spring.datasource.username=sa -spring.datasource.password=password -spring.jpa.database-platform=org.hibernate.dialect.H2Dialect - -spring.r2dbc.url=r2dbc:h2:mem:///testdb -spring.jpa.hibernate.ddl-auto=create diff --git a/examples/jdbc/spring-boot-reactive-3/src/main/resources/schema.sql b/examples/jdbc/spring-boot-reactive-3/src/main/resources/schema.sql deleted file mode 100644 index f3fae612..00000000 --- a/examples/jdbc/spring-boot-reactive-3/src/main/resources/schema.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS product (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(255), PRIMARY KEY (id)); diff --git a/examples/jetty/README.md b/examples/jetty/README.md deleted file mode 100644 index ffc6f2fa..00000000 --- a/examples/jetty/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Overview - -Example projects for using Jetty instead of Tomcat. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). diff --git a/examples/jetty/oats-template.yaml b/examples/jetty/oats-template.yaml deleted file mode 100644 index b83b6cd6..00000000 --- a/examples/jetty/oats-template.yaml +++ /dev/null @@ -1,11 +0,0 @@ -docker-compose: - generator: java -input: - - path: /stock -expected: - traces: - - traceql: '{ kind = server }' - spans: - - name: 'GET /stock' - attributes: - otel.library.name: regex:io.opentelemetry.jetty-.* diff --git a/examples/jetty/spring-boot-non-reactive-2/.tool-versions b/examples/jetty/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/jetty/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/jetty/spring-boot-non-reactive-2/build.gradle b/examples/jetty/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index 98db5cd7..00000000 --- a/examples/jetty/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation "org.springframework.boot:spring-boot-starter-jetty" -} - -configurations { - all*.exclude module: 'spring-boot-starter-tomcat' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jetty/spring-boot-non-reactive-2/oats.yaml b/examples/jetty/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/jetty/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/jetty/spring-boot-non-reactive-2/run.sh b/examples/jetty/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jetty/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jetty/spring-boot-non-reactive-2/settings.gradle b/examples/jetty/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/jetty/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/jetty/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jetty/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jetty/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jetty/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/jetty/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index b13dcda1..00000000 --- a/examples/jetty/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - @GetMapping("/stock") - public String getStock() { - return "hello LGTM"; - } -} diff --git a/examples/jetty/spring-boot-non-reactive-3/.tool-versions b/examples/jetty/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/jetty/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/jetty/spring-boot-non-reactive-3/build.gradle b/examples/jetty/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index 1ebc24b7..00000000 --- a/examples/jetty/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation "org.springframework.boot:spring-boot-starter-jetty" -} - -configurations { - all*.exclude module: 'spring-boot-starter-tomcat' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jetty/spring-boot-non-reactive-3/oats.yaml b/examples/jetty/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/jetty/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/jetty/spring-boot-non-reactive-3/run.sh b/examples/jetty/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jetty/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jetty/spring-boot-non-reactive-3/settings.gradle b/examples/jetty/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/jetty/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/jetty/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jetty/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jetty/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jetty/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/jetty/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 0be1547d..00000000 --- a/examples/jetty/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - @GetMapping("/stock") - public String getStock() { - return "hello LGTM"; - } -} diff --git a/examples/jetty/spring-boot-reactive-2/.tool-versions b/examples/jetty/spring-boot-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/jetty/spring-boot-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/jetty/spring-boot-reactive-2/build.gradle b/examples/jetty/spring-boot-reactive-2/build.gradle deleted file mode 100644 index fadf3d15..00000000 --- a/examples/jetty/spring-boot-reactive-2/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation "org.springframework.boot:spring-boot-starter-jetty" -} - -configurations { - all*.exclude module: 'spring-boot-starter-tomcat' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jetty/spring-boot-reactive-2/oats.yaml b/examples/jetty/spring-boot-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/jetty/spring-boot-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/jetty/spring-boot-reactive-2/run.sh b/examples/jetty/spring-boot-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jetty/spring-boot-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jetty/spring-boot-reactive-2/settings.gradle b/examples/jetty/spring-boot-reactive-2/settings.gradle deleted file mode 100644 index 186841af..00000000 --- a/examples/jetty/spring-boot-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-2' diff --git a/examples/jetty/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jetty/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jetty/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jetty/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/jetty/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 404a3dc4..00000000 --- a/examples/jetty/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - @GetMapping("/stock") - public Mono getStock() { - return Mono.just("hello LGTM"); - } -} diff --git a/examples/jetty/spring-boot-reactive-3/.tool-versions b/examples/jetty/spring-boot-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/jetty/spring-boot-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/jetty/spring-boot-reactive-3/build.gradle b/examples/jetty/spring-boot-reactive-3/build.gradle deleted file mode 100644 index a37b9377..00000000 --- a/examples/jetty/spring-boot-reactive-3/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation "org.springframework.boot:spring-boot-starter-jetty" -} - -configurations { - all*.exclude module: 'spring-boot-starter-tomcat' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jetty/spring-boot-reactive-3/oats.yaml b/examples/jetty/spring-boot-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/jetty/spring-boot-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/jetty/spring-boot-reactive-3/run.sh b/examples/jetty/spring-boot-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jetty/spring-boot-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jetty/spring-boot-reactive-3/settings.gradle b/examples/jetty/spring-boot-reactive-3/settings.gradle deleted file mode 100644 index 2bfc2706..00000000 --- a/examples/jetty/spring-boot-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-3' diff --git a/examples/jetty/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jetty/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jetty/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jetty/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/jetty/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 404a3dc4..00000000 --- a/examples/jetty/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - @GetMapping("/stock") - public Mono getStock() { - return Mono.just("hello LGTM"); - } -} diff --git a/examples/jms/README.md b/examples/jms/README.md deleted file mode 100644 index 170f97ee..00000000 --- a/examples/jms/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Overview - -Example projects for message sending via JMS. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). diff --git a/examples/jms/activemq.xml b/examples/jms/activemq.xml deleted file mode 100644 index 071f045e..00000000 --- a/examples/jms/activemq.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - file:${activemq.conf}/credentials.properties - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/jms/docker-compose.yaml b/examples/jms/docker-compose.yaml deleted file mode 100644 index 7b5e7cd4..00000000 --- a/examples/jms/docker-compose.yaml +++ /dev/null @@ -1,13 +0,0 @@ -version: '3.9' - -services: - activemq: - image: rmohr/activemq:5.15.9 - environment: - - "TZ=Europe/Amsterdam" - volumes: - - "./activemq.xml:/conf/activemq.xml" -# ports: -# - "61616:61616" # broker (admin:adminactivemq)(amq:amq) -# - "8161:8161" # web http://boot2docker:8161/admin (admin:admin) - diff --git a/examples/jms/oats-template.yaml b/examples/jms/oats-template.yaml deleted file mode 100644 index c36c6d8a..00000000 --- a/examples/jms/oats-template.yaml +++ /dev/null @@ -1,15 +0,0 @@ -docker-compose: - generator: java - files: - - ../docker-compose.yaml - resources: - - activemq.xml -input: - - path: /stock -expected: - traces: - - traceql: '{ name = "jms_destination publish"}' - spans: - - name: 'jms_destination publish' - attributes: - messaging.system: jms diff --git a/examples/jms/spring-boot-non-reactive-2/.tool-versions b/examples/jms/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/jms/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/jms/spring-boot-non-reactive-2/build.gradle b/examples/jms/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index 6298663a..00000000 --- a/examples/jms/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-activemq' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jms/spring-boot-non-reactive-2/oats.yaml b/examples/jms/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/jms/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/jms/spring-boot-non-reactive-2/run.sh b/examples/jms/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jms/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jms/spring-boot-non-reactive-2/settings.gradle b/examples/jms/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/jms/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/JmsConfig.java b/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/JmsConfig.java deleted file mode 100644 index 13695f08..00000000 --- a/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/JmsConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import javax.jms.ConnectionFactory; -import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.jms.annotation.EnableJms; -import org.springframework.jms.config.DefaultJmsListenerContainerFactory; -import org.springframework.jms.config.JmsListenerContainerFactory; -import org.springframework.jms.support.converter.MappingJackson2MessageConverter; -import org.springframework.jms.support.converter.MessageConverter; -import org.springframework.jms.support.converter.MessageType; - -@Configuration -@EnableJms -public class JmsConfig { - - @Bean - public JmsListenerContainerFactory myFactory( - ConnectionFactory connectionFactory, - DefaultJmsListenerContainerFactoryConfigurer configurer) { - DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); - configurer.configure(factory, connectionFactory); - return factory; - } - - @Bean - public MessageConverter jacksonJmsMessageConverter() { - MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter(); - converter.setTargetType(MessageType.TEXT); - converter.setTypeIdPropertyName("_type"); - return converter; - } -} diff --git a/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/Product.java b/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/Product.java deleted file mode 100644 index 52048a03..00000000 --- a/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/Product.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -public class Product { - - private Long id; - - private String name; - - public Product(Long id, String name) { - this.id = id; - this.name = name; - } - - public Product() {} - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "Product{" + "id=" + id + ", name='" + name + '\'' + '}'; - } -} diff --git a/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 16936341..00000000 --- a/examples/jms/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.jms.core.JmsTemplate; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final JmsTemplate jmsTemplate; - - public StockController(JmsTemplate jmsTemplate) { - this.jmsTemplate = jmsTemplate; - } - - @GetMapping("/stock") - public String getStock() { - jmsTemplate.convertAndSend("jms_destination", new Product()); - return "Stock sent"; - } -} diff --git a/examples/jms/spring-boot-non-reactive-2/src/main/resources/application.yaml b/examples/jms/spring-boot-non-reactive-2/src/main/resources/application.yaml deleted file mode 100644 index 3c6d50a7..00000000 --- a/examples/jms/spring-boot-non-reactive-2/src/main/resources/application.yaml +++ /dev/null @@ -1,3 +0,0 @@ -spring: - activemq: - broker-url: tcp://activemq:61616 diff --git a/examples/jms/spring-boot-non-reactive-3/.tool-versions b/examples/jms/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/jms/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/jms/spring-boot-non-reactive-3/build.gradle b/examples/jms/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index 9f93e810..00000000 --- a/examples/jms/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-activemq' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jms/spring-boot-non-reactive-3/oats.yaml b/examples/jms/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/jms/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/jms/spring-boot-non-reactive-3/run.sh b/examples/jms/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jms/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jms/spring-boot-non-reactive-3/settings.gradle b/examples/jms/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/jms/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/JmsConfig.java b/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/JmsConfig.java deleted file mode 100644 index 5ca04c15..00000000 --- a/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/JmsConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import jakarta.jms.ConnectionFactory; -import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.jms.annotation.EnableJms; -import org.springframework.jms.config.DefaultJmsListenerContainerFactory; -import org.springframework.jms.config.JmsListenerContainerFactory; -import org.springframework.jms.support.converter.MappingJackson2MessageConverter; -import org.springframework.jms.support.converter.MessageConverter; -import org.springframework.jms.support.converter.MessageType; - -@Configuration -@EnableJms -public class JmsConfig { - - @Bean - public JmsListenerContainerFactory myFactory( - ConnectionFactory connectionFactory, - DefaultJmsListenerContainerFactoryConfigurer configurer) { - DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); - configurer.configure(factory, connectionFactory); - return factory; - } - - @Bean - public MessageConverter jacksonJmsMessageConverter() { - MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter(); - converter.setTargetType(MessageType.TEXT); - converter.setTypeIdPropertyName("_type"); - return converter; - } -} diff --git a/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/Product.java b/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/Product.java deleted file mode 100644 index 52048a03..00000000 --- a/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/Product.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -public class Product { - - private Long id; - - private String name; - - public Product(Long id, String name) { - this.id = id; - this.name = name; - } - - public Product() {} - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "Product{" + "id=" + id + ", name='" + name + '\'' + '}'; - } -} diff --git a/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 2e1cd044..00000000 --- a/examples/jms/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.jms.core.JmsTemplate; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final JmsTemplate jmsTemplate; - - public StockController(JmsTemplate jmsTemplate) { - this.jmsTemplate = jmsTemplate; - } - - @GetMapping("/stock") - public String getStock() { - jmsTemplate.convertAndSend("jms_destination", new Product()); - return "Stock updated"; - } -} diff --git a/examples/jms/spring-boot-non-reactive-3/src/main/resources/application.yaml b/examples/jms/spring-boot-non-reactive-3/src/main/resources/application.yaml deleted file mode 100644 index 3c6d50a7..00000000 --- a/examples/jms/spring-boot-non-reactive-3/src/main/resources/application.yaml +++ /dev/null @@ -1,3 +0,0 @@ -spring: - activemq: - broker-url: tcp://activemq:61616 diff --git a/examples/jms/spring-boot-reactive-2/.tool-versions b/examples/jms/spring-boot-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/jms/spring-boot-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/jms/spring-boot-reactive-2/build.gradle b/examples/jms/spring-boot-reactive-2/build.gradle deleted file mode 100644 index b39d8593..00000000 --- a/examples/jms/spring-boot-reactive-2/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-activemq' - implementation 'org.springframework.boot:spring-boot-starter-webflux' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jms/spring-boot-reactive-2/oats.yaml b/examples/jms/spring-boot-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/jms/spring-boot-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/jms/spring-boot-reactive-2/run.sh b/examples/jms/spring-boot-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jms/spring-boot-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jms/spring-boot-reactive-2/settings.gradle b/examples/jms/spring-boot-reactive-2/settings.gradle deleted file mode 100644 index 186841af..00000000 --- a/examples/jms/spring-boot-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-2' diff --git a/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/JmsConfig.java b/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/JmsConfig.java deleted file mode 100644 index 13695f08..00000000 --- a/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/JmsConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import javax.jms.ConnectionFactory; -import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.jms.annotation.EnableJms; -import org.springframework.jms.config.DefaultJmsListenerContainerFactory; -import org.springframework.jms.config.JmsListenerContainerFactory; -import org.springframework.jms.support.converter.MappingJackson2MessageConverter; -import org.springframework.jms.support.converter.MessageConverter; -import org.springframework.jms.support.converter.MessageType; - -@Configuration -@EnableJms -public class JmsConfig { - - @Bean - public JmsListenerContainerFactory myFactory( - ConnectionFactory connectionFactory, - DefaultJmsListenerContainerFactoryConfigurer configurer) { - DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); - configurer.configure(factory, connectionFactory); - return factory; - } - - @Bean - public MessageConverter jacksonJmsMessageConverter() { - MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter(); - converter.setTargetType(MessageType.TEXT); - converter.setTypeIdPropertyName("_type"); - return converter; - } -} diff --git a/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/Product.java b/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/Product.java deleted file mode 100644 index 52048a03..00000000 --- a/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/Product.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -public class Product { - - private Long id; - - private String name; - - public Product(Long id, String name) { - this.id = id; - this.name = name; - } - - public Product() {} - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "Product{" + "id=" + id + ", name='" + name + '\'' + '}'; - } -} diff --git a/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 1407ef9e..00000000 --- a/examples/jms/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.jms.core.JmsTemplate; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - - private final JmsTemplate jmsTemplate; - - public StockController(JmsTemplate jmsTemplate) { - this.jmsTemplate = jmsTemplate; - } - - @GetMapping("/stock") - public Mono getStock() { - jmsTemplate.convertAndSend("jms_destination", new Product()); - return Mono.just("Stock updated"); - } -} diff --git a/examples/jms/spring-boot-reactive-2/src/main/resources/application.yaml b/examples/jms/spring-boot-reactive-2/src/main/resources/application.yaml deleted file mode 100644 index 3c6d50a7..00000000 --- a/examples/jms/spring-boot-reactive-2/src/main/resources/application.yaml +++ /dev/null @@ -1,3 +0,0 @@ -spring: - activemq: - broker-url: tcp://activemq:61616 diff --git a/examples/jms/spring-boot-reactive-3/.tool-versions b/examples/jms/spring-boot-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/jms/spring-boot-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/jms/spring-boot-reactive-3/build.gradle b/examples/jms/spring-boot-reactive-3/build.gradle deleted file mode 100644 index 92f73c6c..00000000 --- a/examples/jms/spring-boot-reactive-3/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-activemq' - implementation 'org.springframework.boot:spring-boot-starter-webflux' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/jms/spring-boot-reactive-3/oats.yaml b/examples/jms/spring-boot-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/jms/spring-boot-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/jms/spring-boot-reactive-3/run.sh b/examples/jms/spring-boot-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/jms/spring-boot-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/jms/spring-boot-reactive-3/settings.gradle b/examples/jms/spring-boot-reactive-3/settings.gradle deleted file mode 100644 index 2bfc2706..00000000 --- a/examples/jms/spring-boot-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-3' diff --git a/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/JmsConfig.java b/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/JmsConfig.java deleted file mode 100644 index 5ca04c15..00000000 --- a/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/JmsConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import jakarta.jms.ConnectionFactory; -import org.springframework.boot.autoconfigure.jms.DefaultJmsListenerContainerFactoryConfigurer; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.jms.annotation.EnableJms; -import org.springframework.jms.config.DefaultJmsListenerContainerFactory; -import org.springframework.jms.config.JmsListenerContainerFactory; -import org.springframework.jms.support.converter.MappingJackson2MessageConverter; -import org.springframework.jms.support.converter.MessageConverter; -import org.springframework.jms.support.converter.MessageType; - -@Configuration -@EnableJms -public class JmsConfig { - - @Bean - public JmsListenerContainerFactory myFactory( - ConnectionFactory connectionFactory, - DefaultJmsListenerContainerFactoryConfigurer configurer) { - DefaultJmsListenerContainerFactory factory = new DefaultJmsListenerContainerFactory(); - configurer.configure(factory, connectionFactory); - return factory; - } - - @Bean - public MessageConverter jacksonJmsMessageConverter() { - MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter(); - converter.setTargetType(MessageType.TEXT); - converter.setTypeIdPropertyName("_type"); - return converter; - } -} diff --git a/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/Product.java b/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/Product.java deleted file mode 100644 index 52048a03..00000000 --- a/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/Product.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -public class Product { - - private Long id; - - private String name; - - public Product(Long id, String name) { - this.id = id; - this.name = name; - } - - public Product() {} - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - return "Product{" + "id=" + id + ", name='" + name + '\'' + '}'; - } -} diff --git a/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 1407ef9e..00000000 --- a/examples/jms/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.jms.core.JmsTemplate; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - - private final JmsTemplate jmsTemplate; - - public StockController(JmsTemplate jmsTemplate) { - this.jmsTemplate = jmsTemplate; - } - - @GetMapping("/stock") - public Mono getStock() { - jmsTemplate.convertAndSend("jms_destination", new Product()); - return Mono.just("Stock updated"); - } -} diff --git a/examples/jms/spring-boot-reactive-3/src/main/resources/application.yaml b/examples/jms/spring-boot-reactive-3/src/main/resources/application.yaml deleted file mode 100644 index 3c6d50a7..00000000 --- a/examples/jms/spring-boot-reactive-3/src/main/resources/application.yaml +++ /dev/null @@ -1,3 +0,0 @@ -spring: - activemq: - broker-url: tcp://activemq:61616 diff --git a/examples/kafka/README.md b/examples/kafka/README.md deleted file mode 100644 index 88a560b4..00000000 --- a/examples/kafka/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Overview - -Example projects for Kafka clients. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). diff --git a/examples/kafka/docker-compose.yaml b/examples/kafka/docker-compose.yaml deleted file mode 100644 index dcfe95c1..00000000 --- a/examples/kafka/docker-compose.yaml +++ /dev/null @@ -1,37 +0,0 @@ -version: '3.9' - -x-default-logging: &logging - driver: "json-file" - options: - max-size: "5m" - max-file: "2" - -services: - kafka: - image: grafana-otel-java:0.1-kafka - build: - context: ./ - dockerfile: ./kafka/Dockerfile - cache_from: - - grafana-otel-java:0.1-kafka - deploy: - resources: - limits: - memory: 500M - restart: unless-stopped - environment: - - KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092 - - OTEL_EXPORTER_OTLP_ENDPOINT - - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - - OTEL_RESOURCE_ATTRIBUTES - - OTEL_SERVICE_NAME=kafka - - KAFKA_HEAP_OPTS=-Xmx200m -Xms200m - healthcheck: - test: nc -z kafka 9092 - start_period: 10s - interval: 5s - timeout: 10s - retries: 10 - logging: *logging -# ports: -# - "9092:9092" diff --git a/examples/kafka/kafka/Dockerfile b/examples/kafka/kafka/Dockerfile deleted file mode 100644 index ce8e8273..00000000 --- a/examples/kafka/kafka/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - - -FROM confluentinc/cp-kafka:latest-ubi8 - -USER root -ARG version=1.23.0 -ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$version/opentelemetry-javaagent.jar /tmp/opentelemetry-javaagent.jar -RUN chmod go+r /tmp/opentelemetry-javaagent.jar - -USER appuser - -ENV KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093 -ENV KAFKA_CONTROLLER_QUORUM_VOTERS='1@0.0.0.0:9093' -ENV KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER -ENV KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT -ENV KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS=0 -ENV KAFKA_PROCESS_ROLES=controller,broker -ENV KAFKA_NODE_ID=1 -ENV KAFKA_METADATA_LOG_SEGMENT_MS=15000 -ENV KAFKA_METADATA_MAX_RETENTION_MS=60000 -ENV KAFKA_METADATA_LOG_MAX_RECORD_BYTES_BETWEEN_SNAPSHOTS=2800 -ENV KAFKA_AUTO_CREATE_TOPICS_ENABLE=true -ENV KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 -ENV KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR=1 -ENV KAFKA_OPTS="-javaagent:/tmp/opentelemetry-javaagent.jar -Dotel.jmx.target.system=kafka-broker" -ENV CLUSTER_ID=ckjPoprWQzOf0-FuNkGfFQ diff --git a/examples/kafka/kafka/README.md b/examples/kafka/kafka/README.md deleted file mode 100644 index 15d3d67d..00000000 --- a/examples/kafka/kafka/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Kafka - -This is used as a message queue service to connect the checkout service with -the accounting and fraud detection services. - -Kafka is run in KRaft mode. Environment variables are substituted at -deploy-time. diff --git a/examples/kafka/oats-template.yaml b/examples/kafka/oats-template.yaml deleted file mode 100644 index 54327143..00000000 --- a/examples/kafka/oats-template.yaml +++ /dev/null @@ -1,19 +0,0 @@ -docker-compose: - generator: java - files: - - ../docker-compose.yaml - resources: - - kafka -input: - - path: /stock -expected: - traces: - - traceql: '{ name = "kafkaTopic publish"}' - spans: - - name: 'kafkaTopic publish' - attributes: - messaging.system: kafka - metrics: - # this isn't better than using the error rate of the client spans - but maybe this is exactly enough - - promql: 'sum(rate(kafka_producer_record_error_total[5m]))' - value: "== 0" diff --git a/examples/kafka/spring-boot-non-reactive-2/.tool-versions b/examples/kafka/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/kafka/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/kafka/spring-boot-non-reactive-2/build.gradle b/examples/kafka/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index f75110ce..00000000 --- a/examples/kafka/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.kafka:spring-kafka' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/kafka/spring-boot-non-reactive-2/oats.yaml b/examples/kafka/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/kafka/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/kafka/spring-boot-non-reactive-2/run.sh b/examples/kafka/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/kafka/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/kafka/spring-boot-non-reactive-2/settings.gradle b/examples/kafka/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/kafka/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/kafka/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/KafkaConfig.java b/examples/kafka/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/KafkaConfig.java deleted file mode 100644 index f7cfc14b..00000000 --- a/examples/kafka/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/KafkaConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.apache.kafka.clients.admin.NewTopic; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.kafka.config.TopicBuilder; - -@Configuration -public class KafkaConfig { - - @Bean - public NewTopic topic() { - return TopicBuilder.name("kafkaTopic").partitions(1).replicas(1).build(); - } -} diff --git a/examples/kafka/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/kafka/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/kafka/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/kafka/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/kafka/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 1bf7ec98..00000000 --- a/examples/kafka/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.kafka.core.KafkaTemplate; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final KafkaTemplate kafkaTemplate; - - public StockController(KafkaTemplate kafkaTemplate) { - this.kafkaTemplate = kafkaTemplate; - } - - @GetMapping("/stock") - public String getStock() { - kafkaTemplate.send("kafkaTopic", "test"); - return "Stock updated"; - } -} diff --git a/examples/kafka/spring-boot-non-reactive-2/src/main/resources/application.yaml b/examples/kafka/spring-boot-non-reactive-2/src/main/resources/application.yaml deleted file mode 100644 index 11c060d2..00000000 --- a/examples/kafka/spring-boot-non-reactive-2/src/main/resources/application.yaml +++ /dev/null @@ -1,6 +0,0 @@ -spring: - kafka: - bootstrap-servers: kafka:9092 - producer: - bootstrap-servers: kafka:9092 - diff --git a/examples/kafka/spring-boot-non-reactive-3/.tool-versions b/examples/kafka/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/kafka/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/kafka/spring-boot-non-reactive-3/build.gradle b/examples/kafka/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index 3c1e3ad4..00000000 --- a/examples/kafka/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.kafka:spring-kafka' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/kafka/spring-boot-non-reactive-3/oats.yaml b/examples/kafka/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/kafka/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/kafka/spring-boot-non-reactive-3/run.sh b/examples/kafka/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/kafka/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/kafka/spring-boot-non-reactive-3/settings.gradle b/examples/kafka/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/kafka/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/kafka/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/KafkaConfig.java b/examples/kafka/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/KafkaConfig.java deleted file mode 100644 index b6204dcb..00000000 --- a/examples/kafka/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/KafkaConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.apache.kafka.clients.admin.NewTopic; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.kafka.config.TopicBuilder; - -@Configuration -public class KafkaConfig { - - @Bean - public NewTopic topic() { - return TopicBuilder.name("kafkaTopic").partitions(10).replicas(1).build(); - } -} diff --git a/examples/kafka/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/kafka/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/kafka/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/kafka/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/kafka/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 1bf7ec98..00000000 --- a/examples/kafka/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.kafka.core.KafkaTemplate; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final KafkaTemplate kafkaTemplate; - - public StockController(KafkaTemplate kafkaTemplate) { - this.kafkaTemplate = kafkaTemplate; - } - - @GetMapping("/stock") - public String getStock() { - kafkaTemplate.send("kafkaTopic", "test"); - return "Stock updated"; - } -} diff --git a/examples/kafka/spring-boot-non-reactive-3/src/main/resources/application.yaml b/examples/kafka/spring-boot-non-reactive-3/src/main/resources/application.yaml deleted file mode 100644 index 11c060d2..00000000 --- a/examples/kafka/spring-boot-non-reactive-3/src/main/resources/application.yaml +++ /dev/null @@ -1,6 +0,0 @@ -spring: - kafka: - bootstrap-servers: kafka:9092 - producer: - bootstrap-servers: kafka:9092 - diff --git a/examples/kafka/spring-boot-reactive-2/.tool-versions b/examples/kafka/spring-boot-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/kafka/spring-boot-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/kafka/spring-boot-reactive-2/build.gradle b/examples/kafka/spring-boot-reactive-2/build.gradle deleted file mode 100644 index c7519049..00000000 --- a/examples/kafka/spring-boot-reactive-2/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.kafka:spring-kafka' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/kafka/spring-boot-reactive-2/oats.yaml b/examples/kafka/spring-boot-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/kafka/spring-boot-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/kafka/spring-boot-reactive-2/run.sh b/examples/kafka/spring-boot-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/kafka/spring-boot-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/kafka/spring-boot-reactive-2/settings.gradle b/examples/kafka/spring-boot-reactive-2/settings.gradle deleted file mode 100644 index 186841af..00000000 --- a/examples/kafka/spring-boot-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-2' diff --git a/examples/kafka/spring-boot-reactive-2/src/main/java/com/grafana/demo/KafkaConfig.java b/examples/kafka/spring-boot-reactive-2/src/main/java/com/grafana/demo/KafkaConfig.java deleted file mode 100644 index b6204dcb..00000000 --- a/examples/kafka/spring-boot-reactive-2/src/main/java/com/grafana/demo/KafkaConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.apache.kafka.clients.admin.NewTopic; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.kafka.config.TopicBuilder; - -@Configuration -public class KafkaConfig { - - @Bean - public NewTopic topic() { - return TopicBuilder.name("kafkaTopic").partitions(10).replicas(1).build(); - } -} diff --git a/examples/kafka/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/kafka/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/kafka/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/kafka/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/kafka/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 1bf7ec98..00000000 --- a/examples/kafka/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.kafka.core.KafkaTemplate; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final KafkaTemplate kafkaTemplate; - - public StockController(KafkaTemplate kafkaTemplate) { - this.kafkaTemplate = kafkaTemplate; - } - - @GetMapping("/stock") - public String getStock() { - kafkaTemplate.send("kafkaTopic", "test"); - return "Stock updated"; - } -} diff --git a/examples/kafka/spring-boot-reactive-2/src/main/resources/application.yaml b/examples/kafka/spring-boot-reactive-2/src/main/resources/application.yaml deleted file mode 100644 index 11c060d2..00000000 --- a/examples/kafka/spring-boot-reactive-2/src/main/resources/application.yaml +++ /dev/null @@ -1,6 +0,0 @@ -spring: - kafka: - bootstrap-servers: kafka:9092 - producer: - bootstrap-servers: kafka:9092 - diff --git a/examples/kafka/spring-boot-reactive-3/.tool-versions b/examples/kafka/spring-boot-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/kafka/spring-boot-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/kafka/spring-boot-reactive-3/build.gradle b/examples/kafka/spring-boot-reactive-3/build.gradle deleted file mode 100644 index f08e51c0..00000000 --- a/examples/kafka/spring-boot-reactive-3/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.kafka:spring-kafka' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/kafka/spring-boot-reactive-3/oats.yaml b/examples/kafka/spring-boot-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/kafka/spring-boot-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/kafka/spring-boot-reactive-3/run.sh b/examples/kafka/spring-boot-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/kafka/spring-boot-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/kafka/spring-boot-reactive-3/settings.gradle b/examples/kafka/spring-boot-reactive-3/settings.gradle deleted file mode 100644 index 2bfc2706..00000000 --- a/examples/kafka/spring-boot-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-3' diff --git a/examples/kafka/spring-boot-reactive-3/src/main/java/com/grafana/demo/KafkaConfig.java b/examples/kafka/spring-boot-reactive-3/src/main/java/com/grafana/demo/KafkaConfig.java deleted file mode 100644 index b6204dcb..00000000 --- a/examples/kafka/spring-boot-reactive-3/src/main/java/com/grafana/demo/KafkaConfig.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.apache.kafka.clients.admin.NewTopic; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.kafka.config.TopicBuilder; - -@Configuration -public class KafkaConfig { - - @Bean - public NewTopic topic() { - return TopicBuilder.name("kafkaTopic").partitions(10).replicas(1).build(); - } -} diff --git a/examples/kafka/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/kafka/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/kafka/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/kafka/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/kafka/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 1bf7ec98..00000000 --- a/examples/kafka/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.kafka.core.KafkaTemplate; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final KafkaTemplate kafkaTemplate; - - public StockController(KafkaTemplate kafkaTemplate) { - this.kafkaTemplate = kafkaTemplate; - } - - @GetMapping("/stock") - public String getStock() { - kafkaTemplate.send("kafkaTopic", "test"); - return "Stock updated"; - } -} diff --git a/examples/kafka/spring-boot-reactive-3/src/main/resources/application.yaml b/examples/kafka/spring-boot-reactive-3/src/main/resources/application.yaml deleted file mode 100644 index 11c060d2..00000000 --- a/examples/kafka/spring-boot-reactive-3/src/main/resources/application.yaml +++ /dev/null @@ -1,6 +0,0 @@ -spring: - kafka: - bootstrap-servers: kafka:9092 - producer: - bootstrap-servers: kafka:9092 - diff --git a/examples/log4j/README.md b/examples/log4j/README.md deleted file mode 100644 index 54b79ebd..00000000 --- a/examples/log4j/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Overview - -Example projects for using Log4j instead of Slf4j. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). diff --git a/examples/log4j/oats-template.yaml b/examples/log4j/oats-template.yaml deleted file mode 100644 index 576b705d..00000000 --- a/examples/log4j/oats-template.yaml +++ /dev/null @@ -1,10 +0,0 @@ -docker-compose: - generator: java -input: - - path: /stock -expected: - logs: - - logql: '{service_name="app"}' - # the instrumentation scope contains the logger name, not "log4j" so we cannot assert that log4j was actually used - contains: - - 'hello LGTM' diff --git a/examples/log4j/spring-boot-non-reactive-2/.tool-versions b/examples/log4j/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/log4j/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/log4j/spring-boot-non-reactive-2/build.gradle b/examples/log4j/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index fa0ce570..00000000 --- a/examples/log4j/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation "org.springframework.boot:spring-boot-starter-log4j2" - implementation 'org.springframework.boot:spring-boot-starter-web' -} - -configurations { - all*.exclude module: 'spring-boot-starter-logging' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/log4j/spring-boot-non-reactive-2/oats.yaml b/examples/log4j/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/log4j/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/log4j/spring-boot-non-reactive-2/run.sh b/examples/log4j/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/log4j/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/log4j/spring-boot-non-reactive-2/settings.gradle b/examples/log4j/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/log4j/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/log4j/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/log4j/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/log4j/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/log4j/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/log4j/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 71c269e5..00000000 --- a/examples/log4j/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private static final Logger LOG = LoggerFactory.getLogger(StockController.class); - - @GetMapping("/stock") - public String getStock() { - LOG.info("hello LGTM"); - return "hello LGTM"; - } -} diff --git a/examples/log4j/spring-boot-non-reactive-3/.tool-versions b/examples/log4j/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/log4j/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/log4j/spring-boot-non-reactive-3/build.gradle b/examples/log4j/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index ca06dba5..00000000 --- a/examples/log4j/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation "org.springframework.boot:spring-boot-starter-log4j2" - implementation 'org.springframework.boot:spring-boot-starter-web' -} - -configurations { - all*.exclude module: 'spring-boot-starter-logging' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/log4j/spring-boot-non-reactive-3/oats.yaml b/examples/log4j/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/log4j/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/log4j/spring-boot-non-reactive-3/run.sh b/examples/log4j/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/log4j/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/log4j/spring-boot-non-reactive-3/settings.gradle b/examples/log4j/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/log4j/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/log4j/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/log4j/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/log4j/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/log4j/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/log4j/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 71c269e5..00000000 --- a/examples/log4j/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private static final Logger LOG = LoggerFactory.getLogger(StockController.class); - - @GetMapping("/stock") - public String getStock() { - LOG.info("hello LGTM"); - return "hello LGTM"; - } -} diff --git a/examples/logback/README.md b/examples/logback/README.md deleted file mode 100644 index 9ef448fe..00000000 --- a/examples/logback/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Overview - -Example projects for using Slf4j with Logback. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). diff --git a/examples/logback/oats-template.yaml b/examples/logback/oats-template.yaml deleted file mode 100644 index 576b705d..00000000 --- a/examples/logback/oats-template.yaml +++ /dev/null @@ -1,10 +0,0 @@ -docker-compose: - generator: java -input: - - path: /stock -expected: - logs: - - logql: '{service_name="app"}' - # the instrumentation scope contains the logger name, not "log4j" so we cannot assert that log4j was actually used - contains: - - 'hello LGTM' diff --git a/examples/logback/spring-boot-non-reactive-2/.tool-versions b/examples/logback/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/logback/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/logback/spring-boot-non-reactive-2/build.gradle b/examples/logback/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index 31591239..00000000 --- a/examples/logback/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/logback/spring-boot-non-reactive-2/oats.yaml b/examples/logback/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/logback/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/logback/spring-boot-non-reactive-2/run.sh b/examples/logback/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/logback/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/logback/spring-boot-non-reactive-2/settings.gradle b/examples/logback/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/logback/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/logback/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/logback/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/logback/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/logback/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/logback/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 71c269e5..00000000 --- a/examples/logback/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private static final Logger LOG = LoggerFactory.getLogger(StockController.class); - - @GetMapping("/stock") - public String getStock() { - LOG.info("hello LGTM"); - return "hello LGTM"; - } -} diff --git a/examples/logback/spring-boot-non-reactive-3/.tool-versions b/examples/logback/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/logback/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/logback/spring-boot-non-reactive-3/build.gradle b/examples/logback/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index c3741c3c..00000000 --- a/examples/logback/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/logback/spring-boot-non-reactive-3/oats.yaml b/examples/logback/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/logback/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/logback/spring-boot-non-reactive-3/run.sh b/examples/logback/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/logback/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/logback/spring-boot-non-reactive-3/settings.gradle b/examples/logback/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/logback/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/logback/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/logback/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/logback/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/logback/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/logback/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 71c269e5..00000000 --- a/examples/logback/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private static final Logger LOG = LoggerFactory.getLogger(StockController.class); - - @GetMapping("/stock") - public String getStock() { - LOG.info("hello LGTM"); - return "hello LGTM"; - } -} diff --git a/examples/manual/README.md b/examples/manual/README.md deleted file mode 100644 index 9ef448fe..00000000 --- a/examples/manual/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Overview - -Example projects for using Slf4j with Logback. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). diff --git a/examples/manual/jvm-dashboard-old.json b/examples/manual/jvm-dashboard-old.json deleted file mode 100644 index e3d09412..00000000 --- a/examples/manual/jvm-dashboard-old.json +++ /dev/null @@ -1,678 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_GRAFANACLOUD-GREGORZEITLINGER-PROM", - "label": "grafanacloud-gregorzeitlinger-prom", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.3.0-63606" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Dashboard for JVM metrics with OpenTelemetry instrumentation", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 18812, - "graphTooltip": 0, - "id": null, - "links": [ - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Semantic Conventions: 1.20.0", - "tooltip": "", - "type": "link", - "url": "https://github.com/open-telemetry/semantic-conventions/blob/main/schemas/1.20.0" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "description": "CPU utilization for the whole system", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 0, - "y": 0 - }, - "id": 38, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "editorMode": "code", - "expr": "process_runtime_jvm_system_cpu_utilization{job=~\"$job\", instance=~\"$instance\"}", - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - } - ], - "title": "CPU utilization", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "description": "How much of the available heap memory is used", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 7, - "y": 0 - }, - "id": 30, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "editorMode": "code", - "expr": "sum by (instance) (process_runtime_jvm_memory_usage{job=~\"$job\",type=\"heap\", instance=~\"$instance\"}) / on(instance) sum by (instance) (process_runtime_jvm_memory_limit{job=~\"$job\",type=\"heap\", instance=~\"$instance\"})", - "legendFormat": "{{instance}} - used", - "range": true, - "refId": "A" - } - ], - "title": "Heap Memory Utilization", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "description": "Percentage of time spend for garbage collection pauses", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 0, - "y": 7 - }, - "id": 46, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "editorMode": "code", - "expr": "sum by(instance) (rate(process_runtime_jvm_gc_duration_sum{job=~\"$job\", instance=~\"$instance\"}[1m]))", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "Garbage Collection", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "description": "Number of currently loaded classes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 5, - "x": 4, - "y": 7 - }, - "id": 33, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "editorMode": "code", - "expr": "process_runtime_jvm_classes_current_loaded{job=~\"$job\", instance=~\"$instance\"}", - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - } - ], - "title": "Classes", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "description": "Number of currently executing (also called \"live\") threads", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 30, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 5, - "x": 9, - "y": 7 - }, - "id": 42, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "editorMode": "code", - "expr": "sum(process_runtime_jvm_threads_count{job=~\"$job\", instance=~\"$instance\"}) by (instance)", - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - } - ], - "title": "Threads", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 39, - "tags": [ - "JVM", - "open-telemetry", - "Java", - "otel", - "opentelemetry", - "otlp" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "default", - "value": "default" - }, - "description": "Choose a Prometheus data source", - "hide": 0, - "includeAll": false, - "label": "Data source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "queryValue": "", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "allValue": ".+", - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "definition": "label_values(process_runtime_jvm_memory_usage,job)", - "hide": 0, - "includeAll": true, - "label": "Job", - "multi": true, - "name": "job", - "options": [], - "query": { - "query": "label_values(process_runtime_jvm_memory_usage,job)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".+", - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_GRAFANACLOUD-GREGORZEITLINGER-PROM}" - }, - "definition": "label_values(process_runtime_jvm_memory_usage{job=~\"$job\"},instance)", - "description": "The instance of the application, e.g. pod1", - "hide": 0, - "includeAll": true, - "label": "Instance", - "multi": true, - "name": "instance", - "options": [], - "query": { - "query": "label_values(process_runtime_jvm_memory_usage{job=~\"$job\"},instance)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "JVM Overview (OpenTelemetry)", - "uid": "8Z6ACMK41", - "version": 2, - "weekStart": "" -} diff --git a/examples/manual/jvm-dashboard.json b/examples/manual/jvm-dashboard.json deleted file mode 100644 index b5075b27..00000000 --- a/examples/manual/jvm-dashboard.json +++ /dev/null @@ -1,954 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__elements": {}, - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "10.0.5" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - }, - { - "type": "panel", - "id": "timeseries", - "name": "Time series", - "version": "" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "description": "Dashboard for JVM metrics with OpenTelemetry instrumentation", - "editable": true, - "fiscalYearStartMonth": 0, - "gnetId": 18812, - "graphTooltip": 0, - "id": null, - "links": [ - { - "asDropdown": false, - "icon": "info", - "includeVars": false, - "keepTime": false, - "tags": [], - "targetBlank": false, - "title": "Semantic Conventions: 1.20.0 - 1.22.0", - "tooltip": "multiple versions of the semantic conventions are supported using 'or' and regex queries", - "type": "link", - "url": "https://github.com/open-telemetry/semantic-conventions/blob/main/schemas/1.20.0" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "HTTP server request rate", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "reqps" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 4, - "x": 0, - "y": 0 - }, - "id": 51, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum by (instance) (rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count|http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Rate", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "HTTP server error ratio - ratio of requests that return 5xx", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 4, - "y": 0 - }, - "id": 50, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "(sum by (instance)(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count\", job=~\"$job\", instance=~\"$instance\", http_response_status_code=~\"5.*\"}[$__rate_interval]))) / on (instance) (sum by (instance)(rate({__name__=~\"http_server_request_duration_seconds_count|http_server_request_duration_count\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))) or (sum by (instance)(rate({__name__=~\"http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\", http_status_code=~\"5.*\"}[$__rate_interval]))) / on (instance) (sum by (instance)(rate({__name__=~\"http_server_duration_milliseconds_count|http_server_duration_seconds_count|http_server_duration_count\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval])))\n", - "instant": false, - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Error %", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "HTTP server request duration", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 5, - "x": 9, - "y": 0 - }, - "id": 52, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "(histogram_quantile(0.95, sum by(le, instance) (rate({__name__=~\"http_server_request_duration_seconds_bucket|http_server_request_duration_bucket|http_server_duration_milliseconds_bucket|http_server_duration_seconds_bucket|http_server_duration_bucket\", job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))))", - "instant": false, - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - } - ], - "title": "Duration", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "CPU utilization for the whole system", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 0, - "y": 8 - }, - "id": 38, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "{__name__=~\"jvm_cpu_recent_utilization|jvm_cpu_recent_utilization_ratio|process_runtime_jvm_system_cpu_utilization|process_runtime_jvm_system_cpu_utilization_ratio\", job=~\"$job\", instance=~\"$instance\"}", - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - } - ], - "title": "CPU utilization", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Used heap memory / heap memory limit ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 7, - "x": 7, - "y": 8 - }, - "id": 30, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "(sum by (instance) ({__name__=~\"jvm_memory_used|jvm_memory_used_bytes\",job=~\"$job\",jvm_memory_type=\"heap\", instance=~\"$instance\"}) / on(instance) sum by (instance) ({__name__=~\"jvm_memory_limit|jvm_memory_limit_bytes\",job=~\"$job\",jvm_memory_type=\"heap\", instance=~\"$instance\"})) or (sum by (instance) ({__name__=~\"process_runtime_jvm_memory_usage|process_runtime_jvm_memory_usage_bytes\",job=~\"$job\",type=\"heap\", instance=~\"$instance\"}) / on(instance) sum by (instance) ({__name__=~\"process_runtime_jvm_memory_limit|process_runtime_jvm_memory_limit_bytes\",job=~\"$job\",type=\"heap\", instance=~\"$instance\"}))", - "legendFormat": "{{instance}} - used", - "range": true, - "refId": "A" - } - ], - "title": "Heap Memory Utilization", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Percentage of time spend for garbage collection pauses", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 4, - "x": 0, - "y": 15 - }, - "id": 46, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum by(instance) (rate({__name__=~\"jvm_gc_duration_sum|jvm_gc_duration_seconds_sum|process_runtime_jvm_gc_duration_sum|process_runtime_jvm_gc_duration_seconds_sum\",job=~\"$job\", instance=~\"$instance\"}[$__rate_interval]))", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - } - ], - "title": "Garbage Collection", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of currently loaded classes", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 5, - "x": 4, - "y": 15 - }, - "id": 33, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "{__name__=~\"jvm_class_count|process_runtime_jvm_classes_current_loaded\",job=~\"$job\", instance=~\"$instance\"}", - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - } - ], - "title": "Classes", - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "description": "Number of currently executing (also called \"live\") threads", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 5, - "x": 9, - "y": 15 - }, - "id": 42, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "editorMode": "code", - "expr": "sum({__name__=~\"jvm_thread_count|process_runtime_jvm_threads_count\",job=~\"$job\", instance=~\"$instance\"}) by (instance)", - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - } - ], - "title": "Threads", - "type": "timeseries" - } - ], - "refresh": "", - "schemaVersion": 38, - "style": "dark", - "tags": [ - "JVM", - "open-telemetry", - "Java", - "otel", - "opentelemetry", - "otlp" - ], - "templating": { - "list": [ - { - "current": { - "selected": false, - "text": "Prometheus", - "value": "Prometheus" - }, - "description": "Choose a Prometheus data source", - "hide": 0, - "includeAll": false, - "label": "Data source", - "multi": false, - "name": "datasource", - "options": [], - "query": "prometheus", - "queryValue": "", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "type": "datasource" - }, - { - "allValue": ".+", - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "definition": "label_values({__name__=~\"(jvm_class_count|process_runtime_jvm_classes_current_loaded)\"},job)", - "hide": 0, - "includeAll": true, - "label": "Job", - "multi": true, - "name": "job", - "options": [], - "query": { - "query": "label_values({__name__=~\"(jvm_class_count|process_runtime_jvm_classes_current_loaded)\"},job)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".+", - "current": {}, - "datasource": { - "type": "prometheus", - "uid": "${DS_PROMETHEUS}" - }, - "definition": "label_values({__name__=~\"(jvm_class_count|process_runtime_jvm_classes_current_loaded)\", job=~\"$job\"},instance)", - "description": "The instance of the application, e.g. pod1", - "hide": 0, - "includeAll": true, - "label": "Instance", - "multi": true, - "name": "instance", - "options": [], - "query": { - "query": "label_values({__name__=~\"(jvm_class_count|process_runtime_jvm_classes_current_loaded)\", job=~\"$job\"},instance)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 1, - "tagValuesQuery": "", - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-1h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "", - "title": "JVM Overview (OpenTelemetry)", - "uid": "b91844d7-121e-4d0a-93b8-a9c1a05703b3", - "version": 1, - "weekStart": "" -} diff --git a/examples/manual/oats-template.yaml b/examples/manual/oats-template.yaml deleted file mode 100644 index 4b673ef8..00000000 --- a/examples/manual/oats-template.yaml +++ /dev/null @@ -1,41 +0,0 @@ -matrix: - - name: data-saver-on - docker-compose: - generator: java - - name: data-saver-off - docker-compose: - generator: java - java-generator-params: - disable-data-saver: true -input: - - path: /stock -expected: - traces: - - traceql: '{ name = "get_cart" }' # created by @WithSpan - spans: - - name: 'get_cart' - metrics: - - promql: 'cart_client_total{}' # created programmatically - value: '>= 0' - dashboards: - - path: ../jvm-dashboard.json - panels: - - title: Rate - value: "> 0" - matrix-condition: "data-saver-off" - - title: Error % - value: "> 0" - matrix-condition: "data-saver-off" - - title: Duration - value: "> 0" - matrix-condition: "data-saver-off" - - title: CPU utilization - value: ">= 0" - - title: Heap Memory Utilization - value: "> 0" - - title: Garbage Collection - value: ">= 0" - - title: Classes - value: "> 0" - - title: Threads - value: "> 0" diff --git a/examples/manual/spring-boot-non-reactive-2/.tool-versions b/examples/manual/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/manual/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/manual/spring-boot-non-reactive-2/build.gradle b/examples/manual/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index 576ec0cd..00000000 --- a/examples/manual/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation('io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.9.0') - implementation('io.opentelemetry:opentelemetry-api:1.43.0') -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/manual/spring-boot-non-reactive-2/oats.yaml b/examples/manual/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/manual/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/manual/spring-boot-non-reactive-2/run.sh b/examples/manual/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/manual/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/manual/spring-boot-non-reactive-2/settings.gradle b/examples/manual/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/manual/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/manual/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/CartClient.java b/examples/manual/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/CartClient.java deleted file mode 100644 index 9f9e2fb2..00000000 --- a/examples/manual/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/CartClient.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import io.opentelemetry.api.GlobalOpenTelemetry; -import io.opentelemetry.api.metrics.LongCounter; -import io.opentelemetry.instrumentation.annotations.WithSpan; -import java.util.Random; -import org.springframework.stereotype.Service; - -@Service -public class CartClient { - - private final Random random = new Random(); - - private final LongCounter counter = - GlobalOpenTelemetry.get().getMeter("application").counterBuilder("cart_client").build(); - - @WithSpan("get_cart") - public String getCart() { - counter.add(1); - if (random.nextBoolean()) { - throw new RuntimeException("Failed to get cart"); - } - return "cart"; - } -} diff --git a/examples/manual/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/manual/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/manual/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/manual/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/manual/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index dc515a07..00000000 --- a/examples/manual/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final CartClient cartClient; - - public StockController(CartClient cartClient) { - this.cartClient = cartClient; - } - - @GetMapping("/stock") - public String getStock() { - return cartClient.getCart(); - } -} diff --git a/examples/manual/spring-boot-non-reactive-3/.tool-versions b/examples/manual/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/manual/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/manual/spring-boot-non-reactive-3/build.gradle b/examples/manual/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index b205b667..00000000 --- a/examples/manual/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation('io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:2.9.0') - implementation('io.opentelemetry:opentelemetry-api:1.43.0') -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/manual/spring-boot-non-reactive-3/oats.yaml b/examples/manual/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/manual/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/manual/spring-boot-non-reactive-3/run.sh b/examples/manual/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/manual/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/manual/spring-boot-non-reactive-3/settings.gradle b/examples/manual/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/manual/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/manual/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/CartClient.java b/examples/manual/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/CartClient.java deleted file mode 100644 index 9f9e2fb2..00000000 --- a/examples/manual/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/CartClient.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import io.opentelemetry.api.GlobalOpenTelemetry; -import io.opentelemetry.api.metrics.LongCounter; -import io.opentelemetry.instrumentation.annotations.WithSpan; -import java.util.Random; -import org.springframework.stereotype.Service; - -@Service -public class CartClient { - - private final Random random = new Random(); - - private final LongCounter counter = - GlobalOpenTelemetry.get().getMeter("application").counterBuilder("cart_client").build(); - - @WithSpan("get_cart") - public String getCart() { - counter.add(1); - if (random.nextBoolean()) { - throw new RuntimeException("Failed to get cart"); - } - return "cart"; - } -} diff --git a/examples/manual/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/manual/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/manual/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/manual/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/manual/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index dc515a07..00000000 --- a/examples/manual/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final CartClient cartClient; - - public StockController(CartClient cartClient) { - this.cartClient = cartClient; - } - - @GetMapping("/stock") - public String getStock() { - return cartClient.getCart(); - } -} diff --git a/examples/mongodb/README.md b/examples/mongodb/README.md deleted file mode 100644 index 85e42414..00000000 --- a/examples/mongodb/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Overview - -Example projects for Mongo DB clients. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). diff --git a/examples/mongodb/docker-compose.yaml b/examples/mongodb/docker-compose.yaml deleted file mode 100644 index 36f25a39..00000000 --- a/examples/mongodb/docker-compose.yaml +++ /dev/null @@ -1,11 +0,0 @@ -version: '3.9' - -services: - mongodb: - image: mongo:6-jammy -# ports: -# - '27017:27017' - volumes: - - dbdata6:/data/db -volumes: - dbdata6: diff --git a/examples/mongodb/oats-template.yaml b/examples/mongodb/oats-template.yaml deleted file mode 100644 index 5615bf00..00000000 --- a/examples/mongodb/oats-template.yaml +++ /dev/null @@ -1,13 +0,0 @@ -docker-compose: - generator: java - files: - - ../docker-compose.yaml -input: - - path: /stock -expected: - metrics: - # https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/mongodb/MongoMetricsConnectionPoolListener.java - - promql: mongodb_driver_pool_waitqueuesize{} - value: '== 0' - - promql: mongodb_driver_pool_checkedout{} - value: '>= 0' diff --git a/examples/mongodb/spring-boot-non-reactive-2/.tool-versions b/examples/mongodb/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/mongodb/spring-boot-non-reactive-2/build.gradle b/examples/mongodb/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index c956ceae..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'org.springframework.boot:spring-boot-starter-data-mongodb' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/mongodb/spring-boot-non-reactive-2/oats.yaml b/examples/mongodb/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/mongodb/spring-boot-non-reactive-2/run.sh b/examples/mongodb/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/mongodb/spring-boot-non-reactive-2/settings.gradle b/examples/mongodb/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/Customer.java b/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/Customer.java deleted file mode 100644 index 191a649a..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/Customer.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.annotation.Id; - -public class Customer { - - @Id public String id; - - public String firstName; - public String lastName; - - public Customer() {} - - public Customer(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - @Override - public String toString() { - return String.format("Customer[id=%s, firstName='%s', lastName='%s']", id, firstName, lastName); - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } -} diff --git a/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/CustomerMongoRepository.java b/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/CustomerMongoRepository.java deleted file mode 100644 index cd784729..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/CustomerMongoRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.mongodb.repository.MongoRepository; - -public interface CustomerMongoRepository extends MongoRepository { - - Customer findByFirstName(String firstName); -} diff --git a/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index a4dd4c07..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final CustomerMongoRepository repository; - - public StockController(CustomerMongoRepository repository) { - this.repository = repository; - } - - @GetMapping("/stock") - public String getStock() { - return String.valueOf(repository.findByFirstName("LGTM")); - } -} diff --git a/examples/mongodb/spring-boot-non-reactive-2/src/main/resources/application.yaml b/examples/mongodb/spring-boot-non-reactive-2/src/main/resources/application.yaml deleted file mode 100644 index b0ca6a88..00000000 --- a/examples/mongodb/spring-boot-non-reactive-2/src/main/resources/application.yaml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - data: - mongodb: - host: mongodb diff --git a/examples/mongodb/spring-boot-non-reactive-3/.tool-versions b/examples/mongodb/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/mongodb/spring-boot-non-reactive-3/build.gradle b/examples/mongodb/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index ca0252e2..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'org.springframework.boot:spring-boot-starter-data-mongodb' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/mongodb/spring-boot-non-reactive-3/oats.yaml b/examples/mongodb/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/mongodb/spring-boot-non-reactive-3/run.sh b/examples/mongodb/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/mongodb/spring-boot-non-reactive-3/settings.gradle b/examples/mongodb/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/Customer.java b/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/Customer.java deleted file mode 100644 index 191a649a..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/Customer.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.annotation.Id; - -public class Customer { - - @Id public String id; - - public String firstName; - public String lastName; - - public Customer() {} - - public Customer(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - @Override - public String toString() { - return String.format("Customer[id=%s, firstName='%s', lastName='%s']", id, firstName, lastName); - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } -} diff --git a/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/CustomerMongoRepository.java b/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/CustomerMongoRepository.java deleted file mode 100644 index cd784729..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/CustomerMongoRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.mongodb.repository.MongoRepository; - -public interface CustomerMongoRepository extends MongoRepository { - - Customer findByFirstName(String firstName); -} diff --git a/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index a4dd4c07..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final CustomerMongoRepository repository; - - public StockController(CustomerMongoRepository repository) { - this.repository = repository; - } - - @GetMapping("/stock") - public String getStock() { - return String.valueOf(repository.findByFirstName("LGTM")); - } -} diff --git a/examples/mongodb/spring-boot-non-reactive-3/src/main/resources/application.yaml b/examples/mongodb/spring-boot-non-reactive-3/src/main/resources/application.yaml deleted file mode 100644 index b0ca6a88..00000000 --- a/examples/mongodb/spring-boot-non-reactive-3/src/main/resources/application.yaml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - data: - mongodb: - host: mongodb diff --git a/examples/mongodb/spring-boot-reactive-2/.tool-versions b/examples/mongodb/spring-boot-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/mongodb/spring-boot-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/mongodb/spring-boot-reactive-2/build.gradle b/examples/mongodb/spring-boot-reactive-2/build.gradle deleted file mode 100644 index 80739146..00000000 --- a/examples/mongodb/spring-boot-reactive-2/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'org.springframework.boot:spring-boot-starter-data-mongodb-reactive' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/mongodb/spring-boot-reactive-2/oats.yaml b/examples/mongodb/spring-boot-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/mongodb/spring-boot-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/mongodb/spring-boot-reactive-2/run.sh b/examples/mongodb/spring-boot-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/mongodb/spring-boot-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/mongodb/spring-boot-reactive-2/settings.gradle b/examples/mongodb/spring-boot-reactive-2/settings.gradle deleted file mode 100644 index 186841af..00000000 --- a/examples/mongodb/spring-boot-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-2' diff --git a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/Customer.java b/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/Customer.java deleted file mode 100644 index 191a649a..00000000 --- a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/Customer.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.annotation.Id; - -public class Customer { - - @Id public String id; - - public String firstName; - public String lastName; - - public Customer() {} - - public Customer(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - @Override - public String toString() { - return String.format("Customer[id=%s, firstName='%s', lastName='%s']", id, firstName, lastName); - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } -} diff --git a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/CustomerMongoRepository.java b/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/CustomerMongoRepository.java deleted file mode 100644 index d407b173..00000000 --- a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/CustomerMongoRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.mongodb.repository.ReactiveMongoRepository; -import reactor.core.publisher.Flux; - -public interface CustomerMongoRepository extends ReactiveMongoRepository { - Flux findByFirstName(String firstName); -} diff --git a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/MongoReactiveConfig.java b/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/MongoReactiveConfig.java deleted file mode 100644 index 3f80f48c..00000000 --- a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/MongoReactiveConfig.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import com.mongodb.reactivestreams.client.MongoClient; -import com.mongodb.reactivestreams.client.MongoClients; -import org.springframework.context.annotation.Bean; -import org.springframework.data.mongodb.config.AbstractReactiveMongoConfiguration; -import org.springframework.data.mongodb.repository.config.EnableReactiveMongoRepositories; - -@EnableReactiveMongoRepositories -public class MongoReactiveConfig extends AbstractReactiveMongoConfiguration { - - @Bean - public MongoClient mongoClient() { - return MongoClients.create(); - } - - @Override - protected String getDatabaseName() { - return "reactive"; - } -} diff --git a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index a4dd4c07..00000000 --- a/examples/mongodb/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - private final CustomerMongoRepository repository; - - public StockController(CustomerMongoRepository repository) { - this.repository = repository; - } - - @GetMapping("/stock") - public String getStock() { - return String.valueOf(repository.findByFirstName("LGTM")); - } -} diff --git a/examples/mongodb/spring-boot-reactive-2/src/main/resources/application.yaml b/examples/mongodb/spring-boot-reactive-2/src/main/resources/application.yaml deleted file mode 100644 index b0ca6a88..00000000 --- a/examples/mongodb/spring-boot-reactive-2/src/main/resources/application.yaml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - data: - mongodb: - host: mongodb diff --git a/examples/mongodb/spring-boot-reactive-3/.tool-versions b/examples/mongodb/spring-boot-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/mongodb/spring-boot-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/mongodb/spring-boot-reactive-3/build.gradle b/examples/mongodb/spring-boot-reactive-3/build.gradle deleted file mode 100644 index 49c47f98..00000000 --- a/examples/mongodb/spring-boot-reactive-3/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'org.springframework.boot:spring-boot-starter-data-mongodb-reactive' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/mongodb/spring-boot-reactive-3/oats.yaml b/examples/mongodb/spring-boot-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/mongodb/spring-boot-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/mongodb/spring-boot-reactive-3/run.sh b/examples/mongodb/spring-boot-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/mongodb/spring-boot-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/mongodb/spring-boot-reactive-3/settings.gradle b/examples/mongodb/spring-boot-reactive-3/settings.gradle deleted file mode 100644 index 2bfc2706..00000000 --- a/examples/mongodb/spring-boot-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-3' diff --git a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/Customer.java b/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/Customer.java deleted file mode 100644 index 191a649a..00000000 --- a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/Customer.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.annotation.Id; - -public class Customer { - - @Id public String id; - - public String firstName; - public String lastName; - - public Customer() {} - - public Customer(String firstName, String lastName) { - this.firstName = firstName; - this.lastName = lastName; - } - - @Override - public String toString() { - return String.format("Customer[id=%s, firstName='%s', lastName='%s']", id, firstName, lastName); - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } -} diff --git a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/CustomerMongoRepository.java b/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/CustomerMongoRepository.java deleted file mode 100644 index d407b173..00000000 --- a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/CustomerMongoRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.mongodb.repository.ReactiveMongoRepository; -import reactor.core.publisher.Flux; - -public interface CustomerMongoRepository extends ReactiveMongoRepository { - Flux findByFirstName(String firstName); -} diff --git a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/MongoReactiveConfig.java b/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/MongoReactiveConfig.java deleted file mode 100644 index 3f80f48c..00000000 --- a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/MongoReactiveConfig.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import com.mongodb.reactivestreams.client.MongoClient; -import com.mongodb.reactivestreams.client.MongoClients; -import org.springframework.context.annotation.Bean; -import org.springframework.data.mongodb.config.AbstractReactiveMongoConfiguration; -import org.springframework.data.mongodb.repository.config.EnableReactiveMongoRepositories; - -@EnableReactiveMongoRepositories -public class MongoReactiveConfig extends AbstractReactiveMongoConfiguration { - - @Bean - public MongoClient mongoClient() { - return MongoClients.create(); - } - - @Override - protected String getDatabaseName() { - return "reactive"; - } -} diff --git a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 017a9108..00000000 --- a/examples/mongodb/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Flux; - -@RestController -public class StockController { - - private final CustomerMongoRepository repository; - - public StockController(CustomerMongoRepository repository) { - this.repository = repository; - } - - @GetMapping("/stock") - public Flux getStock() { - return repository.findByFirstName("LGTM"); - } -} diff --git a/examples/mongodb/spring-boot-reactive-3/src/main/resources/application.yaml b/examples/mongodb/spring-boot-reactive-3/src/main/resources/application.yaml deleted file mode 100644 index b0ca6a88..00000000 --- a/examples/mongodb/spring-boot-reactive-3/src/main/resources/application.yaml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - data: - mongodb: - host: mongodb diff --git a/examples/redis/README.md b/examples/redis/README.md deleted file mode 100644 index fe9ef24c..00000000 --- a/examples/redis/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# Overview - -Example projects for redis clients. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). - -## Metrics - -The jedis driver exposes metrics via JMX. These metrics can be exported independently of spring boot - -see otel-jmx-config.yaml - which is used in the oats tests. diff --git a/examples/redis/docker-compose.yaml b/examples/redis/docker-compose.yaml deleted file mode 100644 index 3330f8aa..00000000 --- a/examples/redis/docker-compose.yaml +++ /dev/null @@ -1,20 +0,0 @@ -version: '3.9' - -x-default-logging: &logging - driver: "json-file" - options: - max-size: "5m" - max-file: "2" - -services: - redis: - image: redis:alpine - user: redis - deploy: - resources: - limits: - memory: 20M - restart: unless-stopped -# ports: -# - "6379:6379" - logging: *logging diff --git a/examples/redis/oats-template.yaml b/examples/redis/oats-template.yaml deleted file mode 100644 index 0c83e49a..00000000 --- a/examples/redis/oats-template.yaml +++ /dev/null @@ -1,20 +0,0 @@ -docker-compose: - generator: java - files: - - ../docker-compose.yaml - java-generator-params: - otel-jmx-config: ../otel-jmx-config.yaml -input: - - path: /stock -expected: - traces: - - traceql: '{ name = "KEYS" }' # in reactive, we actually use lettuce to get the span - maybe jedis is not even used - try this out - spans: - - name: KEYS - attributes: - db.system: redis - metrics: - # connection pool usage ratio - - promql: 'sum by (instance, pool_name) (db_client_connections_usage{state="used", job=~"$job", instance=~"$instance"}) / on (instance, pool_name) - sum by (instance, pool_name) (db_client_connections_max{job=~"$job", instance=~"$instance"})' - value: '>= 0' diff --git a/examples/redis/otel-jmx-config.yaml b/examples/redis/otel-jmx-config.yaml deleted file mode 100644 index bd66dab2..00000000 --- a/examples/redis/otel-jmx-config.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# JMX Bean: https://github.com/apache/commons-pool/blob/master/src/main/java/org/apache/commons/pool3/impl/GenericKeyedObjectPoolMXBean.java -# Semantic Convention: https://opentelemetry.io/docs/specs/otel/metrics/semantic_conventions/database-metrics/ -# Syntax of this file: https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/jmx-metrics/javaagent -rules: - - bean: org.apache.commons.pool2:type=GenericObjectPool,name=* - metricAttribute: - pool.name: param(name) - type: updowncounter - prefix: db.client.connections. - unit: "{connection}" - mapping: - NumActive: - metric: usage - metricAttribute: - state: const(used) - desc: total number of instances currently borrowed from this pool but not yet returned - Returns a negative value if this information is not available. - MaxTotal: - metric: max - desc: the maximum number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. A negative value indicates no limit. diff --git a/examples/redis/spring-boot-non-reactive-2/.tool-versions b/examples/redis/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/redis/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/redis/spring-boot-non-reactive-2/build.gradle b/examples/redis/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index 20e012e2..00000000 --- a/examples/redis/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'redis.clients:jedis:5.2.0' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/redis/spring-boot-non-reactive-2/oats.yaml b/examples/redis/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/redis/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/redis/spring-boot-non-reactive-2/run.sh b/examples/redis/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/redis/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/redis/spring-boot-non-reactive-2/settings.gradle b/examples/redis/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/redis/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/redis/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/redis/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/redis/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/redis/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/redis/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 21cf7afa..00000000 --- a/examples/redis/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import redis.clients.jedis.JedisPooled; - -@RestController -public class StockController { - - private final JedisPooled jedis = new JedisPooled("redis", 6379); - - @GetMapping("/stock") - public String getStock() { - return String.join("", jedis.keys("hel?lo")); - } -} diff --git a/examples/redis/spring-boot-non-reactive-2/src/main/resources/application.yaml b/examples/redis/spring-boot-non-reactive-2/src/main/resources/application.yaml deleted file mode 100644 index 8acd7ee3..00000000 --- a/examples/redis/spring-boot-non-reactive-2/src/main/resources/application.yaml +++ /dev/null @@ -1,3 +0,0 @@ -spring: - redis: - host: redis diff --git a/examples/redis/spring-boot-non-reactive-3/.tool-versions b/examples/redis/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/redis/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/redis/spring-boot-non-reactive-3/build.gradle b/examples/redis/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index a5b51b40..00000000 --- a/examples/redis/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'redis.clients:jedis:5.2.0' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/redis/spring-boot-non-reactive-3/oats.yaml b/examples/redis/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/redis/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/redis/spring-boot-non-reactive-3/run.sh b/examples/redis/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/redis/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/redis/spring-boot-non-reactive-3/settings.gradle b/examples/redis/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/redis/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/redis/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/redis/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/redis/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/redis/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/redis/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 21cf7afa..00000000 --- a/examples/redis/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import redis.clients.jedis.JedisPooled; - -@RestController -public class StockController { - - private final JedisPooled jedis = new JedisPooled("redis", 6379); - - @GetMapping("/stock") - public String getStock() { - return String.join("", jedis.keys("hel?lo")); - } -} diff --git a/examples/redis/spring-boot-non-reactive-3/src/main/resources/application.yaml b/examples/redis/spring-boot-non-reactive-3/src/main/resources/application.yaml deleted file mode 100644 index f896b8c5..00000000 --- a/examples/redis/spring-boot-non-reactive-3/src/main/resources/application.yaml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - data: - redis: - host: redis diff --git a/examples/redis/spring-boot-reactive-2/.tool-versions b/examples/redis/spring-boot-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/redis/spring-boot-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/redis/spring-boot-reactive-2/build.gradle b/examples/redis/spring-boot-reactive-2/build.gradle deleted file mode 100644 index fc03ce70..00000000 --- a/examples/redis/spring-boot-reactive-2/build.gradle +++ /dev/null @@ -1,26 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-data-redis-reactive' - implementation 'redis.clients:jedis:5.2.0' - implementation 'org.springframework.boot:spring-boot-starter-webflux' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/redis/spring-boot-reactive-2/oats.yaml b/examples/redis/spring-boot-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/redis/spring-boot-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/redis/spring-boot-reactive-2/run.sh b/examples/redis/spring-boot-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/redis/spring-boot-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/redis/spring-boot-reactive-2/settings.gradle b/examples/redis/spring-boot-reactive-2/settings.gradle deleted file mode 100644 index 186841af..00000000 --- a/examples/redis/spring-boot-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-2' diff --git a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/Coffee.java b/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/Coffee.java deleted file mode 100644 index 98278c2b..00000000 --- a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/Coffee.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -public class Coffee { - private String id; - private String name; - - public Coffee() {} - - public Coffee(String id, String name) { - this.id = id; - this.name = name; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } -} diff --git a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/CoffeeLoader.java b/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/CoffeeLoader.java deleted file mode 100644 index 502b6662..00000000 --- a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/CoffeeLoader.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import java.util.UUID; -import javax.annotation.PostConstruct; -import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory; -import org.springframework.data.redis.core.ReactiveRedisOperations; -import org.springframework.stereotype.Component; -import reactor.core.publisher.Flux; - -@Component -public class CoffeeLoader { - private final ReactiveRedisConnectionFactory factory; - private final ReactiveRedisOperations coffeeOps; - - public CoffeeLoader( - ReactiveRedisConnectionFactory factory, ReactiveRedisOperations coffeeOps) { - this.factory = factory; - this.coffeeOps = coffeeOps; - } - - @PostConstruct - public void loadData() { - factory - .getReactiveConnection() - .serverCommands() - .flushAll() - .thenMany( - Flux.just("Jet Black Redis", "Darth Redis", "Black Alert Redis") - .map(name -> new Coffee(UUID.randomUUID().toString(), name)) - .flatMap(coffee -> coffeeOps.opsForValue().set(coffee.getId(), coffee))) - .thenMany(coffeeOps.keys("*").flatMap(coffeeOps.opsForValue()::get)) - .subscribe(System.out::println); - } -} diff --git a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/RedisConfiguration.java b/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/RedisConfiguration.java deleted file mode 100644 index f1af9bc2..00000000 --- a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/RedisConfiguration.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory; -import org.springframework.data.redis.core.ReactiveRedisOperations; -import org.springframework.data.redis.core.ReactiveRedisTemplate; -import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; -import org.springframework.data.redis.serializer.RedisSerializationContext; -import org.springframework.data.redis.serializer.StringRedisSerializer; - -@Configuration -public class RedisConfiguration { - @Bean - ReactiveRedisOperations redisOperations(ReactiveRedisConnectionFactory factory) { - Jackson2JsonRedisSerializer serializer = - new Jackson2JsonRedisSerializer<>(Coffee.class); - - RedisSerializationContext.RedisSerializationContextBuilder builder = - RedisSerializationContext.newSerializationContext(new StringRedisSerializer()); - - RedisSerializationContext context = builder.value(serializer).build(); - - return new ReactiveRedisTemplate<>(factory, context); - } -} diff --git a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 2737720c..00000000 --- a/examples/redis/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.redis.core.ReactiveRedisOperations; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - - private final ReactiveRedisOperations coffeeOps; - - public StockController(ReactiveRedisOperations coffeeOps) { - this.coffeeOps = coffeeOps; - } - - @GetMapping("/stock") - public Mono getStock() { - return coffeeOps.keys("*").flatMap(coffeeOps.opsForValue()::get).next().map(Coffee::getName); - } -} diff --git a/examples/redis/spring-boot-reactive-2/src/main/resources/application.yaml b/examples/redis/spring-boot-reactive-2/src/main/resources/application.yaml deleted file mode 100644 index 8acd7ee3..00000000 --- a/examples/redis/spring-boot-reactive-2/src/main/resources/application.yaml +++ /dev/null @@ -1,3 +0,0 @@ -spring: - redis: - host: redis diff --git a/examples/redis/spring-boot-reactive-3/.tool-versions b/examples/redis/spring-boot-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/redis/spring-boot-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/redis/spring-boot-reactive-3/build.gradle b/examples/redis/spring-boot-reactive-3/build.gradle deleted file mode 100644 index 8c9db7ac..00000000 --- a/examples/redis/spring-boot-reactive-3/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-data-redis-reactive' - implementation 'redis.clients:jedis:5.2.0' - implementation 'org.springframework.boot:spring-boot-starter-webflux' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/redis/spring-boot-reactive-3/oats.yaml b/examples/redis/spring-boot-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/redis/spring-boot-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/redis/spring-boot-reactive-3/run.sh b/examples/redis/spring-boot-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/redis/spring-boot-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/redis/spring-boot-reactive-3/settings.gradle b/examples/redis/spring-boot-reactive-3/settings.gradle deleted file mode 100644 index 2bfc2706..00000000 --- a/examples/redis/spring-boot-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-3' diff --git a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/Coffee.java b/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/Coffee.java deleted file mode 100644 index 98278c2b..00000000 --- a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/Coffee.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -public class Coffee { - private String id; - private String name; - - public Coffee() {} - - public Coffee(String id, String name) { - this.id = id; - this.name = name; - } - - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } -} diff --git a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/CoffeeLoader.java b/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/CoffeeLoader.java deleted file mode 100644 index 1633e3ed..00000000 --- a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/CoffeeLoader.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import jakarta.annotation.PostConstruct; -import java.util.UUID; -import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory; -import org.springframework.data.redis.core.ReactiveRedisOperations; -import org.springframework.stereotype.Component; -import reactor.core.publisher.Flux; - -@Component -public class CoffeeLoader { - private final ReactiveRedisConnectionFactory factory; - private final ReactiveRedisOperations coffeeOps; - - public CoffeeLoader( - ReactiveRedisConnectionFactory factory, ReactiveRedisOperations coffeeOps) { - this.factory = factory; - this.coffeeOps = coffeeOps; - } - - @PostConstruct - public void loadData() { - factory - .getReactiveConnection() - .serverCommands() - .flushAll() - .thenMany( - Flux.just("Jet Black Redis", "Darth Redis", "Black Alert Redis") - .map(name -> new Coffee(UUID.randomUUID().toString(), name)) - .flatMap(coffee -> coffeeOps.opsForValue().set(coffee.getId(), coffee))) - .thenMany(coffeeOps.keys("*").flatMap(coffeeOps.opsForValue()::get)) - .subscribe(System.out::println); - } -} diff --git a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/RedisConfiguration.java b/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/RedisConfiguration.java deleted file mode 100644 index f1af9bc2..00000000 --- a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/RedisConfiguration.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory; -import org.springframework.data.redis.core.ReactiveRedisOperations; -import org.springframework.data.redis.core.ReactiveRedisTemplate; -import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; -import org.springframework.data.redis.serializer.RedisSerializationContext; -import org.springframework.data.redis.serializer.StringRedisSerializer; - -@Configuration -public class RedisConfiguration { - @Bean - ReactiveRedisOperations redisOperations(ReactiveRedisConnectionFactory factory) { - Jackson2JsonRedisSerializer serializer = - new Jackson2JsonRedisSerializer<>(Coffee.class); - - RedisSerializationContext.RedisSerializationContextBuilder builder = - RedisSerializationContext.newSerializationContext(new StringRedisSerializer()); - - RedisSerializationContext context = builder.value(serializer).build(); - - return new ReactiveRedisTemplate<>(factory, context); - } -} diff --git a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 2737720c..00000000 --- a/examples/redis/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.data.redis.core.ReactiveRedisOperations; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - - private final ReactiveRedisOperations coffeeOps; - - public StockController(ReactiveRedisOperations coffeeOps) { - this.coffeeOps = coffeeOps; - } - - @GetMapping("/stock") - public Mono getStock() { - return coffeeOps.keys("*").flatMap(coffeeOps.opsForValue()::get).next().map(Coffee::getName); - } -} diff --git a/examples/redis/spring-boot-reactive-3/src/main/resources/application.yaml b/examples/redis/spring-boot-reactive-3/src/main/resources/application.yaml deleted file mode 100644 index f896b8c5..00000000 --- a/examples/redis/spring-boot-reactive-3/src/main/resources/application.yaml +++ /dev/null @@ -1,4 +0,0 @@ -spring: - data: - redis: - host: redis diff --git a/examples/run-example.sh b/examples/run-example.sh deleted file mode 100755 index e57f3df9..00000000 --- a/examples/run-example.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash - -scriptDir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - -while [[ $# -gt 0 ]]; do - case $1 in - --includeAllInstrumentations) - echo "including all instrumentations" - includeAllInstrumentations=true - shift - ;; - -a|--attachDebugger) - echo "attaching debugger on port 5000" - attachDebugger=true - shift - ;; - -l|--debugLogging) - echo "logging all telemetry to stdout" - debugLogging=true - shift - ;; - -m|--debugInstrumentations) - echo "show active instrumentations instrumentations" - debugInstrumentations=true - shift - ;; - *) - echo "Unknown option $1" - exit 1 - ;; - esac -done - -"$scriptDir"/start-grafana-agent.sh - -RELEASE=2.9.0 -agent="grafana-opentelemetry-java-$RELEASE.jar" -agentPath="$scriptDir/$agent" - -if [[ ! -f "$agentPath" ]]; then - echo "Downloading $agent" - # this still needs a token until the project is public - curl -Lo "$agentPath" https://github.com/grafana/grafana-opentelemetry-java/releases/download/v$RELEASE/grafana-opentelemetry-java.jar -fi - -jvm_args=$(cat <<-END --javaagent:$agentPath -Dotel.resource.attributes=deployment.environment=production,service.namespace=shop,service.version=1.1 -Dotel.metric.export.interval=10000 -END -) - -if [[ $attachDebugger == "true" ]]; then - address="*:5005" - if [[ $(java -version 2>&1) =~ 1\.8\.0 ]]; then - address="5005" - fi - jvm_args="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=$address $jvm_args" -fi -if [[ $includeAllInstrumentations != "true" ]]; then - jvm_args="$jvm_args -Dgrafana.otel.use-tested-instrumentations=true" -fi -if [[ $debugInstrumentations == "true" ]]; then - jvm_args="$jvm_args -Dotel.javaagent.debug=true" -fi -if [[ $debugLogging == "true" ]]; then - jvm_args="$jvm_args -Dotel.logs.exporter=otlp,console -Dotel.metrics.exporter=otlp,console -Dotel.traces.exporter=otlp,console" -fi - -echo "Used JVM args: $jvm_args" - -"$scriptDir"/../gradlew bootRun -PjvmArgs="$jvm_args" diff --git a/examples/start-grafana-agent.sh b/examples/start-grafana-agent.sh deleted file mode 100755 index f751977e..00000000 --- a/examples/start-grafana-agent.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env bash - -case "$OSTYPE" in - linux*) - if ! systemctl status grafana-agent-flow > /dev/null; then - echo "starting grafana-agent-flow" - sudo systemctl start grafana-agent-flow - fi - ;; - *) - echo "only works for Linux currently - please start grafana-agent-flow manually" - ;; -esac diff --git a/examples/undertow/README.md b/examples/undertow/README.md deleted file mode 100644 index f538184f..00000000 --- a/examples/undertow/README.md +++ /dev/null @@ -1,7 +0,0 @@ -# Overview - -Example projects for using Undertow instead of Tomcat. - -## Running the examples - -See the [examples README](../README.md#running-the-examples). diff --git a/examples/undertow/oats-template.yaml b/examples/undertow/oats-template.yaml deleted file mode 100644 index 5bf23788..00000000 --- a/examples/undertow/oats-template.yaml +++ /dev/null @@ -1,11 +0,0 @@ -docker-compose: - generator: java -input: - - path: /stock -expected: - traces: - - traceql: '{ kind = server }' - spans: - - name: 'GET /stock' - attributes: - otel.library.name: regex:io.opentelemetry.undertow-.* diff --git a/examples/undertow/spring-boot-non-reactive-2/.tool-versions b/examples/undertow/spring-boot-non-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/undertow/spring-boot-non-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/undertow/spring-boot-non-reactive-2/build.gradle b/examples/undertow/spring-boot-non-reactive-2/build.gradle deleted file mode 100644 index 4d81895a..00000000 --- a/examples/undertow/spring-boot-non-reactive-2/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation "org.springframework.boot:spring-boot-starter-undertow" -} - -configurations { - all*.exclude module: 'spring-boot-starter-tomcat' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/undertow/spring-boot-non-reactive-2/oats.yaml b/examples/undertow/spring-boot-non-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/undertow/spring-boot-non-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/undertow/spring-boot-non-reactive-2/run.sh b/examples/undertow/spring-boot-non-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/undertow/spring-boot-non-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/undertow/spring-boot-non-reactive-2/settings.gradle b/examples/undertow/spring-boot-non-reactive-2/settings.gradle deleted file mode 100644 index 84dcd8f6..00000000 --- a/examples/undertow/spring-boot-non-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-2' diff --git a/examples/undertow/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/undertow/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/undertow/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/undertow/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/undertow/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index b13dcda1..00000000 --- a/examples/undertow/spring-boot-non-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - - @GetMapping("/stock") - public String getStock() { - return "hello LGTM"; - } -} diff --git a/examples/undertow/spring-boot-non-reactive-3/.tool-versions b/examples/undertow/spring-boot-non-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/undertow/spring-boot-non-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/undertow/spring-boot-non-reactive-3/build.gradle b/examples/undertow/spring-boot-non-reactive-3/build.gradle deleted file mode 100644 index 48898cc9..00000000 --- a/examples/undertow/spring-boot-non-reactive-3/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation "org.springframework.boot:spring-boot-starter-undertow" -} - -configurations { - all*.exclude module: 'spring-boot-starter-tomcat' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/undertow/spring-boot-non-reactive-3/oats.yaml b/examples/undertow/spring-boot-non-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/undertow/spring-boot-non-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/undertow/spring-boot-non-reactive-3/run.sh b/examples/undertow/spring-boot-non-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/undertow/spring-boot-non-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/undertow/spring-boot-non-reactive-3/settings.gradle b/examples/undertow/spring-boot-non-reactive-3/settings.gradle deleted file mode 100644 index d65def88..00000000 --- a/examples/undertow/spring-boot-non-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-non-reactive-3' diff --git a/examples/undertow/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/undertow/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/undertow/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/undertow/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/undertow/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 0be1547d..00000000 --- a/examples/undertow/spring-boot-non-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class StockController { - @GetMapping("/stock") - public String getStock() { - return "hello LGTM"; - } -} diff --git a/examples/undertow/spring-boot-reactive-2/.tool-versions b/examples/undertow/spring-boot-reactive-2/.tool-versions deleted file mode 100644 index 7ce33d2e..00000000 --- a/examples/undertow/spring-boot-reactive-2/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-8.0.372+7 diff --git a/examples/undertow/spring-boot-reactive-2/build.gradle b/examples/undertow/spring-boot-reactive-2/build.gradle deleted file mode 100644 index 4d81895a..00000000 --- a/examples/undertow/spring-boot-reactive-2/build.gradle +++ /dev/null @@ -1,29 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '2.7.18' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -sourceCompatibility = '1.8' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation "org.springframework.boot:spring-boot-starter-undertow" -} - -configurations { - all*.exclude module: 'spring-boot-starter-tomcat' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/undertow/spring-boot-reactive-2/oats.yaml b/examples/undertow/spring-boot-reactive-2/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/undertow/spring-boot-reactive-2/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/undertow/spring-boot-reactive-2/run.sh b/examples/undertow/spring-boot-reactive-2/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/undertow/spring-boot-reactive-2/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/undertow/spring-boot-reactive-2/settings.gradle b/examples/undertow/spring-boot-reactive-2/settings.gradle deleted file mode 100644 index 186841af..00000000 --- a/examples/undertow/spring-boot-reactive-2/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-2' diff --git a/examples/undertow/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/undertow/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/undertow/spring-boot-reactive-2/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/undertow/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java b/examples/undertow/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 404a3dc4..00000000 --- a/examples/undertow/spring-boot-reactive-2/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - @GetMapping("/stock") - public Mono getStock() { - return Mono.just("hello LGTM"); - } -} diff --git a/examples/undertow/spring-boot-reactive-3/.tool-versions b/examples/undertow/spring-boot-reactive-3/.tool-versions deleted file mode 100644 index 390fc5f3..00000000 --- a/examples/undertow/spring-boot-reactive-3/.tool-versions +++ /dev/null @@ -1 +0,0 @@ -java temurin-21.0.0+35.0.LTS diff --git a/examples/undertow/spring-boot-reactive-3/build.gradle b/examples/undertow/spring-boot-reactive-3/build.gradle deleted file mode 100644 index 3a12d6f5..00000000 --- a/examples/undertow/spring-boot-reactive-3/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -plugins { - id 'java' - id 'org.springframework.boot' version '3.3.4' - id 'io.spring.dependency-management' version '1.1.6' -} - -group = 'com.grafana' -version = '0.0.1-SNAPSHOT' -compileJava { - options.release.set(17) -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation "org.springframework.boot:spring-boot-starter-undertow" -} - -configurations { - all*.exclude module: 'spring-boot-starter-tomcat' -} - -bootRun { - if (project.hasProperty('jvmArgs')) { - jvmArgs = (project.jvmArgs.split("\\s+") as List) - } -} diff --git a/examples/undertow/spring-boot-reactive-3/oats.yaml b/examples/undertow/spring-boot-reactive-3/oats.yaml deleted file mode 100644 index 4d289871..00000000 --- a/examples/undertow/spring-boot-reactive-3/oats.yaml +++ /dev/null @@ -1,2 +0,0 @@ -include: - - ../oats-template.yaml diff --git a/examples/undertow/spring-boot-reactive-3/run.sh b/examples/undertow/spring-boot-reactive-3/run.sh deleted file mode 100755 index 3b730dee..00000000 --- a/examples/undertow/spring-boot-reactive-3/run.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -../../run-example.sh "$@" diff --git a/examples/undertow/spring-boot-reactive-3/settings.gradle b/examples/undertow/spring-boot-reactive-3/settings.gradle deleted file mode 100644 index 2bfc2706..00000000 --- a/examples/undertow/spring-boot-reactive-3/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = 'spring-boot-reactive-3' diff --git a/examples/undertow/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java b/examples/undertow/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java deleted file mode 100644 index 700bbdda..00000000 --- a/examples/undertow/spring-boot-reactive-3/src/main/java/com/grafana/demo/SpringBootDemoApplication.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; - -@SpringBootApplication -public class SpringBootDemoApplication { - - public static void main(String[] args) { - SpringApplication.run(SpringBootDemoApplication.class, args); - } -} diff --git a/examples/undertow/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java b/examples/undertow/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java deleted file mode 100644 index 404a3dc4..00000000 --- a/examples/undertow/spring-boot-reactive-3/src/main/java/com/grafana/demo/StockController.java +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright Grafana Labs - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.grafana.demo; - -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import reactor.core.publisher.Mono; - -@RestController -public class StockController { - @GetMapping("/stock") - public Mono getStock() { - return Mono.just("hello LGTM"); - } -} diff --git a/scripts/run-acceptance-tests.sh b/scripts/run-acceptance-tests.sh deleted file mode 100755 index 151783f7..00000000 --- a/scripts/run-acceptance-tests.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -cd oats/yaml -go install github.com/onsi/ginkgo/v2/ginkgo -export TESTCASE_SKIP_BUILD=true -export TESTCASE_TIMEOUT=5m -export TESTCASE_BASE_PATH=../../examples -ginkgo -r # is parallel causing problems? -p diff --git a/settings.gradle b/settings.gradle index 0bc8f130..ca2f945d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -12,47 +12,4 @@ include ":custom" include ":smoke-tests" include ":testing:agent-for-testing" -include ":examples:jdbc:spring-boot-non-reactive-2" -include ":examples:jdbc:spring-boot-non-reactive-3" -include ":examples:jdbc:spring-boot-reactive-2" -include ":examples:jdbc:spring-boot-reactive-3" - -include ":examples:jms:spring-boot-non-reactive-2" -include ":examples:jms:spring-boot-non-reactive-3" -include ":examples:jms:spring-boot-reactive-2" -include ":examples:jms:spring-boot-reactive-3" - -include ":examples:redis:spring-boot-non-reactive-2" -include ":examples:redis:spring-boot-non-reactive-3" -include ":examples:redis:spring-boot-reactive-2" -include ":examples:redis:spring-boot-reactive-3" - -include ":examples:kafka:spring-boot-non-reactive-2" -include ":examples:kafka:spring-boot-non-reactive-3" -include ":examples:kafka:spring-boot-reactive-2" -include ":examples:kafka:spring-boot-reactive-3" - -include "examples:mongodb:spring-boot-non-reactive-2" -include "examples:mongodb:spring-boot-non-reactive-3" -include "examples:mongodb:spring-boot-reactive-2" -include "examples:mongodb:spring-boot-reactive-3" - -include "examples:jetty:spring-boot-non-reactive-2" -include "examples:jetty:spring-boot-non-reactive-3" -include "examples:jetty:spring-boot-reactive-2" -include "examples:jetty:spring-boot-reactive-3" - -include "examples:undertow:spring-boot-non-reactive-2" -include "examples:undertow:spring-boot-non-reactive-3" -include "examples:undertow:spring-boot-reactive-2" -include "examples:undertow:spring-boot-reactive-3" - -include "examples:logback:spring-boot-non-reactive-2" -include "examples:logback:spring-boot-non-reactive-3" - -include "examples:log4j:spring-boot-non-reactive-2" -include "examples:log4j:spring-boot-non-reactive-3" - -include "examples:manual:spring-boot-non-reactive-2" -include "examples:manual:spring-boot-non-reactive-3"