{"id":20314896,"url":"https://github.com/catchpoint/tracing.examples-kubernetes-java","last_synced_at":"2025-04-11T17:21:25.003Z","repository":{"id":226079933,"uuid":"766066455","full_name":"catchpoint/Tracing.examples-kubernetes-java","owner":"catchpoint","description":"Catchpoint Tracing examples for Java applications deploying to Kubernetes","archived":false,"fork":false,"pushed_at":"2024-08-07T08:22:05.000Z","size":151,"stargazers_count":23,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-25T13:11:36.461Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catchpoint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-02T08:41:44.000Z","updated_at":"2024-03-19T14:44:01.000Z","dependencies_parsed_at":"2024-08-05T14:37:53.553Z","dependency_job_id":null,"html_url":"https://github.com/catchpoint/Tracing.examples-kubernetes-java","commit_stats":null,"previous_names":["catchpoint/tracing.examples-kubernetes-java"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catchpoint%2FTracing.examples-kubernetes-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catchpoint%2FTracing.examples-kubernetes-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catchpoint%2FTracing.examples-kubernetes-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catchpoint%2FTracing.examples-kubernetes-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catchpoint","download_url":"https://codeload.github.com/catchpoint/Tracing.examples-kubernetes-java/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248447609,"owners_count":21105140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T18:17:07.587Z","updated_at":"2025-04-11T17:21:24.982Z","avatar_url":"https://github.com/catchpoint.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Catchpoint Tracing Examples - Kubernetes/Java\n\n## Pre-Requirements\n1. **JDK** (`1.8+`)\n2. **Maven** (`3.x`)\n3. Please make sure **Docker Desktop** is installed and **Kubernetes** is activated. \n   Read [this](https://birthday.play-with-docker.com/kubernetes-docker-desktop) for details.\n4. Please make sure **Kubernetes CLI** (`kubernetes-cli`/`kubectl`) is installed. \n   See [here](https://kubernetes.io/docs/tasks/tools/) for details.\n   \n## Setup with OpenTelemetry From the Beginning\nThis setup shows how you can install OpenTelemetry resources into Kubernetes first and deploy application later then.\nSo deployed applications will be auto instrumented.\n\n### Setup OpenTelemetry Resources in Kubernetes\n1. Replace `\u003cCATCHPOINT-TRACING-API-KEY\u003e` with your Catchpoint Tracing API key in `otel/collector.yaml` file.\n2. Then run the setup script which installs **OpenTelemetry Operator** and **OpenTelemetry Instrumentation CR** (Custom Resource) into Kubernetes:\n   ```bash\n   ./otel/setup-otel.sh\n   ```\n\n### Deploy the Applications into Kubernetes with OTEL\n1. Run the deployment script which deploys database and applications **with** OpenTelemetry configuration into Kubernetes:\n\t```bash\n\t./apps/deploy-apps-with-otel-conf.sh\n\t```\n2. Wait until all services are activated.\n3. Go to http://localhost:30000.\n\n## Install OpenTelemetry After Setup\n\n### Deploy the Applications into Kubernetes without OTEL\n1. Run the deployment script which deploys database and applications **without** OpenTelemetry configuration into Kubernetes:\n   ```bash\n   ./apps/deploy-apps.sh\n   ```\n2. Wait until all services are activated.\n3. Go to http://localhost:30000.\n\n### Setup OpenTelemetry Resources in Kubernetes\n1. Replace `\u003cCATCHPOINT-TRACING-API-KEY\u003e` with your Catchpoint Tracing API key in `otel/collector.yaml` file.\n2. Then run the setup script which installs **OpenTelemetry Operator** and **OpenTelemetry Instrumentation CR** (Custom Resource) into Kubernetes:\n   ```bash\n   ./otel/setup-otel.sh\n   ```\n   \n### Patch Services to be Traced by OpenTelemetry\n1. Run the patch script which updates application deployments by adding **OpenTelemetry Auto Instrumentation Annotation** (`instrumentation.opentelemetry.io/inject-java`) to the services to be traced:\n   ```bash\n   ./apps/patch-apps-with-otel-conf.sh\n   ```\n2. Wait until all services are restarted.\n3. Go to http://localhost:30000.\n\n## Destroy\n\n### Destroy the Deployment of Applications\n1. Run the application destroy script which deletes applications and database deployed to Kubernetes:\n   ```bash\n   ./apps/destroy-apps.sh\n   ```\n2. Wait until all resources are deleted.\n\n### Destroy the Resources of OpenTelemetry\n1. Run the OpenTelemetry destroy script for deleting the OpenTelemetry resources (operator and instrumentation CR), \n   ```bash\n   ./otel/destroy-otel.sh\n   ```\n2. Wait until all resources are deleted.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatchpoint%2Ftracing.examples-kubernetes-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatchpoint%2Ftracing.examples-kubernetes-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatchpoint%2Ftracing.examples-kubernetes-java/lists"}