Skip to content

Commit

Permalink
Merge branch 'release/2023.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
tnamao committed Sep 25, 2023
2 parents 47f78c2 + 1c9cd4f commit e160490
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: static-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: "./go.mod"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: go test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
Expand Down
8 changes: 8 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGES

## 2023.4.0

- [ADD] `sora_client``sora_python_sdk` に対応する
- @tnamao
- [UPDATE] Go を 1.21 に上げる
- @tnamao

## 2023.3.0

- [ADD] `sora_client``obs_studio_whip` に対応する
Expand All @@ -8,6 +15,7 @@
- `prometheus/client-golang` 1.14.0 => 1.16.0
- `prometheus/common` 0.41.0 => 0.44.0
- `prometheus/exporter-toolkit` 0.9.1 => 0.10.0
- @tnamao

## 2023.2.0

Expand Down
2 changes: 2 additions & 0 deletions collector/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func (m *ClientMetrics) Collect(ch chan<- prometheus.Metric, report soraClientRe
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.SoraJsSdk), "js_sdk", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.SoraUnitySdk), "unity_sdk", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.ObsStudioWhip), "obs_studio_whip", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.SoraPythonSdk), "python_sdk", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.Unknown), "unknown", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.WebrtcLoadTestingToolZakuro), "zakuro", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.WebrtcNativeClientMomo), "momo", "failed")
Expand All @@ -35,6 +36,7 @@ func (m *ClientMetrics) Collect(ch chan<- prometheus.Metric, report soraClientRe
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.SoraJsSdk), "js_sdk", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.SoraUnitySdk), "unity_sdk", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.ObsStudioWhip), "obs_studio_whip", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.SoraPythonSdk), "python_sdk", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.Unknown), "unknown", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.WebrtcLoadTestingToolZakuro), "zakuro", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.WebrtcNativeClientMomo), "momo", "successful")
Expand Down
1 change: 1 addition & 0 deletions collector/sora_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ type soraClientStatistics struct {
SoraJsSdk int64 `json:"sora_js_sdk"`
SoraUnitySdk int64 `json:"sora_unity_sdk"`
ObsStudioWhip int64 `json:"obs_studio_whip"`
SoraPythonSdk int64 `json:"sora_python_sdk"`
Unknown int64 `json:"unknown"`
WebrtcLoadTestingToolZakuro int64 `json:"webrtc_load_testing_tool_zakuro"`
WebrtcNativeClientMomo int64 `json:"webrtc_native_client_momo"`
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/shiguredo/sora_exporter

go 1.20
go 1.21

require (
github.com/alecthomas/kingpin/v2 v2.3.2
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
Expand All @@ -46,9 +48,11 @@ github.com/prometheus/exporter-toolkit v0.10.0/go.mod h1:+sVFzuvV5JDyw+Ih6p3zFxZ
github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk=
github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
Expand Down Expand Up @@ -79,7 +83,9 @@ google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs
google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 2 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ var (
"sora_js_sdk": 3,
"sora_unity_sdk": 4,
"obs_studio_whip": 10,
"sora_python_sdk": 11,
"unknown": 5,
"webrtc_load_testing_tool_zakuro": 8,
"webrtc_native_client_momo": 6
Expand All @@ -116,6 +117,7 @@ var (
"sora_js_sdk": 33,
"sora_unity_sdk": 44,
"obs_studio_whip": 1010,
"sora_python_sdk": 1111,
"unknown": 55,
"webrtc_load_testing_tool_zakuro": 88,
"webrtc_native_client_momo": 66
Expand Down
2 changes: 2 additions & 0 deletions test/maximum.metrics
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ sora_client_type_total{client="unity_sdk",state="failed"} 4
sora_client_type_total{client="unity_sdk",state="successful"} 44
sora_client_type_total{client="obs_studio_whip",state="failed"} 10
sora_client_type_total{client="obs_studio_whip",state="successful"} 1010
sora_client_type_total{client="python_sdk",state="failed"} 11
sora_client_type_total{client="python_sdk",state="successful"} 1111
sora_client_type_total{client="unknown",state="failed"} 5
sora_client_type_total{client="unknown",state="successful"} 55
sora_client_type_total{client="zakuro",state="failed"} 8
Expand Down
2 changes: 2 additions & 0 deletions test/sora_client_enabled.metrics
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ sora_client_type_total{client="unity_sdk",state="failed"} 4
sora_client_type_total{client="unity_sdk",state="successful"} 44
sora_client_type_total{client="obs_studio_whip",state="failed"} 10
sora_client_type_total{client="obs_studio_whip",state="successful"} 1010
sora_client_type_total{client="python_sdk",state="failed"} 11
sora_client_type_total{client="python_sdk",state="successful"} 1111
sora_client_type_total{client="unknown",state="failed"} 5
sora_client_type_total{client="unknown",state="successful"} 55
sora_client_type_total{client="zakuro",state="failed"} 8
Expand Down

0 comments on commit e160490

Please sign in to comment.