Skip to content

Commit

Permalink
Merge branch 'release/2023.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
tnamao committed Dec 8, 2023
2 parents e160490 + 6540e11 commit c6b18ae
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:

- uses: dominikh/[email protected]
with:
version: "2023.1.3"
version: "2023.1.6"
install-go: false
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# CHANGES

## 2023.5.0

- [UPDATE] CI の staticcheck のバージョンを 2023.1.6 に上げる
- @tnamao
- [ADD] `sora_client``sora_c_sdk` に対応する
- @tnamao

## 2023.4.0

- [ADD] `sora_client``sora_python_sdk` に対応する
Expand Down
2 changes: 2 additions & 0 deletions collector/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func (m *ClientMetrics) Describe(ch chan<- *prometheus.Desc) {

func (m *ClientMetrics) Collect(ch chan<- prometheus.Metric, report soraClientReport) {
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.SoraAndroidSdk), "android_sdk", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.SoraCSdk), "c_sdk", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.SoraCppSdk), "cpp_sdk", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.SoraFlutterSdk), "flutter_sdk", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.SoraIosSdk), "ios_sdk", "failed")
Expand All @@ -30,6 +31,7 @@ func (m *ClientMetrics) Collect(ch chan<- prometheus.Metric, report soraClientRe
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.WebrtcLoadTestingToolZakuro), "zakuro", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalFailedSoraClientType.WebrtcNativeClientMomo), "momo", "failed")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.SoraAndroidSdk), "android_sdk", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.SoraCSdk), "c_sdk", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.SoraCppSdk), "cpp_sdk", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.SoraFlutterSdk), "flutter_sdk", "successful")
ch <- newCounter(m.totalSoraClientConnections, float64(report.TotalSuccessfulSoraClientType.SoraIosSdk), "ios_sdk", "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 @@ -40,6 +40,7 @@ type soraWebhookReport struct {

type soraClientStatistics struct {
SoraAndroidSdk int64 `json:"sora_android_sdk"`
SoraCSdk int64 `json:"sora_c_sdk"`
SoraCppSdk int64 `json:"sora_cpp_sdk"`
SoraFlutterSdk int64 `json:"sora_flutter_sdk"`
SoraIosSdk int64 `json:"sora_ios_sdk"`
Expand Down
2 changes: 2 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ var (
"sora_client": {
"total_failed_sora_client_type": {
"sora_android_sdk": 1,
"sora_c_sdk": 12,
"sora_cpp_sdk": 7,
"sora_flutter_sdk": 9,
"sora_ios_sdk": 2,
Expand All @@ -111,6 +112,7 @@ var (
},
"total_successful_sora_client_type": {
"sora_android_sdk": 11,
"sora_c_sdk": 1212,
"sora_cpp_sdk": 77,
"sora_flutter_sdk": 99,
"sora_ios_sdk": 22,
Expand Down
2 changes: 2 additions & 0 deletions test/maximum.metrics
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ sora_cluster_raft_term 3
# TYPE sora_client_type_total counter
sora_client_type_total{client="android_sdk",state="failed"} 1
sora_client_type_total{client="android_sdk",state="successful"} 11
sora_client_type_total{client="c_sdk",state="failed"} 12
sora_client_type_total{client="c_sdk",state="successful"} 1212
sora_client_type_total{client="cpp_sdk",state="failed"} 7
sora_client_type_total{client="cpp_sdk",state="successful"} 77
sora_client_type_total{client="flutter_sdk",state="failed"} 9
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 @@ -12,6 +12,8 @@ sora_average_setup_time_seconds 0
# TYPE sora_client_type_total counter
sora_client_type_total{client="android_sdk",state="failed"} 1
sora_client_type_total{client="android_sdk",state="successful"} 11
sora_client_type_total{client="c_sdk",state="failed"} 12
sora_client_type_total{client="c_sdk",state="successful"} 1212
sora_client_type_total{client="cpp_sdk",state="failed"} 7
sora_client_type_total{client="cpp_sdk",state="successful"} 77
sora_client_type_total{client="flutter_sdk",state="failed"} 9
Expand Down

0 comments on commit c6b18ae

Please sign in to comment.