https://github.com/orange-cloudfoundry/mongodb-probe
sample app to test mongodb service and otel support
https://github.com/orange-cloudfoundry/mongodb-probe
Last synced: about 1 year ago
JSON representation
sample app to test mongodb service and otel support
- Host: GitHub
- URL: https://github.com/orange-cloudfoundry/mongodb-probe
- Owner: orange-cloudfoundry
- Created: 2025-03-04T09:49:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-29T22:06:35.000Z (about 1 year ago)
- Last Synced: 2025-03-29T22:25:53.850Z (about 1 year ago)
- Language: Java
- Size: 87.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MongoDb probe app

## Description
Sample mongodb app.
Based on spring boot + mongodb starter + opentelemetry starter.
Packaged as:
- a cloudfoundry compatible jar
- an OCI image
- a helm chart for convenient k8s deployment of the image with adapter config (mongodb uri, otel endpoint)
## references:
- https://github.com/kokuwaio/helm-maven-plugin
- https://opentelemetry.io/blog/2024/spring-starter-stable/
- https://opentelemetry.io/docs/languages/java/configuration/
## basic tests
chart values.yaml:
```
mongodb:
uri: mongodb://databaseAdmin:yyyy.zzzz:27017,rs0-1-2e385b67-a1c9-4aa0-910d-b25dc99e9c5d.zzzz:27017,rs0-2-2e385b67-a1c9-4aa0-910d-b25dc99e9c5d.zzzz:27017/admin?replicaSet=rs0
tlsSecretName: mysecret
tlsSecretCaKey: ca.crt
otlp:
serviceName: probe-for-mongodb
tracing:
endpoint: http://jaeger-collector-303ada4c-4478-49dd-b427-8c482bfc17b8.zzzz:443
sampling:
probability: 1.0
```
install OCI chart:
```
helm install mongodb-probe oci://ghcr.io/orange-cloudfoundry/mongodb-probe/mongodb-probe -f ./mongodb-probe-values.yaml
```
testing probe REST API:
```
curl -X POST http://localhost:8080/api/persons -H 'Content-type:application/json' -d '{"name": "titi", "age": "30"}'
curl -X POST http://localhost:8080/api/persons -H 'Content-type:application/json' -d '{"name": "toto", "age": "35"}'
curl http://localhost:8080/api/persons | jq .
```