kandi background
Explore Kits

micrometer | application metrics facade for the most popular monitoring tools | Analytics library

 by   micrometer-metrics Java Version: v1.9.0-RC1 License: Apache-2.0

 by   micrometer-metrics Java Version: v1.9.0-RC1 License: Apache-2.0

Download this library from

kandi X-RAY | micrometer Summary

micrometer is a Java library typically used in Analytics, Prometheus, Grafana applications. micrometer has build file available, it has a Permissive License and it has high support. However micrometer has 90 bugs and it has 8 vulnerabilities. You can download it from GitHub, Maven.
An application metrics facade for the most popular monitoring tools. Instrument your code with dimensional metrics with a vendor neutral interface and decide on the monitoring backend at the last minute. More info and the user manual are available on micrometer.io. Micrometer is the instrumentation library underpinning Spring Boot 2's metrics collection.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • micrometer has a highly active ecosystem.
  • It has 3346 star(s) with 770 fork(s). There are 113 watchers for this library.
  • There were 7 major release(s) in the last 6 months.
  • There are 270 open issues and 1371 have been closed. On average issues are closed in 110 days. There are 46 open pull requests and 0 closed requests.
  • It has a positive sentiment in the developer community.
  • The latest version of micrometer is v1.9.0-RC1
micrometer Support
Best in #Analytics
Average in #Analytics
micrometer Support
Best in #Analytics
Average in #Analytics

quality kandi Quality

  • micrometer has 90 bugs (6 blocker, 2 critical, 15 major, 67 minor) and 1745 code smells.
micrometer Quality
Best in #Analytics
Average in #Analytics
micrometer Quality
Best in #Analytics
Average in #Analytics

securitySecurity

  • micrometer has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • micrometer code analysis shows 8 unresolved vulnerabilities (8 blocker, 0 critical, 0 major, 0 minor).
  • There are 11 security hotspots that need review.
micrometer Security
Best in #Analytics
Average in #Analytics
micrometer Security
Best in #Analytics
Average in #Analytics

license License

  • micrometer 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.
micrometer License
Best in #Analytics
Average in #Analytics
micrometer License
Best in #Analytics
Average in #Analytics

buildReuse

  • micrometer releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
micrometer Reuse
Best in #Analytics
Average in #Analytics
micrometer Reuse
Best in #Analytics
Average in #Analytics
Top functions reviewed by kandi - BETA

kandi has reviewed micrometer and discovered the below as its top functions. This is intended to give you an instant insight into micrometer implemented functionality, and help decide if they suit your requirements.

  • Initialize metrics .
  • Creates a Flux from a Flux source .
  • Add a request to the handler .
  • Format the last element of a message array .
  • Checks the metrics and binds them to the registry .
  • Synchronously register metrics for the MBeanServer .
  • Sends the request .
  • Registers the min - th percentile filter with the minimum value .
  • Gets or creates a new meter .
  • Pretty prints a JSON formatted string .

micrometer Key Features

An application metrics facade for the most popular monitoring tools. Think SLF4J, but for metrics.

Snapshot builds

copy iconCopydownload iconDownload
repositories {
    maven { url 'https://repo.spring.io/libs-snapshot' }
}

dependencies {
    implementation 'io.micrometer:micrometer-core:latest.integration'
}

When running Prometheus, all my endpoints start returning 404

copy iconCopydownload iconDownload
-job_name: 'spring-actuators'
 metric_path: '/myappname/actuator/prometheus'
 scrape_interval: 5s
 static_configs:
 - targets: ['localhost:8080']

How many shards per node?

copy iconCopydownload iconDownload
GET /_cat/allocation/1?v
shards disk.indices disk.used disk.avail disk.total disk.percent host       ip         node
   121        1.3tb     1.3tb    466.4gb      1.8tb           74 10.x.y.z   10.x.y.z   1
-----------------------
GET /_cat/allocation/1?v
shards disk.indices disk.used disk.avail disk.total disk.percent host       ip         node
   121        1.3tb     1.3tb    466.4gb      1.8tb           74 10.x.y.z   10.x.y.z   1

How to enable DiskSpaceMetrics in io.micrometer

copy iconCopydownload iconDownload
management.endpoints.web.exposure.include=health
management.endpoint.health.show-components=always
management.endpoint.health.show-details=always
management.health.diskspace.enabled=true
@Bean
public DiskSpaceMetrics diskSpaceMetrics() {
    return new DiskSpaceMetrics(new File("."));
}
-----------------------
management.endpoints.web.exposure.include=health
management.endpoint.health.show-components=always
management.endpoint.health.show-details=always
management.health.diskspace.enabled=true
@Bean
public DiskSpaceMetrics diskSpaceMetrics() {
    return new DiskSpaceMetrics(new File("."));
}
-----------------------
management.endpoints.web.exposure.include=health
management.endpoint.health.show-components=always
management.endpoint.health.show-details=always
management.health.diskspace.enabled=true
@Bean
public DiskSpaceMetrics diskSpaceMetrics() {
    return new DiskSpaceMetrics(new File("."));
}

class com.fasterxml.jackson.dataformat.xml.XmlMapper is loading from from multiple locations

copy iconCopydownload iconDownload
  implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml'
com.fasterxml.jackson.dataformat:jackson-dataformat-xml -> 2.11.4
+--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.12.2
|    +--- com.fasterxml.jackson.core:jackson-core:2.12.2 -> 2.11.4
dependencyManagement {
  imports {
    mavenBom 'org.springframework.boot:spring-boot-dependencies:2.5.0'
  }
}
-----------------------
  implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml'
com.fasterxml.jackson.dataformat:jackson-dataformat-xml -> 2.11.4
+--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.12.2
|    +--- com.fasterxml.jackson.core:jackson-core:2.12.2 -> 2.11.4
dependencyManagement {
  imports {
    mavenBom 'org.springframework.boot:spring-boot-dependencies:2.5.0'
  }
}
-----------------------
  implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml'
com.fasterxml.jackson.dataformat:jackson-dataformat-xml -> 2.11.4
+--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.12.2
|    +--- com.fasterxml.jackson.core:jackson-core:2.12.2 -> 2.11.4
dependencyManagement {
  imports {
    mavenBom 'org.springframework.boot:spring-boot-dependencies:2.5.0'
  }
}
-----------------------
  implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-xml'
com.fasterxml.jackson.dataformat:jackson-dataformat-xml -> 2.11.4
+--- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.12.2
|    +--- com.fasterxml.jackson.core:jackson-core:2.12.2 -> 2.11.4
dependencyManagement {
  imports {
    mavenBom 'org.springframework.boot:spring-boot-dependencies:2.5.0'
  }
}

Issues with Upgrading Spring boot from 2.2.2.Release to 2.4.2 Rlease

copy iconCopydownload iconDownload
Importing spring-cloud-sleuth as a BOM for dependency management is very suspect.
<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-sleuth</artifactId>
                <version>3.0.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${spring-cloud.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
-----------------------
Importing spring-cloud-sleuth as a BOM for dependency management is very suspect.
<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-sleuth</artifactId>
                <version>3.0.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${spring-cloud.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
-----------------------
Importing spring-cloud-sleuth as a BOM for dependency management is very suspect.
<dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-sleuth</artifactId>
                <version>3.0.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
<dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${spring-cloud.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
-----------------------
    <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-config</artifactId>
        <version>3.0.3</version>
    </dependency>

OptionMenu's dependency on other OptionMenus is not working after the Reset Button (which resets the selections made on the OptionMenus) is clicked

copy iconCopydownload iconDownload
def resetEntries():
    """ This method helps in resetting the entries given as a input or selected by the User"""
    x.set("")
    unitList["menu"].delete(0,'end')
    for item in list(listOfUnits.keys()):
        unitList['menu'].add_command(label=item,command=tk._setit(x,item,updateSubLists))

    ...

Is a micrometer meter cached when I create an instance?

copy iconCopydownload iconDownload
Counter counter1 = Counter
        .builder("instance_name")
        .description("bla bla...")
        .tags("tag_name", "tag_value")
        .register(registry);

Counter counter2 = Counter
        .builder("instance_name")
        .description("bla bla...")
        .tags("tag_name", "tag_value")
        .register(registry);

System.out.println(counter1 == counter2); // should print true

SpringCloud 2020.0.2 upgrade generates testing error

copy iconCopydownload iconDownload
@SpringBootTest(
  webEnvironment = RANDOM_PORT, 
  properties = {"spring.cloud.config.enabled=false"}
)
-----------------------
implementation 'org.springframework.cloud:spring-cloud-starter-config'
implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap'

Missing Validators on tomcat

copy iconCopydownload iconDownload
[INFO] +- it.ozimov:spring-boot-email-core:jar:0.6.3:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.3.3.Final:compile
<exclusions>
    <exclusion>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
    </exclusion>
</exclusions>
-----------------------
[INFO] +- it.ozimov:spring-boot-email-core:jar:0.6.3:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.3.3.Final:compile
<exclusions>
    <exclusion>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
    </exclusion>
</exclusions>

Overriding Spring Boot artifact name in Gradle 6.7

copy iconCopydownload iconDownload
tasks.bootJar {
    archiveFileName.set("my-service.jar")
}

Community Discussions

Trending Discussions on micrometer
  • Is there a possibility to add custom spring boot metrics tags at runtime?
  • When running Prometheus, all my endpoints start returning 404
  • How many shards per node?
  • How to enable DiskSpaceMetrics in io.micrometer
  • Upgrade to SpringBoot 2.5.0 GA - lost all metrics
  • How to fix issue with karate-core not working with spring boot 2.5.0 due to clash MongoMetricsConnectionPoolListener
  • class com.fasterxml.jackson.dataformat.xml.XmlMapper is loading from from multiple locations
  • Issues with Upgrading Spring boot from 2.2.2.Release to 2.4.2 Rlease
  • OptionMenu's dependency on other OptionMenus is not working after the Reset Button (which resets the selections made on the OptionMenus) is clicked
  • Is a micrometer meter cached when I create an instance?
Trending Discussions on micrometer

QUESTION

Is there a possibility to add custom spring boot metrics tags at runtime?

Asked 2021-Jun-14 at 19:52

I'm using Spring Boot with micrometer-registry-prometheus, trying to store custom tags from http headers, security context, etc.

So I found MeterFilter iterface and tried to use it to store the data I need.

But MeterFilter method works after request is completed, so at that point I don't have any information about request.

Seems like the case is pretty common, is there any possibility to achieve it?

ANSWER

Answered 2021-Jun-14 at 19:52

If you're using Spring MVC you can define a bean that implements WebMvcTagsProvider to take complete control over the tags that are added to metrics for request-response exchanges. Alternatively, you can define a bean that implements WebMvcTagsContributor to add to the default tags. Similarly, if you're using Spring WebFlux you can define beans that implements WebFluxTagsProvider and WebFluxTagsContributor to take complete control over the tags and contribute additional tags respectively.

Source https://stackoverflow.com/questions/67973069

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

Vulnerabilities

No vulnerabilities reported

Install micrometer

You can download it from GitHub, Maven.
You can use micrometer 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 micrometer 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 maven.apache.org. For Gradle installation, please refer gradle.org .

Support

See Micrometer's support policy.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Compare Analytics Libraries with Highest Support
Compare Analytics Libraries with Highest Quality
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.