@ -1396,6 +1396,40 @@ func TestConsulTagSpecifiers(t *testing.T) {
"consul.destination.trust_domain" : { "f8f8f8f8~v2.pong.default.partA.dc2.internal-v1.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "e5b08d03-bfc3-c870-1833-baddb116e648" } ,
} ,
} ,
{
name : "cluster service peered" ,
stat : "cluster.pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul.bind_errors" ,
expect : map [ string ] [ ] string {
"consul.custom_hash" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "" } ,
"consul.destination.custom_hash" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "" } ,
"consul.destination.full_target" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648" } ,
"consul.destination.namespace" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "default" } ,
"consul.destination.peer" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "cloudpeer" } ,
"consul.destination.routing_type" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "external" } ,
"consul.destination.service" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "pong" } ,
"consul.destination.service_subset" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "" } ,
"consul.destination.target" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "pong.default.cloudpeer" } ,
"consul.destination.trust_domain" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "e5b08d03-bfc3-c870-1833-baddb116e648" } ,
"consul.full_target" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648" } ,
"consul.namespace" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "default" } ,
"consul.routing_type" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "external" } ,
"consul.service" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "pong" } ,
"consul.service_subset" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "" } ,
"consul.target" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "pong.default.cloudpeer" } ,
"consul.trust_domain" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "e5b08d03-bfc3-c870-1833-baddb116e648" } ,
} ,
expectNoDeprecated : map [ string ] [ ] string {
"consul.destination.custom_hash" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "" } ,
"consul.destination.full_target" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648" } ,
"consul.destination.namespace" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "default" } ,
"consul.destination.peer" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "cloudpeer" } ,
"consul.destination.routing_type" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "external" } ,
"consul.destination.service" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "pong" } ,
"consul.destination.service_subset" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "" } ,
"consul.destination.target" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "pong.default.cloudpeer" } ,
"consul.destination.trust_domain" : { "pong.default.cloudpeer.external.e5b08d03-bfc3-c870-1833-baddb116e648.consul." , "e5b08d03-bfc3-c870-1833-baddb116e648" } ,
} ,
} ,
{
name : "tcp listener no namespace or partition (OSS)" ,
stat : "tcp.upstream.db.dc1.downstream_cx_total" ,
@ -1406,6 +1440,15 @@ func TestConsulTagSpecifiers(t *testing.T) {
"consul.upstream.service" : { "db.dc1." , "db" } ,
} ,
} ,
{
name : "tcp peered listener no namespace or partition (OSS)" ,
stat : "tcp.upstream_peered.db.cloudpeer.downstream_cx_total" ,
expect : map [ string ] [ ] string {
"consul.upstream.peer" : { "db.cloudpeer." , "cloudpeer" } ,
"consul.upstream.namespace" : { "db.cloudpeer." , "" } ,
"consul.upstream.service" : { "db.cloudpeer." , "db" } ,
} ,
} ,
{
name : "tcp listener with namespace and partition" ,
stat : "tcp.upstream.db.frontend.west.dc1.downstream_cx_total" ,
@ -1416,6 +1459,15 @@ func TestConsulTagSpecifiers(t *testing.T) {
"consul.upstream.service" : { "db.frontend.west.dc1." , "db" } ,
} ,
} ,
{
name : "tcp peered listener with namespace" ,
stat : "tcp.upstream_peered.db.frontend.cloudpeer.downstream_cx_total" ,
expect : map [ string ] [ ] string {
"consul.upstream.peer" : { "db.frontend.cloudpeer." , "cloudpeer" } ,
"consul.upstream.namespace" : { "db.frontend.cloudpeer." , "frontend" } ,
"consul.upstream.service" : { "db.frontend.cloudpeer." , "db" } ,
} ,
} ,
{
name : "http listener no namespace or partition (OSS)" ,
stat : "http.upstream.web.dc1.downstream_cx_total" ,
@ -1426,6 +1478,15 @@ func TestConsulTagSpecifiers(t *testing.T) {
"consul.upstream.service" : { "web.dc1." , "web" } ,
} ,
} ,
{
name : "http peered listener no namespace or partition (OSS)" ,
stat : "http.upstream_peered.web.cloudpeer.downstream_cx_total" ,
expect : map [ string ] [ ] string {
"consul.upstream.peer" : { "web.cloudpeer." , "cloudpeer" } ,
"consul.upstream.namespace" : { "web.cloudpeer." , "" } ,
"consul.upstream.service" : { "web.cloudpeer." , "web" } ,
} ,
} ,
{
name : "http listener with namespace and partition" ,
stat : "http.upstream.web.frontend.west.dc1.downstream_cx_total" ,
@ -1436,6 +1497,15 @@ func TestConsulTagSpecifiers(t *testing.T) {
"consul.upstream.service" : { "web.frontend.west.dc1." , "web" } ,
} ,
} ,
{
name : "http peered listener with namespace" ,
stat : "http.upstream_peered.web.frontend.cloudpeer.downstream_cx_total" ,
expect : map [ string ] [ ] string {
"consul.upstream.peer" : { "web.frontend.cloudpeer." , "cloudpeer" } ,
"consul.upstream.namespace" : { "web.frontend.cloudpeer." , "frontend" } ,
"consul.upstream.service" : { "web.frontend.cloudpeer." , "web" } ,
} ,
} ,
}
for _ , tc := range cases {