Skip to content

Commit

Permalink
rename tls version labels (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
leklund authored Jun 26, 2023
1 parent 4b2196f commit 3820552
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 55 deletions.
9 changes: 4 additions & 5 deletions pkg/realtime/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,10 @@ func Process(response *Response, serviceID, serviceName, serviceVersion string,
m.StatusGroupTotal.WithLabelValues(serviceID, serviceName, datacenter, "4xx").Add(float64(stats.Status4xx))
m.StatusGroupTotal.WithLabelValues(serviceID, serviceName, datacenter, "5xx").Add(float64(stats.Status5xx))
m.SynthsTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Synths))
m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "any").Add(float64(stats.TLS))
m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "v10").Add(float64(stats.TLSv10))
m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "v11").Add(float64(stats.TLSv11))
m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "v12").Add(float64(stats.TLSv12))
m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "v13").Add(float64(stats.TLSv13))
m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "1.0").Add(float64(stats.TLSv10))
m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "1.1").Add(float64(stats.TLSv11))
m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "1.2").Add(float64(stats.TLSv12))
m.TLSTotal.WithLabelValues(serviceID, serviceName, datacenter, "1.3").Add(float64(stats.TLSv13))
m.UncacheableTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Uncacheable))
m.VideoTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.Video))
m.WAFBlockedTotal.WithLabelValues(serviceID, serviceName, datacenter).Add(float64(stats.WAFBlocked))
Expand Down
90 changes: 40 additions & 50 deletions pkg/rt/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4275,56 +4275,46 @@ var expetedMetricsOutputMap = map[string]float64{
`testspace_testsystem_synth_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name"}`: 0,
`testspace_testsystem_synth_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name"}`: 0,
`testspace_testsystem_synth_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name"}`: 0,
`testspace_testsystem_tls_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 1,
`testspace_testsystem_tls_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 1,
`testspace_testsystem_tls_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 1,
`testspace_testsystem_tls_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 1,
`testspace_testsystem_tls_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 1,
`testspace_testsystem_tls_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 1,
`testspace_testsystem_tls_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="HHN",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 23,
`testspace_testsystem_tls_total{datacenter="HHN",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="HHN",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="HHN",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 23,
`testspace_testsystem_tls_total{datacenter="HHN",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="LGA",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 57,
`testspace_testsystem_tls_total{datacenter="LGA",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="LGA",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="LGA",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 57,
`testspace_testsystem_tls_total{datacenter="LGA",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="SEA",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 1,
`testspace_testsystem_tls_total{datacenter="SEA",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="SEA",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="SEA",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 1,
`testspace_testsystem_tls_total{datacenter="SEA",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="SYD",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 1,
`testspace_testsystem_tls_total{datacenter="SYD",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="SYD",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="SYD",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 1,
`testspace_testsystem_tls_total{datacenter="SYD",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 1,
`testspace_testsystem_tls_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 1,
`testspace_testsystem_tls_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 0,
`testspace_testsystem_tls_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 0,
`testspace_testsystem_tls_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name",tls_version="any"}`: 1,
`testspace_testsystem_tls_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name",tls_version="v10"}`: 0,
`testspace_testsystem_tls_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name",tls_version="v11"}`: 0,
`testspace_testsystem_tls_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name",tls_version="v12"}`: 1,
`testspace_testsystem_tls_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name",tls_version="v13"}`: 0,
`testspace_testsystem_tls_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 1,
`testspace_testsystem_tls_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_tls_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 1,
`testspace_testsystem_tls_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_tls_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 1,
`testspace_testsystem_tls_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_tls_total{datacenter="HHN",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="HHN",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="HHN",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 23,
`testspace_testsystem_tls_total{datacenter="HHN",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_tls_total{datacenter="LGA",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="LGA",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="LGA",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 57,
`testspace_testsystem_tls_total{datacenter="LGA",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_tls_total{datacenter="SEA",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="SEA",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="SEA",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 1,
`testspace_testsystem_tls_total{datacenter="SEA",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_tls_total{datacenter="SYD",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="SYD",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="SYD",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 1,
`testspace_testsystem_tls_total{datacenter="SYD",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_tls_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 1,
`testspace_testsystem_tls_total{datacenter="TYO",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_tls_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 0,
`testspace_testsystem_tls_total{datacenter="YUL",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_tls_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name",tls_version="1.0"}`: 0,
`testspace_testsystem_tls_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name",tls_version="1.1"}`: 0,
`testspace_testsystem_tls_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name",tls_version="1.2"}`: 1,
`testspace_testsystem_tls_total{datacenter="YYZ",service_id="my-service-id",service_name="my-service-name",tls_version="1.3"}`: 0,
`testspace_testsystem_uncacheable_total{datacenter="BUR",service_id="my-service-id",service_name="my-service-name"}`: 0,
`testspace_testsystem_uncacheable_total{datacenter="BWI",service_id="my-service-id",service_name="my-service-name"}`: 0,
`testspace_testsystem_uncacheable_total{datacenter="FRA",service_id="my-service-id",service_name="my-service-name"}`: 0,
Expand Down

0 comments on commit 3820552

Please sign in to comment.