Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

4.0 upgrade #217

Open
wants to merge 2 commits into
base: v3.1-maintenance
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ This module does the following:

### Maven

Current version is 3.1.3, which is compatible with Metrics 3.1.2
Current version is 4.0.0. It is not compatible with Metrics 3.1.2 due to package name changes
in dependencies.

```xml
<dependency>
<groupId>com.ryantenney.metrics</groupId>
<artifactId>metrics-spring</artifactId>
<version>3.1.3</version>
<version>4.0.0</version>
</dependency>
```

Expand Down
20 changes: 15 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ryantenney.metrics</groupId>
<artifactId>metrics-spring</artifactId>
<version>3.1.3-SNAPSHOT</version>
<version>4.0.0</version>
<packaging>bundle</packaging>
<name>Metrics Spring Integration</name>
<description>Spring integration for Coda Hale's Metrics Library</description>
Expand Down Expand Up @@ -58,12 +58,12 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<metrics.version>3.1.2</metrics.version>
<metrics.version>4.0.2</metrics.version>
<rabbitmq.version>3.5.1</rabbitmq.version>
<librato.version>4.0.1.9</librato.version>
<new-relic.version>1.1.1</new-relic.version>
<datadog.version>1.1.3</datadog.version>
<spring.version>4.1.6.RELEASE</spring.version>
<spring.version>4.3.17.RELEASE</spring.version>
<slf4j.version>1.7.12</slf4j.version>
<logback.version>1.1.3</logback.version>
<aspectjweaver.version>1.8.5</aspectjweaver.version>
Expand Down Expand Up @@ -107,9 +107,14 @@
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-ganglia</artifactId>
<artifactId>metrics-jmx</artifactId>
<version>${metrics.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-ganglia</artifactId>
<version>3.2.6</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-graphite</artifactId>
Expand Down Expand Up @@ -333,7 +338,12 @@
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jmx</artifactId>
<version>4.0.2</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package com.ryantenney.metrics.spring.reporter;

import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.jmx.JmxReporter;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.context.SmartLifecycle;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (C) 2012 Ryan W Tenney ([email protected])

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

-->
<xsd:schema xmlns="http://www.ryantenney.com/schema/metrics"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:tool="http://www.springframework.org/schema/tool"
targetNamespace="http://www.ryantenney.com/schema/metrics"
elementFormDefault="qualified" attributeFormDefault="unqualified">

<xsd:import namespace="http://www.springframework.org/schema/beans" schemaLocation="http://www.springframework.org/schema/beans/spring-beans.xsd"/>
<xsd:import namespace="http://www.springframework.org/schema/tool" schemaLocation="http://www.springframework.org/schema/tool/spring-tool.xsd"/>

<xsd:element name="annotation-driven">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation>
<tool:exports identifier="@id"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="metric-registry" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="com.codahale.metrics.MetricRegistry"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="health-check-registry" type="xsd:string" use="optional">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<tool:expected-type type="com.codahale.metrics.health.HealthCheckRegistry"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="expose-proxy" type="xsd:boolean" use="optional"/>
<xsd:attribute name="proxy-target-class" type="xsd:boolean" use="optional"/>
</xsd:complexType>
</xsd:element>

<xsd:element name="metric-registry">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation>
<tool:exports type="com.codahale.metrics.MetricRegistry"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string" use="optional"/>
<xsd:attribute name="name" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>

<xsd:element name="health-check-registry">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation>
<tool:exports type="com.codahale.metrics.health.HealthCheckRegistry"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string" use="optional"/>
</xsd:complexType>
</xsd:element>

<xsd:element name="reporter">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation>
<tool:exports type="com.codahale.metrics.Slf4jReporter"/>
<tool:exports type="com.codahale.metrics.ConsoleReporter"/>
<tool:exports type="com.codahale.metrics.jmx.JmxReporter"/>
<tool:exports type="com.codahale.metrics.ganglia.GangliaReporter"/>
<tool:exports type="com.codahale.metrics.graphite.GraphiteReporter"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:attribute name="id" type="xsd:string" use="optional"/>
<xsd:attribute name="type" type="xsd:string" use="optional"/>
<xsd:attribute name="metric-registry" type="xsd:string" use="required">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<expected-type type="com.codahale.metrics.MetricRegistry"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="enabled" type="xsd:string" use="optional"/>
<xsd:anyAttribute namespace="##any" processContents="lax"/>
</xsd:complexType>
</xsd:element>

<xsd:element name="register">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation>
<exports identifier="@id"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence maxOccurs="unbounded">
<xsd:element ref="beans:bean"/>
</xsd:sequence>
<xsd:attribute name="metric-registry" type="xsd:string" use="required">
<xsd:annotation>
<xsd:appinfo>
<tool:annotation kind="ref">
<expected-type type="com.codahale.metrics.MetricRegistry"/>
</tool:annotation>
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>

<xsd:attribute name="name" type="xsd:string"/>

</xsd:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import com.codahale.metrics.ConsoleReporter;
import com.codahale.metrics.CsvReporter;
import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.jmx.JmxReporter;
import com.codahale.metrics.Metric;
import com.codahale.metrics.MetricFilter;
import com.codahale.metrics.MetricRegistry;
Expand Down