{"id":26057664,"url":"https://github.com/wavefronthq/wavefront-runtime-sdk-jvm","last_synced_at":"2025-04-11T05:06:51.149Z","repository":{"id":34148493,"uuid":"152801042","full_name":"wavefrontHQ/wavefront-runtime-sdk-jvm","owner":"wavefrontHQ","description":"Collect JVM Metrics","archived":false,"fork":false,"pushed_at":"2024-03-12T04:46:39.000Z","size":141,"stargazers_count":2,"open_issues_count":4,"forks_count":7,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-11T05:06:44.690Z","etag":null,"topics":["java","jvm-metrics"],"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/wavefrontHQ.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}},"created_at":"2018-10-12T19:53:46.000Z","updated_at":"2023-06-21T02:36:51.000Z","dependencies_parsed_at":"2023-12-12T20:05:25.931Z","dependency_job_id":"bc95ad58-0315-4c72-89a7-10ecacdfb17c","html_url":"https://github.com/wavefrontHQ/wavefront-runtime-sdk-jvm","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavefrontHQ%2Fwavefront-runtime-sdk-jvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavefrontHQ%2Fwavefront-runtime-sdk-jvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavefrontHQ%2Fwavefront-runtime-sdk-jvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wavefrontHQ%2Fwavefront-runtime-sdk-jvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wavefrontHQ","download_url":"https://codeload.github.com/wavefrontHQ/wavefront-runtime-sdk-jvm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345265,"owners_count":21088244,"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":["java","jvm-metrics"],"created_at":"2025-03-08T11:58:14.984Z","updated_at":"2025-04-11T05:06:51.081Z","avatar_url":"https://github.com/wavefrontHQ.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wavefront JVM SDK [![build status][ci-img]][ci] [![Released Version][maven-img]][maven]\n\nThe Wavefront by VMware JVM SDK provides out of the box metrics for the Java Virtual Machine (JVM) that runs your Java application. You can analyze the data in [Wavefront](https://www.wavefront.com) to better understand how your application is performing in production.\n\n## Maven\nIf you are using Maven, add the following maven dependency to your pom.xml:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.wavefront\u003c/groupId\u003e\n    \u003cartifactId\u003ewavefront-runtime-sdk-jvm\u003c/artifactId\u003e\n    \u003cversion\u003e$releaseVersion\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nReplace `$releaseVersion` with the latest version available on [maven](http://search.maven.org/#search%7Cga%7C1%7Cwavefront-runtime-sdk-jvm).\n\n## Set Up a WavefrontJvmReporter\nThis SDK provides a `WavefrontJvmReporter` for collecting JVM metrics.\n\nTo create a `WavefrontJvmReporter`:\n1. Create an `ApplicationTags` instance, which specifies metadata metadata about your application.\n2. Create a `WavefrontSender` for sending data to Wavefront.\n3. Create a `WavefrontJvmReporter` instance.\n\nFor the details of each step, see the sections below.\n\n### 1. Set Up Application Tags\n\nThe application tags determine the metadata (point tags) that are included with the JVM metrics reported to Wavefront. These tags enable you to filter and query the reported JVM metrics in Wavefront.\n\nYou encapsulate application tags in an `ApplicationTags` object.\nSee [Instantiating ApplicationTags](https://github.com/wavefrontHQ/wavefront-sdk-doc-sources/blob/master/java/applicationtags.md#application-tags) for details.\n\n### 2. Set Up a WavefrontSender\n\nA `WavefrontSender` object implements the low-level interface for sending data to Wavefront. You can choose to send data using either the [Wavefront proxy](https://docs.wavefront.com/proxies.html) or [direct ingestion](https://docs.wavefront.com/direct_ingestion.html).\n\n* If you have already set up a `WavefrontSender` for another SDK that will run in the same JVM, use that one.  (For details about sharing a `WavefrontSender` instance, see [Share a WavefrontSender](https://github.com/wavefrontHQ/wavefront-sdk-doc-sources/blob/master/java/wavefrontsender.md#share-a-wavefrontsender).)\n\n* Otherwise, follow the steps in [Set Up a WavefrontSender](https://github.com/wavefrontHQ/wavefront-sdk-doc-sources/blob/master/java/wavefrontsender.md#wavefrontsender).\n\n\n### 3. Create the WavefrontJvmReporter\nA `WavefrontJvmReporter` reports metrics to Wavefront.\n\nTo build a `WavefrontJvmReporter`, you must specify:\n* An `ApplicationTags` object.\n* A `WavefrontSender` object.\n\nYou can optionally specify:\n* A nondefault source for the reported data. If you omit the source, the host name is automatically used. The source should be identical across all the Wavefront SDKs running in the same JVM.\n* A nondefault reporting interval, which controls how often data is reported to the `WavefrontSender`. The reporting interval determines the timestamps on the data sent to Wavefront. If you omit the reporting interval, data is reported once a minute.\n\n```java\n\nApplicationTags applicationTags = buildTags(); // pseudocode; see above\nWavefrontSender wavefrontSender = buildWavefrontSender(); // pseudocode; see above\n\n// Create WavefrontJvmReporter.Builder using applicationTags\nWavefrontJvmReporter.Builder wfJvmReporterBuilder = new WavefrontJvmReporter.Builder(applicationTags);\n\n// Optionally set the source name to \"mySource\" for your metrics and histograms.\n// Omit this statement to use the host name.\nwfJvmReporterBuilder.withSource(\"mySource\");\n\n// Optionally change the reporting interval to 30 seconds. Default is 1 minute.\nwfJvmReporterBuilder.reportingIntervalSeconds(30);\n\n// Create a WavefrontJvmReporter with the WavefronSender.\nWavefrontJvmReporter wfJvmReporter = wfJvmReporterBuilder.build(wavefrontSender);\n```\n\n## Start the WavefrontJvmReporter\nYou start the `WavefrontJvmReporter` explicitly to start reporting JVM metrics.\n\n```java\n// Start the reporter\nwfJvmReporter.start();\n```\n\n## Stop the WavefrontJvmReporter\nYou must explicitly stop the `WavefrontJvmReporter` before shutting down your JVM.\n\n```java\n// Stop the reporter\nwfJvmReporter.stop();\n```\n\n## JVM metrics\n\nYou can go to Wavefront and see the JVM metrics with the prefix `app-agent.jvm.*`.\n\n[ci-img]: https://travis-ci.com/wavefrontHQ/wavefront-runtime-sdk-jvm.svg?branch=master\n[ci]: https://travis-ci.com/wavefrontHQ/wavefront-runtime-sdk-jvm\n[maven-img]: https://img.shields.io/maven-central/v/com.wavefront/wavefront-runtime-sdk-jvm.svg?maxAge=604800\n[maven]: http://search.maven.org/#search%7Cga%7C1%7Cwavefront-runtime-sdk-jvm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavefronthq%2Fwavefront-runtime-sdk-jvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwavefronthq%2Fwavefront-runtime-sdk-jvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwavefronthq%2Fwavefront-runtime-sdk-jvm/lists"}