Skip to content

Commit

Permalink
Update jars
Browse files Browse the repository at this point in the history
* Update jars
* Simplify health check for all_services_healthy
  • Loading branch information
pambrose authored May 24, 2017
1 parent 70a3719 commit e6c97b6
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=1.2.2
VERSION=1.2.3

default: build

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ scrape_configs:
The docker images are available via:
```bash
$ docker pull pambrose/prometheus-proxy:1.2.2
$ docker pull pambrose/prometheus-agent:1.2.2
$ docker pull pambrose/prometheus-proxy:1.2.3
$ docker pull pambrose/prometheus-agent:1.2.3
```

Start the proxy and an agent in separate shells on your local machine:
Expand All @@ -94,14 +94,14 @@ Start the proxy and an agent in separate shells on your local machine:
$ docker run --rm -p 8082:8082 -p 8092:8092 -p 50051:50051 -p 8080:8080 \
-e HOSTNAME=${HOSTNAME} \
-e METRICS_ENABLED=true \
pambrose/prometheus-proxy:1.2.2
pambrose/prometheus-proxy:1.2.3
```

```bash
$ docker run --rm -p 8083:8083 -p 8093:8093 \
-e HOSTNAME=${HOSTNAME} \
-e AGENT_CONFIG='https://raw.githubusercontent.com/pambrose/prometheus-proxy/master/examples/simple.conf' \
pambrose/prometheus-agent:1.2.2
pambrose/prometheus-agent:1.2.3
```

Using the config file [simple.conf](https://raw.githubusercontent.com/pambrose/prometheus-proxy/master/examples/simple.conf),
Expand Down
2 changes: 1 addition & 1 deletion bin/docker-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
docker run --rm -p 8083:8083 -p 8093:8093 \
-e HOSTNAME=${HOSTNAME} \
-e AGENT_CONFIG='https://raw.githubusercontent.com/pambrose/prometheus-proxy/master/examples/simple.conf' \
pambrose/prometheus-agent:1.2.2
pambrose/prometheus-agent:1.2.3
2 changes: 1 addition & 1 deletion bin/docker-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
docker run --rm -p 8082:8082 -p 8092:8092 -p 50051:50051 -p 8080:8080 \
-e HOSTNAME=${HOSTNAME} \
-e PROXY_CONFIG='https://raw.githubusercontent.com/pambrose/prometheus-proxy/master/examples/simple.conf' \
pambrose/prometheus-proxy:1.2.2
pambrose/prometheus-proxy:1.2.3
2 changes: 1 addition & 1 deletion etc/compose/proxy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
prometheus-proxy:
autoredeploy: true
image: 'pambrose/prometheus-proxy:1.2.2'
image: 'pambrose/prometheus-proxy:1.2.3'
ports:
- '8080:8080'
- '8082:8082'
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.prometheus</groupId>
<artifactId>prometheus-proxy</artifactId>
<version>1.2.2-SNAPSHOT</version>
<version>1.2.3-SNAPSHOT</version>

<properties>
<config.version>1.3.1</config.version>
Expand All @@ -15,22 +15,22 @@
<protobuf.version>3.2.0</protobuf.version>
<protobuf.plugin.version>0.5.0</protobuf.plugin.version>
<guava.version>19.0</guava.version>
<prometheus.version>0.0.21</prometheus.version>
<prometheus.version>0.0.22</prometheus.version>
<jcommander.version>1.69</jcommander.version>
<spark.version>2.6.0.RC0</spark.version>
<spark.version>2.6.0</spark.version>
<jetty.version>9.4.4.v20170414</jetty.version>
<okhttp.version>3.7.0</okhttp.version>
<okhttp.version>3.8.0</okhttp.version>
<auto.version>1.4.1</auto.version>
<grpc-prom.version>0.3.0</grpc-prom.version>
<metrics.version>3.2.2</metrics.version>
<brave.version>4.2.0</brave.version>
<zipkin-reporter.version>0.7.0</zipkin-reporter.version>
<brave.version>4.3.3</brave.version>
<zipkin-reporter.version>0.10.0</zipkin-reporter.version>

<logback.version>1.2.3</logback.version>
<slf4j.version>1.7.25</slf4j.version>

<junit.version>4.12</junit.version>
<assertj.version>3.6.2</assertj.version>
<assertj.version>3.8.0</assertj.version>
<assertj.maven.version>2.0.0</assertj.maven.version>

<assembly.version>2.6</assembly.version>
Expand Down
15 changes: 15 additions & 0 deletions release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Release Notes

1) Create branch

2) Bump version in source

3) Make changes in code

4) Verify tests run cleanly

5) Execute `make distro`

6) Check in branch and merge

7) Create release on github and upload target/prometheus-proxy.jar and target/prometheus-agent.jar
22 changes: 10 additions & 12 deletions src/main/java/io/prometheus/common/GenericService.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.codahale.metrics.health.jvm.ThreadDeadlockHealthCheck;
import com.github.kristofa.brave.Brave;
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.AbstractExecutionThreadService;
import com.google.common.util.concurrent.MoreExecutors;
Expand Down Expand Up @@ -145,26 +144,25 @@ protected void registerHealtChecks() {
this.getHealthCheckRegistry().register("thread_deadlock", new ThreadDeadlockHealthCheck());
if (this.isMetricsEnabled())
this.getHealthCheckRegistry().register("metrics_service", this.metricsService.getHealthCheck());

this.getHealthCheckRegistry()
.register(
"all_services_running",
"all_services_healthy",
new HealthCheck() {
@Override
protected Result check()
throws Exception {
final ImmutableMultimap<State, Service> sbs = serviceManager.servicesByState();
return sbs.keySet().size() == 1 && sbs.containsKey(State.RUNNING)
return serviceManager.isHealthy()
? Result.healthy()
: Result.unhealthy(format("Incorrect state: %s",
Joiner.on(", ")
.join(sbs.entries()
.stream()
.filter(kv -> kv.getKey() != State.RUNNING)
.peek(kv -> logger.warn("Incorrect state - {}: {}",
kv.getKey(), kv.getValue()))
.map(kv -> format("%s: %s", kv.getKey(), kv.getValue()))
.collect(Collectors.toList()))));
.join(serviceManager.servicesByState()
.entries()
.stream()
.filter(kv -> kv.getKey() != State.RUNNING)
.peek(kv -> logger.warn("Incorrect state - {}: {}",
kv.getKey(), kv.getValue()))
.map(kv -> format("%s: %s", kv.getKey(), kv.getValue()))
.collect(Collectors.toList()))));
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/prometheus/package-info.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@VersionAnnotation(version = "1.2.2", date = "05/01/17")
@VersionAnnotation(version = "1.2.3", date = "05/24/17")
package io.prometheus;

import io.prometheus.common.VersionAnnotation;
2 changes: 1 addition & 1 deletion src/main/java/io/prometheus/proxy/ProxyHttpService.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void handle(Exception e, Request request, Response response) {

final Span span = this.tracer != null ? this.tracer.newTrace()
.name("round-trip")
.tag("version", "1.2.2")
.tag("version", "1.2.3")
.start()
: null;
try {
Expand Down

0 comments on commit e6c97b6

Please sign in to comment.