javaspringspring-cloudhystrixturbine

spring-cloud/spring-cloud-netflix, setting the hystrix origin id


I'm using the spring-cloud-samples/customer-stores example and have it working as described (specifically using 1.1.0-BUILD-SNAPSHOT)

It appears that when things stream to hystrix, it attaches an origin object such as the following:

"origin": {
  "host": "192.168.60.100",
  "port": 9000,
  "serviceId": "customers",
  "id": "customers:mysql:9000"
}

Specifically, it looks like the "id" is being created from serviceId:spring.profiles.active:server.port

This works just fine when you have several distinct combinations of this that can be used, however, when I'm running several services either on different ips with the same server.port or am running several docker containers with the same server.port, the turbine aggregation gets garbled & makes no sense, since the data is writing all over itself.

I'm wondering if there is a specific way in Spring that we can specifically affect the value of that id in our setup.


Solution

  • Simply setting the hystrix.stream.queue.send-id=false as described by @spencergibb in the post on github: https://github.com/spring-cloud/spring-cloud-netflix/issues/740 solves the problem.