metrics-agent | JVM agent based metrics with Prometheus and Dropwizard | Runtime Evironment library

 by   willfleury Java Version: v0.0.5 License: Apache-2.0

kandi X-RAY | metrics-agent Summary

kandi X-RAY | metrics-agent Summary

metrics-agent is a Java library typically used in Server, Runtime Evironment, Prometheus applications. metrics-agent has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.

JVM agent based metrics with Prometheus and Dropwizard support (Java, Scala, Clojure, Kotlin, etc)

            kandi-support Support

              metrics-agent has a low active ecosystem.
              It has 25 star(s) with 7 fork(s). There are no watchers for this library.
              It had no major release in the last 12 months.
              metrics-agent has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of metrics-agent is v0.0.5

            kandi-Quality Quality

              metrics-agent has 0 bugs and 0 code smells.

            kandi-Security Security

              metrics-agent has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              metrics-agent code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              metrics-agent is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              metrics-agent releases are available to install and integrate.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              metrics-agent saves you 1418 person hours of effort in developing the same functionality from scratch.
              It has 3170 lines of code, 323 functions and 60 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed metrics-agent and discovered the below as its top functions. This is intended to give you an instant insight into metrics-agent implemented functionality, and help decide if they suit your requirements.
            • Invoked when a method enters the metrics
            • Register metrics
            • Validates the given string
            • Create injectors
            • Given a set of metric names and a set of metric imports
            • Given a method descriptor return the fully qualified class name of the corresponding class
            • Convert a collection of class names to a Map
            • Command line
            • Loads the configuration from a file
            • Initialize the agent logger
            • Overrides the visitor to visit MetricAnnotation
            • Check the signature
            • Inject a try catch block
            • Invoked when a FINISH method is called
            • Inject metricRepository method
            • Add jvm metrics
            • Visits an array of labels
            • Starts the default http endpoint
            • Inject a catch block
            • Inject startTimeVar
            • Start JMX reporter
            • Clears all the metrics
            • Initialise the metric system
            • Rewrite an ASM class
            • Overridden from super class
            • Inject a metric registry
            Get all kandi verified functions for this library.

            metrics-agent Key Features

            No Key Features are available at this moment for metrics-agent.

            metrics-agent Examples and Code Snippets

            Overview,Instrumentation Metadata,Configuration
            Javadot img1Lines of Code : 50dot img1License : Permissive (Apache-2.0)
            copy iconCopy
              {class name}.{method name}{method signature}:
                - type: Counted
            	  name: {name}
            	  doc: {metric documentation}
            	  labels: ['{name:value}', '{name:value}']
                - type: Gauged
            	  name: {name}
            	  mode: {mode}
            	  doc: {metric documentation}
            Overview,Motivation,Code Bloat Problem
            Javadot img2Lines of Code : 44dot img2License : Permissive (Apache-2.0)
            copy iconCopy
            public Result performSomeTask() {
                return callSomeServiceMethodWhichCanThrowException(createArgs());
            // add class fields
            static final Counter total = Metrics.createCounter("requests_total");
            static final Counter failed = Metrics.createCounter(  
            Metric System Configuration
            Javadot img3Lines of Code : 11dot img3License : Permissive (Apache-2.0)
            copy iconCopy
                key1: value1
                   - gc
                   - memory
                httpPort: 9899

            Community Discussions


            Accessing a private GKE cluster via Cloud VPN
            Asked 2022-Feb-10 at 15:52

            We have setup a GKE cluster using Terraform with private and shared networking:

            Network configuration:



            Answered 2022-Feb-10 at 15:52


            New GKE cluster logging thousands of errors
            Asked 2021-Mar-08 at 16:12

            After creating a fresh new Kubernetes cluster in Google Kubernetes Engine I am seeing a lot of errors in Google Cloud logging related to the metrics agent.

            I have had that problem with an existing cluster on version 1.18.x. Then I upgraded to 1.19.x after the suggestion that this would fix it. However, the problem persisted so I upgraded to 1.20.x and still no change.

            Eventually I created a new cluster with the most recent Kubernetes version and still see hundreds of errors being logged immediately after:



            Answered 2021-Mar-08 at 16:12

            As was mentioned in previous thread, GKE cluster v 1.18.12-gke.1206 contained bug which logged hundreds of Prometheus errors:



            gke-metrics-agent multiple error related to prometheus
            Asked 2021-Mar-04 at 13:29

            I deployed a new app to GKE, I see the GKE dashboard has thousands of errors on gke-metrics-agent:

            It uses a high resource.

            I checked the logs, and I saw all errors related to Prometheus, but I didn't find a way to troubleshoot these errors:

            cluster version: 1.18.12-gke.1206

            What are these errors, and how I can fix it?



            Answered 2021-Feb-25 at 15:55

            It looks like some GKE 1.18.12-gke-X versions have bug where gke-metrics-agent produces a lot of Warning messages.

            There is already a Public Issue Tracker ticket for this bug. You can follow updates regarding this issue here. You can also use (+1) to indicate that you are affected by this bug.

            Workaround of this issue is to use newer version - 1.18.14-gke.1200+



            GKE metric server
            Asked 2021-Feb-20 at 13:58

            How to re-apply GKE metric server that comes installed by default? Also will it return TOP command stats?

            I tried to install and then deleted the GITHUB version of metric server and now it might have deleted some roles related to default GKE metric server. I even tried reinstalling the GitHub version but I still get error..



            Answered 2021-Feb-20 at 13:58

            How to re-apply GKE metric server that comes installed by default?

            First get name of metric server pod:



            kubectl create secret generic InternalError PermissionDenied
            Asked 2020-Nov-17 at 18:22

            I've configured access to my K8s cluster, set up all needed pods &services, created secrets with YAML files, but this simple command:



            Answered 2020-Nov-17 at 18:22

            I found the solution: I had to set the role kms.keys.encrypterDecrypter to the service account which is used to control Kubernetes cluster in the settings of Yandex.Cloud project catalog.


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install metrics-agent

            You can download it from GitHub.
            You can use metrics-agent like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the metrics-agent component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer For Gradle installation, please refer .


            As the agent works at the bytecode level, we support any language which runs on the JVM. Every language which compiles and runs on the JVM must obey by the bytecode rules. This simply means we need to understand the translation mechanisms of each language for the language level method name to the bytecode level. In Java this is usually 1:1 (excluding some generics fun). You can always examine the javap (the Java Disassembler) command to view the bytecode contents in a more Java centric way. As an example. Lets take the followin Scala class. If we run javap on this. You can do the same for Kotlin, Clojure and any other JVM language. Be aware that there may be some quirks in the naming translations and it may not always be as simple as shown above.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone willfleury/metrics-agent

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link