{"id":21228774,"url":"https://github.com/hypertrace/javaagent","last_synced_at":"2025-07-10T15:31:23.734Z","repository":{"id":38190740,"uuid":"302314733","full_name":"hypertrace/javaagent","owner":"hypertrace","description":"Hypertrace OpenTelemetry Java agent with payload/body and headers data capture.","archived":false,"fork":false,"pushed_at":"2024-09-23T12:33:29.000Z","size":1721,"stargazers_count":34,"open_issues_count":38,"forks_count":15,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-15T22:40:44.674Z","etag":null,"topics":["apm-agent","apm-instrumentation","javaagent","opentelemetry","opentelemetry-java-agent","tracing"],"latest_commit_sha":null,"homepage":"","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/hypertrace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2020-10-08T11:12:36.000Z","updated_at":"2024-10-23T07:27:23.000Z","dependencies_parsed_at":"2023-02-18T04:01:25.043Z","dependency_job_id":"ab930b70-2deb-4c56-888c-e70d110e9bb6","html_url":"https://github.com/hypertrace/javaagent","commit_stats":null,"previous_names":[],"tags_count":90,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypertrace%2Fjavaagent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypertrace%2Fjavaagent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypertrace%2Fjavaagent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypertrace%2Fjavaagent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hypertrace","download_url":"https://codeload.github.com/hypertrace/javaagent/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225644434,"owners_count":17501525,"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":["apm-agent","apm-instrumentation","javaagent","opentelemetry","opentelemetry-java-agent","tracing"],"created_at":"2024-11-20T23:21:47.998Z","updated_at":"2024-11-20T23:21:48.642Z","avatar_url":"https://github.com/hypertrace.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hypertrace OpenTelemetry Java agent\n\nHypertrace distribution of [OpenTelemetry Java agent](https://github.com/open-telemetry/opentelemetry-java-instrumentation).\n\nThis agent supports [these frameworks](https://github.com/open-telemetry/opentelemetry-java-instrumentation#supported-java-libraries-and-frameworks)\nand adds following capabilities:\n* capture request and response headers\n* capture request and response bodies\n* server request headers/bodies evaluation in agent filter that can result in request blocking.\n    The filter implementation will be pluggable.\n\nList of supported frameworks with additional capabilities:\n| Library/Framework                                                                                      | Versions        |\n|--------------------------------------------------------------------------------------------------------|-----------------|\n| [Apache HttpAsyncClient](https://hc.apache.org/index.html)                                             | 4.1+            |\n| [Apache HttpClient](https://hc.apache.org/index.html)                                                  | 4.0+            |\n| [gRPC](https://github.com/grpc/grpc-java)                                                              | 1.6+            |\n| [JAX-RS Client](https://javaee.github.io/javaee-spec/javadocs/javax/ws/rs/client/package-summary.html) | 2.0+            |\n| [Micronaut](https://micronaut.io/)  (basic support via Netty)                                          | 1.0+            |\n| [Netty](https://github.com/netty/netty)                                                                | 4.0+            |\n| [OkHttp](https://github.com/square/okhttp/)                                                            | 3.0+            |\n| [Servlet](https://javaee.github.io/javaee-spec/javadocs/javax/servlet/package-summary.html)            | 3.0+            |\n| [Spark Web Framework](https://github.com/perwendel/spark)                                              | 2.3+            |\n| [Spring Webflux](https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/reactive/package-summary.html)       | 5.0+            |\n| [Vert.x](https://vertx.io)                                                                             | 3.0+ (4 not supported yet) |\n| [Struts](https://struts.apache.org/)                                                                   | 2.3+            |\n\n### Adding custom filter implementation\n\nCustom filter implementations can be added via `FilterProvider` SPI (Java service loader).\nThe providers can be disabled at startup via `ht.filter.provider.\u003cprovider-class-name\u003e.disabled=true`.\n\n## Build\n\n```bash\nmake init-submodules build\n```\n\nThe final artifact is in `javaagent/build/libs/hypertrace-agent-\u003cversion\u003e-all.jar`\n\n## Run \u0026 Configure\n\nDownload the [latest version](https://github.com/hypertrace/javaagent/releases/latest/download/hypertrace-agent-all.jar).\n\n```bash\nHT_REPORTING_ENDPOINT=http://localhost:4317 java -javaagent:javaagent/build/libs/hypertrace-agent-\u003cversion\u003e-all.jar -jar app.jar\n```\n\nBy default the agent uses Otlp exporter.\n\nThe configuration precedence order \n1. OpenTelemetry Agent's trace config file `OTEL_TRACE_CONFIG`/`otel.trace.config`\n2. OpenTelemetry system properties and env variables\n3. Hypertrace configuration with the following precedence order:\n   1. system properties \n   2. environment variables, TODO add link to agent-config repo\n   3. [configuration file](./example-config.yaml), specified `HT_CONFIG_FILE=example-config.yaml`\n\n### Disable instrumentation at startup\n\nInstrumentations can be disabled by `-Dotel.instrumentation.\u003cinstrumentation-name\u003e.enabled=false`.\n\nThe following instrumentation names disable only Hypertrace instrumentations, not core OpenTelemetry:\n\n* `ht` - all Hypertrace instrumentations\n* `servlet-ht` - Servlet, Spark Web\n* `okhttp-ht` - Okhttp\n* `grpc-ht` - gRPC\n\nThe Hypertrace instrumentations use also the core OpenTelemetry instrumentation names so for example\n`-Dotel.instrumentation.servlet.enabled=false` disables all servlet instrumentations including core\nOpenTelemetry and Hypertrace.\n\n## Test\n\nTests use docker via Testcontainers.org.\n\nWhen running tests from IDE set `SMOKETEST_JAVAAGENT_PATH` env variable.\n\n```bash\nmake test\n```\n\n### Further Reference\n\nRead more in our 'Introducing Hypertrace [Java Agent](https://blog.hypertrace.org/blog/introducing-hypertrace-java-agent/)' blog post. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypertrace%2Fjavaagent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypertrace%2Fjavaagent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypertrace%2Fjavaagent/lists"}