diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84199cf..0c061b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,30 +3,29 @@ name: Go Static Check on: push: branches-ignore: - - 'main' + - "main" tags-ignore: - - '*' + - "*" paths: - "**.go" jobs: - build: name: static-check - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version-file: "./go.mod" + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: "./go.mod" - - run: go version + - run: go version - - run: go fmt . + - run: go fmt . - - uses: dominikh/staticcheck-action@v1.3.0 - with: - version: "2023.1.6" - install-go: false + - uses: dominikh/staticcheck-action@v1.3.1 + with: + version: "2024.1.1" + install-go: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdb37bd..cd31984 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: jobs: build: name: build - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -46,9 +46,22 @@ jobs: gzip dist/* - name: Release run: | - ghr -t "${{ secrets.GITHUB_TOKEN }}" \ - -u "${{ github.repository_owner }}" \ - -r "sora_exporter" \ - -n "${{ github.ref }}" \ - --replace "${GITHUB_REF##*/}" \ - dist/ + VERSION=$(git describe --tag --abbrev=0) + if [[ "${VERSION}" == *"canary"* ]]; then + ghr -t "${{ secrets.GITHUB_TOKEN }}" \ + -u "${{ github.repository_owner }}" \ + -r "sora_exporter" \ + -n "${VERSION}" \ + -replace \ + -prerelease \ + "${GITHUB_REF##*/}" \ + dist/ + else + ghr -t "${{ secrets.GITHUB_TOKEN }}" \ + -u "${{ github.repository_owner }}" \ + -r "sora_exporter" \ + -n "${VERSION}" \ + -replace \ + "${GITHUB_REF##*/}" \ + dist/ + fi diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 19a4ded..a236c08 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: build: name: go test - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/CHANGES.md b/CHANGES.md index f750977..69b0e80 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,7 +1,77 @@ -# CHANGES +# 変更履歴 + +- CHANGE + - 後方互換性のない変更 +- UPDATE + - 後方互換性がある変更 +- ADD + - 後方互換性がある追加 +- FIX + - バグ修正 + +## 2024.7.0 + +**リリース日**: 2024-12-18 + +- [CHANGE] クラスターメトリクスを収集する際の `ListClusterNodes` API の呼び出し時にリクエストパラメータの指定を削除する + - 破壊的変更になるため、バージョンアップの際に注意してください + - Sora 2024.2.0 での `include_all_known_nodes` パラメータ廃止への対応です + - Sora 2023.2 以前と Sora 2024.1 以降で、exporter が返すメトリクスの結果が変わります + - @tnamao +- [ADD] SRTP 統計情報を追加する + - Sora API の GetStatsReport API から取得可能な SRTP 統計情報を以下のメトリクス名で追加する + - `sora_srtp_received_packets_total` + - `sora_srtp_received_bytes_total` + - `sora_srtp_sent_packets_total` + - `sora_srtp_sent_bytes_total` + - `sora_srtp_decrypted_packets_total` + - `sora_srtp_decrypted_bytes_total` + - @tnamao +- [ADD] SCTP 統計情報を追加する + - Sora API の GetStatsReport API から取得可能な SCTP 統計情報を以下のメトリクス名で追加する + - `sora_sctp_received_packets_total` + - `sora_sctp_received_bytes_total` + - `sora_sctp_sent_packets_total` + - `sora_sctp_sent_bytes_total` + - @tnamao +- [ADD] 無視されたウェブフック数の統計情報を追加する + - Sora API の GetStatsReport API から取得可能な無視されたウェブフック数を以下のメトリクス名で追加する + - 既存の以下のメトリクスの `state` ラベルに `ignored` で値を返す + - `sora_event_webhook_total` + - `sora_session_webhook_total` + - `sora_stats_webhook_total` + - @tnamao +- [CHANGE] ログライブラリの変更 + - `prometheus/exporter-toolkit` の依存ログライブラリが `go-kit/log` から Go 言語標準ライブラリの `log/slog` に変更されたため、Sora expoter 内で使用しているロガーも `log/slog` に切り替える + - 同様にテストコードで使用していた `NewNopLogger` は代替として `slog.New(slog.NewTextHandler(io.Discard, nil))` を使用する形に変更する + - @tnamao +- [UPDATE] 依存パッケージを更新する + - prometheus/client_golang 1.19.1 => 1.20.5 + - prometheus/common 0.54.0 => 0.61.0 + - prometheus/exporter-toolkit 0.11.0 => 0.13.2 + - `prometheus/exporter-toolkit` のログライブラリ切り替えにより `go-kit/log` への依存はなくなりました + - @tnamao +- [UPDATE] Go を 1.23 に上げる + - @tnamao + +### misc + +- [CHANGE] GitHub Actions の ubuntu-latest を ubuntu-24.04 に変更する + - @voluntas +- [UPDATE] Github Actions のイメージを更新する + - actions/setup-go v4 => v5 + - dominikh/staticcheck-action v1.3.0 => v1.3.1 + - @tnamao +- [UPDATE] CI で実行する staticcheck のバージョンを更新する + - 2023.1.6 => 2024.1.1 + - @tnamao +- [ADD] CI のリリースに canary リリースの対応を追加する + - @tnamao ## 2024.6.0 +**リリース日**: 2024-06-20 + - [ADD] `sora_cluster_node` のメトリクスに `node_type` を追加する - `regular` または `temporary` のいずれかが入ります - @tnamao @@ -16,6 +86,8 @@ ## 2024.5.0 +**リリース日**: 2024-06-05 + - [ADD] Sora の Stats Webhook の統計情報に対応する - `sora_stats_webhook_total` メトリクスを追加し、ラベルに `successful` `failed` を設ける - @tnamao diff --git a/collector/collector.go b/collector/collector.go index a92a227..443f035 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -1,16 +1,14 @@ package collector import ( - "bytes" "context" "crypto/tls" "encoding/json" + "log/slog" "net/http" "sync" "time" - "github.com/go-kit/log" - "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) @@ -21,7 +19,7 @@ var ( type Collector struct { mutex sync.RWMutex - logger log.Logger + logger *slog.Logger timeout time.Duration URI string skipSslVerify bool @@ -37,6 +35,8 @@ type Collector struct { ConnectionMetrics WebhookMetrics + SrtpMetrics + SctpMetrics ClientMetrics SoraConnectionErrorMetrics ErlangVMMetrics @@ -49,7 +49,7 @@ type CollectorOptions struct { SkipSslVerify bool Timeout time.Duration FreezeTimeSeconds bool - Logger log.Logger + Logger *slog.Logger EnableSoraClientMetrics bool EnableSoraConnectionErrorMetrics bool EnableErlangVMMetrics bool @@ -60,10 +60,6 @@ type HTTPClient interface { Do(*http.Request) (*http.Response, error) } -type SoraListClusterNodesRequest struct { - IncludeAllKnownNodes bool `json:"include_all_known_nodes"` -} - func NewCollector(options *CollectorOptions) *Collector { return &Collector{ URI: options.URI, @@ -86,6 +82,8 @@ func NewCollector(options *CollectorOptions) *Collector { ConnectionMetrics: connectionMetrics, WebhookMetrics: webhookMetrics, + SrtpMetrics: srtpMetrics, + SctpMetrics: sctpMetrics, ClientMetrics: clientMetrics, SoraConnectionErrorMetrics: soraConnectionErrorMetrics, ErlangVMMetrics: erlangVMMetrics, @@ -103,7 +101,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) { req, err := http.NewRequestWithContext(ctx, http.MethodPost, c.URI, nil) if err != nil { - level.Error(c.logger).Log("msg", "failed to create request to sora", "err", err) + c.logger.Error("failed to create request to sora", "err", err) ch <- newGauge(c.soraUp, 0) return } @@ -117,7 +115,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) { resp, err := client.Do(req) if err != nil { - level.Error(c.logger).Log("msg", "failed to request to Sora GetStatsReport API", "err", err) + c.logger.Error("failed to request to Sora GetStatsReport API", "err", err) ch <- newGauge(c.soraUp, 0) return } @@ -125,26 +123,16 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) { var report soraGetStatsReport if err := json.NewDecoder(resp.Body).Decode(&report); err != nil { - level.Error(c.logger).Log("msg", "failed to decode response body from Sora GetStatsReport API", "err", err) + c.logger.Error("failed to decode response body from Sora GetStatsReport API", "err", err) ch <- newGauge(c.soraUp, 0) return } var nodeList []soraClusterNode if c.EnableSoraClusterMetrics { - requestParams := SoraListClusterNodesRequest{ - IncludeAllKnownNodes: true, - } - encodedParams, err := json.Marshal(requestParams) - if err != nil { - level.Error(c.logger).Log("msg", "failed to encode Sora ListClusterNodes API request parameters", "err", err) - ch <- newGauge(c.soraUp, 0) - return - } - - req, err = http.NewRequestWithContext(ctx, http.MethodPost, c.URI, bytes.NewBuffer(encodedParams)) + req, err = http.NewRequestWithContext(ctx, http.MethodPost, c.URI, nil) if err != nil { - level.Error(c.logger).Log("msg", "failed to create request to sora", "err", err) + c.logger.Error("failed to create request to sora", "err", err.Error()) ch <- newGauge(c.soraUp, 0) return } @@ -152,14 +140,14 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) { nodeResp, err := client.Do(req) if err != nil { - level.Error(c.logger).Log("msg", "failed to request to Sora ListClusterNodes API", "err", err) + c.logger.Error("failed to request to Sora ListClusterNodes API", "err", err) ch <- newGauge(c.soraUp, 0) return } defer nodeResp.Body.Close() if err := json.NewDecoder(nodeResp.Body).Decode(&nodeList); err != nil { - level.Error(c.logger).Log("msg", "failed to decode response body from Sora ListClusterNodes API", "err", err) + c.logger.Error("failed to decode response body from Sora ListClusterNodes API", "err", err) ch <- newGauge(c.soraUp, 0) return } @@ -167,7 +155,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) { req, err = http.NewRequestWithContext(ctx, http.MethodPost, c.URI, nil) if err != nil { - level.Error(c.logger).Log("msg", "failed to create request to sora", "err", err) + c.logger.Error("failed to create request to sora", "err", err) ch <- newGauge(c.soraUp, 0) return } @@ -175,7 +163,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) { licenseResp, err := client.Do(req) if err != nil { - level.Error(c.logger).Log("msg", "failed to request to Sora GetLicense API", "err", err) + c.logger.Error("failed to request to Sora GetLicense API", "err", err) ch <- newGauge(c.soraUp, 0) return } @@ -183,7 +171,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) { var licenseInfo soraLicenseInfo if err := json.NewDecoder(licenseResp.Body).Decode(&licenseInfo); err != nil { - level.Error(c.logger).Log("msg", "failed to decode response body from Sora GetLicense API", "err", err) + c.logger.Error("failed to decode response body from Sora GetLicense API", "err", err) ch <- newGauge(c.soraUp, 0) return } @@ -201,6 +189,8 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) { c.LicenseMetrics.Collect(ch, licenseInfo) c.ConnectionMetrics.Collect(ch, report.soraConnectionReport) c.WebhookMetrics.Collect(ch, report.soraWebhookReport) + c.SrtpMetrics.Collect(ch, report.soraSrtpReport) + c.SctpMetrics.Collect(ch, report.soraSctpReport) if c.enableSoraClientMetrics { c.ClientMetrics.Collect(ch, report.SoraClientReport) @@ -223,6 +213,8 @@ func (c *Collector) Describe(ch chan<- *prometheus.Desc) { c.LicenseMetrics.Describe(ch) c.ConnectionMetrics.Describe(ch) c.WebhookMetrics.Describe(ch) + c.SrtpMetrics.Describe(ch) + c.SctpMetrics.Describe(ch) if c.enableSoraClientMetrics { c.ClientMetrics.Describe(ch) diff --git a/collector/sctp.go b/collector/sctp.go new file mode 100644 index 0000000..6a04a38 --- /dev/null +++ b/collector/sctp.go @@ -0,0 +1,33 @@ +package collector + +import "github.com/prometheus/client_golang/prometheus" + +var ( + sctpMetrics = SctpMetrics{ + totalReceivedSctp: newDesc("sctp_received_packets_total", "The total number of received SCTP packets."), + totalReceivedSctpByteSize: newDesc("sctp_received_bytes_total", "The total number of received SCTP bytes."), + totalSentSctp: newDesc("sctp_sent_packets_total", "The total number of sent SCTP packets."), + totalSentSctpByteSize: newDesc("sctp_sent_bytes_total", "The total number of sent SCTP bytes."), + } +) + +type SctpMetrics struct { + totalReceivedSctp *prometheus.Desc + totalReceivedSctpByteSize *prometheus.Desc + totalSentSctp *prometheus.Desc + totalSentSctpByteSize *prometheus.Desc +} + +func (m *SctpMetrics) Describe(ch chan<- *prometheus.Desc) { + ch <- m.totalReceivedSctp + ch <- m.totalReceivedSctpByteSize + ch <- m.totalSentSctp + ch <- m.totalSentSctpByteSize +} + +func (m *SctpMetrics) Collect(ch chan<- prometheus.Metric, report soraSctpReport) { + ch <- newCounter(m.totalReceivedSctp, float64(report.TotalReceivedSctp)) + ch <- newCounter(m.totalReceivedSctpByteSize, float64(report.TotalReceivedSctpByteSize)) + ch <- newCounter(m.totalSentSctp, float64(report.TotalSentSctp)) + ch <- newCounter(m.totalSentSctpByteSize, float64(report.TotalSentSctpByteSize)) +} diff --git a/collector/sora_api.go b/collector/sora_api.go index 7c8de64..67031d4 100644 --- a/collector/sora_api.go +++ b/collector/sora_api.go @@ -4,6 +4,8 @@ type soraGetStatsReport struct { SoraVersion string `json:"version"` soraConnectionReport soraWebhookReport + soraSrtpReport + soraSctpReport SoraClientReport soraClientReport `json:"sora_client,omitempty"` SoraConnectionErrorReport soraConnectionErrorReport `json:"error,omitempty"` ErlangVMReport erlangVMReport `json:"erlang_vm,omitempty"` @@ -35,10 +37,29 @@ type soraWebhookReport struct { TotalFailedAuthWebhook int64 `json:"total_failed_auth_webhook"` TotalSuccessfulSessionWebhook int64 `json:"total_successful_session_webhook"` TotalFailedSessionWebhook int64 `json:"total_failed_session_webhook"` + TotalIgnoredSessionWebhook int64 `json:"total_ignored_session_webhook"` TotalSuccessfulEventWebhook int64 `json:"total_successful_event_webhook"` TotalFailedEventWebhook int64 `json:"total_failed_event_webhook"` + TotalIgnoredEventWebhook int64 `json:"total_ignored_event_webhook"` TotalSuccessfulStatsWebhook int64 `json:"total_successful_stats_webhook"` TotalFailedStatsWebhook int64 `json:"total_failed_stats_webhook"` + TotalIgnoredStatsWebhook int64 `json:"total_ignored_stats_webhook"` +} + +type soraSrtpReport struct { + TotalReceivedSrtp int64 `json:"total_received_srtp"` + TotalReceivedSrtpByteSize int64 `json:"total_received_srtp_byte_size"` + TotalSentSrtp int64 `json:"total_sent_srtp"` + TotalSentSrtpByteSize int64 `json:"total_sent_srtp_byte_size"` + TotalDecryptedSrtp int64 `json:"total_decrypted_srtp"` + TotalDecryptedSrtpByteSize int64 `json:"total_decrypted_srtp_byte_size"` +} + +type soraSctpReport struct { + TotalReceivedSctp int64 `json:"total_received_sctp"` + TotalReceivedSctpByteSize int64 `json:"total_received_sctp_byte_size"` + TotalSentSctp int64 `json:"total_sent_sctp"` + TotalSentSctpByteSize int64 `json:"total_sent_sctp_byte_size"` } type soraClientStatistics struct { diff --git a/collector/srtp.go b/collector/srtp.go new file mode 100644 index 0000000..dc500c6 --- /dev/null +++ b/collector/srtp.go @@ -0,0 +1,41 @@ +package collector + +import "github.com/prometheus/client_golang/prometheus" + +var ( + srtpMetrics = SrtpMetrics{ + totalReceivedSrtp: newDesc("srtp_received_packets_total", "The total number of received SRTP packets."), + totalReceivedSrtpByteSize: newDesc("srtp_received_bytes_total", "The total number of received SRTP bytes."), + totalSentSrtp: newDesc("srtp_sent_packets_total", "The total number of sent SRTP packets."), + totalSentSrtpByteSize: newDesc("srtp_sent_bytes_total", "The total number of sent SRTP bytes."), + totalDecryptedSrtp: newDesc("srtp_decrypted_packets_total", "The total number of decrpyted SRTP packets."), + totalDecryptedSrtpByteSize: newDesc("srtp_decrpyted_bytes_total", "The total number of decrypted SRTP bytes."), + } +) + +type SrtpMetrics struct { + totalReceivedSrtp *prometheus.Desc + totalReceivedSrtpByteSize *prometheus.Desc + totalSentSrtp *prometheus.Desc + totalSentSrtpByteSize *prometheus.Desc + totalDecryptedSrtp *prometheus.Desc + totalDecryptedSrtpByteSize *prometheus.Desc +} + +func (m *SrtpMetrics) Describe(ch chan<- *prometheus.Desc) { + ch <- m.totalReceivedSrtp + ch <- m.totalReceivedSrtpByteSize + ch <- m.totalSentSrtp + ch <- m.totalSentSrtpByteSize + ch <- m.totalDecryptedSrtp + ch <- m.totalDecryptedSrtpByteSize +} + +func (m *SrtpMetrics) Collect(ch chan<- prometheus.Metric, report soraSrtpReport) { + ch <- newCounter(m.totalReceivedSrtp, float64(report.TotalReceivedSrtp)) + ch <- newCounter(m.totalReceivedSrtpByteSize, float64(report.TotalReceivedSrtpByteSize)) + ch <- newCounter(m.totalSentSrtp, float64(report.TotalSentSrtp)) + ch <- newCounter(m.totalSentSrtpByteSize, float64(report.TotalSentSrtpByteSize)) + ch <- newCounter(m.totalDecryptedSrtp, float64(report.TotalDecryptedSrtp)) + ch <- newCounter(m.totalDecryptedSrtpByteSize, float64(report.TotalDecryptedSrtpByteSize)) +} diff --git a/collector/webhook.go b/collector/webhook.go index d7c5cee..26ccf34 100644 --- a/collector/webhook.go +++ b/collector/webhook.go @@ -35,8 +35,11 @@ func (m *WebhookMetrics) Collect(ch chan<- prometheus.Metric, report soraWebhook ch <- newCounter(m.totalAuthWebhook, float64(report.TotalFailedAuthWebhook), "failed") ch <- newCounter(m.totalSessionWebhook, float64(report.TotalSuccessfulSessionWebhook), "successful") ch <- newCounter(m.totalSessionWebhook, float64(report.TotalFailedSessionWebhook), "failed") + ch <- newCounter(m.totalSessionWebhook, float64(report.TotalIgnoredSessionWebhook), "ignored") ch <- newCounter(m.totalEventWebhook, float64(report.TotalSuccessfulEventWebhook), "successful") ch <- newCounter(m.totalEventWebhook, float64(report.TotalFailedEventWebhook), "failed") + ch <- newCounter(m.totalEventWebhook, float64(report.TotalIgnoredEventWebhook), "ignored") ch <- newCounter(m.totalStatsWebhook, float64(report.TotalSuccessfulStatsWebhook), "successful") ch <- newCounter(m.totalStatsWebhook, float64(report.TotalFailedStatsWebhook), "failed") + ch <- newCounter(m.totalStatsWebhook, float64(report.TotalIgnoredStatsWebhook), "ignored") } diff --git a/go.mod b/go.mod index 68bf4a5..cf40f29 100644 --- a/go.mod +++ b/go.mod @@ -1,33 +1,35 @@ module github.com/shiguredo/sora_exporter -go 1.22 +go 1.23 require ( github.com/alecthomas/kingpin/v2 v2.4.0 - github.com/go-kit/log v0.2.1 - github.com/prometheus/client_golang v1.19.1 - github.com/prometheus/common v0.54.0 - github.com/prometheus/exporter-toolkit v0.11.0 + github.com/prometheus/client_golang v1.20.5 + github.com/prometheus/common v0.61.0 + github.com/prometheus/exporter-toolkit v0.13.2 ) require ( - github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect + github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect + github.com/klauspost/compress v1.17.11 // indirect + github.com/kylelemons/godebug v1.1.0 // indirect + github.com/mdlayher/socket v0.5.1 // indirect + github.com/mdlayher/vsock v1.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/xhit/go-str2duration/v2 v2.1.0 // indirect - golang.org/x/crypto v0.24.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - google.golang.org/protobuf v1.34.2 // indirect + golang.org/x/crypto v0.31.0 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/oauth2 v0.24.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect + google.golang.org/protobuf v1.36.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index 698baed..91f105a 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= -github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 h1:ez/4by2iGztzR4L0zgAOR8lTQK9VlyBVVd7G4omaOQs= -github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b h1:mimo19zliBX/vSQ6PWWSL9lK8qwHozUj03+zLoEB8O0= +github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= @@ -11,60 +11,74 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= -github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= -github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= -github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/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/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= 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/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/mdlayher/socket v0.5.1 h1:VZaqt6RkGkt2OE9l3GcC6nZkqD3xKeQLyfleW/uBcos= +github.com/mdlayher/socket v0.5.1/go.mod h1:TjPLHI1UgwEv5J1B5q0zTZq12A/6H7nKmtTanQE37IQ= +github.com/mdlayher/vsock v1.2.1 h1:pC1mTJTvjo1r9n9fbm7S1j04rCgCzhCOS5DY0zqHlnQ= +github.com/mdlayher/vsock v1.2.1/go.mod h1:NRfCibel++DgeMD8z/hP+PPTjlNJsdPOmxcnENvE+SE= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/common v0.54.0/go.mod h1:/TQgMJP5CuVYveyT7n/0Ix8yLNNXy9yRSkhnLTHPDIQ= -github.com/prometheus/exporter-toolkit v0.11.0 h1:yNTsuZ0aNCNFQ3aFTD2uhPOvr4iD7fdBvKPAEGkNf+g= -github.com/prometheus/exporter-toolkit v0.11.0/go.mod h1:BVnENhnNecpwoTLiABx7mrPB/OLRIgN74qlQbV+FK1Q= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= +github.com/prometheus/exporter-toolkit v0.13.2 h1:Z02fYtbqTMy2i/f+xZ+UK5jy/bl1Ex3ndzh06T/Q9DQ= +github.com/prometheus/exporter-toolkit v0.13.2/go.mod h1:tCqnfx21q6qN1KA4U3Bfb8uWzXfijIrJz3/kTIqMV7g= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= 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/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/oauth2 v0.21.0 h1:tsimM75w1tF/uws5rbeHzIWxEqElMehnc+iW793zsZs= -golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= -google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= +golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= 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.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/main.go b/main.go index 2110c7f..3268ceb 100644 --- a/main.go +++ b/main.go @@ -1,22 +1,20 @@ package main import ( - stdlog "log" + "log/slog" "net/http" "os" "os/user" "time" - "github.com/go-kit/log" - "github.com/go-kit/log/level" "github.com/shiguredo/sora_exporter/collector" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors/version" "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/prometheus/common/promlog" - "github.com/prometheus/common/promlog/flag" + "github.com/prometheus/common/promslog" + "github.com/prometheus/common/promslog/flag" commonVersion "github.com/prometheus/common/version" promcollectors "github.com/prometheus/client_golang/prometheus/collectors" @@ -83,7 +81,7 @@ type handler struct { exporterMetricsRegistry *prometheus.Registry includeExporterMetrics bool maxRequests int - logger log.Logger + logger *slog.Logger soraAPIURL string soraSkipSslVeirfy bool soraTimeout time.Duration @@ -95,7 +93,7 @@ type handler struct { } func newHandler( - includeExporterMetrics bool, maxRequests int, logger log.Logger, + includeExporterMetrics bool, maxRequests int, logger *slog.Logger, soraAPIURL string, soraSkipSslVeirfy bool, soraTimeout time.Duration, soraFreezeTimeSeconds bool, enableSoraClientMetrics bool, enableSoraConnectionErrorMetrics bool, enableErlangVMMetrics bool, enableSoraClusterMetrics bool) *handler { @@ -145,7 +143,7 @@ func (h *handler) innerHandler() http.Handler { handler := promhttp.HandlerFor( prometheus.Gatherers{h.exporterMetricsRegistry, r}, promhttp.HandlerOpts{ - ErrorLog: stdlog.New(log.NewStdlibAdapter(level.Error(h.logger)), "", 0), + ErrorLog: slog.NewLogLogger(h.logger.Handler(), slog.LevelError), ErrorHandling: promhttp.ContinueOnError, MaxRequestsInFlight: h.maxRequests, Registry: h.exporterMetricsRegistry, @@ -162,20 +160,20 @@ func (h *handler) innerHandler() http.Handler { } func main() { - promlogConfig := &promlog.Config{} - flag.AddFlags(kingpin.CommandLine, promlogConfig) + promslogConfig := &promslog.Config{} + flag.AddFlags(kingpin.CommandLine, promslogConfig) kingpin.Version(commonVersion.Print("sora_exporter")) kingpin.CommandLine.UsageWriter(os.Stdout) kingpin.HelpFlag.Short('h') kingpin.Parse() - logger := promlog.New(promlogConfig) - level.Info(logger).Log("msg", "Starting sora_exporter", "version", commonVersion.Info()) - level.Info(logger).Log("msg", "Build context", "build_context", commonVersion.BuildContext()) + logger := promslog.New(promslogConfig) + logger.Info("Starting sora_exporter", "version", commonVersion.Info()) + logger.Info("Build context", "build_context", commonVersion.BuildContext()) // root 権限で起動してたら warning を出す if user, err := user.Current(); err == nil && user.Uid == "0" { - level.Warn(logger).Log("msg", "Sora Exporter is running as root user. This exporter is designed to run as unpriviledged user, root is not required.") + logger.Warn("Sora Exporter は root ユーザーで実行されています。このエクスポーターは特権を必要としません。root で実行する必要はありません。") } http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { @@ -193,7 +191,7 @@ func main() { *enableSoraClientMetrics, *enableSoraConnectionErrorMetrics, *enableErlangVMMetrics, *enableSoraClusterMetrics) http.Handle(*metricsPath, soraHandler) - level.Info(logger).Log("msg", "Listening on", "address", *listenAddress) + logger.Info("Listening on", "address", *listenAddress) server := &http.Server{} webSystemdSocket := false webConfigFile := "" @@ -203,7 +201,7 @@ func main() { WebConfigFile: &webConfigFile, } if err := web.ListenAndServe(server, webFlagConfig, logger); err != nil { - level.Error(logger).Log("err", err) + logger.Error("Error starting HTTP server", "err", err) os.Exit(1) } } diff --git a/main_test.go b/main_test.go index 2c3756f..34dcb9c 100644 --- a/main_test.go +++ b/main_test.go @@ -2,6 +2,8 @@ package main import ( "fmt" + "io" + "log/slog" "net/http" "net/http/httptest" "os" @@ -9,7 +11,6 @@ import ( "testing" "time" - "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/shiguredo/sora_exporter/collector" @@ -148,14 +149,23 @@ var ( "total_connection_created": 2, "total_connection_destroyed": 2, "total_connection_updated": 23, + "total_decrypted_srtp": 104, + "total_decrypted_srtp_byte_size": 105, "total_duration_sec": 1412, "total_failed_auth_webhook": 93, "total_failed_connections": 0, "total_failed_event_webhook": 94, "total_failed_session_webhook": 95, "total_failed_stats_webhook": 99, + "total_ignored_event_webhook": 101, + "total_ignored_session_webhook": 102, + "total_ignored_stats_webhook": 103, "total_ongoing_connections": 0, "total_received_invalid_turn_tcp_packet": 0, + "total_sent_sctp": 110, + "total_sent_sctp_byte_size": 111, + "total_sent_srtp": 106, + "total_sent_srtp_byte_size": 107, "total_session_created": 1, "total_session_destroyed": 0, "total_successful_auth_webhook": 96, @@ -163,6 +173,10 @@ var ( "total_successful_event_webhook": 97, "total_successful_session_webhook": 98, "total_successful_stats_webhook": 100, + "total_received_sctp": 112, + "total_received_sctp_byte_size": 113, + "total_received_srtp": 108, + "total_received_srtp_byte_size": 109, "total_turn_tcp_connections": 2, "total_turn_udp_connections": 0, "version": "2022.1.0-canary.28" @@ -299,13 +313,14 @@ func TestInvalidConfig(t *testing.T) { s := newSora([]byte("invalid config parameter"), []byte(listClusterNodesJSONData), []byte(getLicenseJSONDATA)) defer s.Close() + nopLogger := slog.New(slog.NewTextHandler(io.Discard, nil)) timeout, _ := time.ParseDuration("5s") h := collector.NewCollector(&collector.CollectorOptions{ URI: s.URL, SkipSslVerify: true, Timeout: timeout, FreezeTimeSeconds: true, - Logger: log.NewNopLogger(), + Logger: nopLogger, EnableSoraClientMetrics: true, EnableSoraConnectionErrorMetrics: true, EnableErlangVMMetrics: true, @@ -318,13 +333,14 @@ func TestMaximumMetrics(t *testing.T) { s := newSora([]byte(testJSONData), []byte(listClusterNodesJSONData), []byte(getLicenseJSONDATA)) defer s.Close() + nopLogger := slog.New(slog.NewTextHandler(io.Discard, nil)) timeout, _ := time.ParseDuration("5s") h := collector.NewCollector(&collector.CollectorOptions{ URI: s.URL, SkipSslVerify: true, Timeout: timeout, FreezeTimeSeconds: true, - Logger: log.NewNopLogger(), + Logger: nopLogger, EnableSoraClientMetrics: true, EnableSoraConnectionErrorMetrics: true, EnableErlangVMMetrics: true, @@ -337,13 +353,14 @@ func TestSoraErlangVMEnabledMetrics(t *testing.T) { s := newSora([]byte(testJSONData), []byte(listClusterNodesJSONData), []byte(getLicenseJSONDATA)) defer s.Close() + nopLogger := slog.New(slog.NewTextHandler(io.Discard, nil)) timeout, _ := time.ParseDuration("5s") h := collector.NewCollector(&collector.CollectorOptions{ URI: s.URL, SkipSslVerify: true, Timeout: timeout, FreezeTimeSeconds: true, - Logger: log.NewNopLogger(), + Logger: nopLogger, EnableSoraClientMetrics: false, EnableSoraConnectionErrorMetrics: false, EnableErlangVMMetrics: true, @@ -356,13 +373,14 @@ func TestSoraClientEnabledMetrics(t *testing.T) { s := newSora([]byte(testJSONData), []byte(listClusterNodesJSONData), []byte(getLicenseJSONDATA)) defer s.Close() + nopLogger := slog.New(slog.NewTextHandler(io.Discard, nil)) timeout, _ := time.ParseDuration("5s") h := collector.NewCollector(&collector.CollectorOptions{ URI: s.URL, SkipSslVerify: true, Timeout: timeout, FreezeTimeSeconds: true, - Logger: log.NewNopLogger(), + Logger: nopLogger, EnableSoraClientMetrics: true, EnableSoraConnectionErrorMetrics: false, EnableErlangVMMetrics: false, @@ -375,13 +393,14 @@ func TestSoraConnectionErrorEnabledMetrics(t *testing.T) { s := newSora([]byte(testJSONData), []byte(listClusterNodesJSONData), []byte(getLicenseJSONDATA)) defer s.Close() + nopLogger := slog.New(slog.NewTextHandler(io.Discard, nil)) timeout, _ := time.ParseDuration("5s") h := collector.NewCollector(&collector.CollectorOptions{ URI: s.URL, SkipSslVerify: true, Timeout: timeout, FreezeTimeSeconds: true, - Logger: log.NewNopLogger(), + Logger: nopLogger, EnableSoraClientMetrics: false, EnableSoraConnectionErrorMetrics: true, EnableErlangVMMetrics: false, @@ -399,14 +418,23 @@ func TestMinimumMetrics(t *testing.T) { "total_connection_created": 3, "total_connection_destroyed": 2, "total_connection_updated": 23, + "total_decrypted_srtp": 104, + "total_decrypted_srtp_byte_size": 105, "total_duration_sec": 1412, "total_failed_auth_webhook": 93, "total_failed_connections": 100, "total_failed_event_webhook": 94, "total_failed_session_webhook": 95, "total_failed_stats_webhook": 99, + "total_ignored_event_webhook": 101, + "total_ignored_session_webhook": 102, + "total_ignored_stats_webhook": 103, "total_ongoing_connections": 88, "total_received_invalid_turn_tcp_packet": 123, + "total_sent_sctp": 110, + "total_sent_sctp_byte_size": 111, + "total_sent_srtp": 106, + "total_sent_srtp_byte_size": 107, "total_session_created": 111, "total_session_destroyed": 222, "total_successful_auth_webhook": 96, @@ -414,6 +442,10 @@ func TestMinimumMetrics(t *testing.T) { "total_successful_event_webhook": 97, "total_successful_session_webhook": 98, "total_successful_stats_webhook": 100, + "total_received_sctp": 112, + "total_received_sctp_byte_size": 113, + "total_received_srtp": 108, + "total_received_srtp_byte_size": 109, "total_turn_tcp_connections": 444, "total_turn_udp_connections": 555, "version": "2022.1.0-canary.28" @@ -421,13 +453,14 @@ func TestMinimumMetrics(t *testing.T) { s := newSora([]byte(resp), []byte(listClusterNodesJSONData), []byte(getLicenseWithoutMaxNodesJSONDATA)) defer s.Close() + nopLogger := slog.New(slog.NewTextHandler(io.Discard, nil)) timeout, _ := time.ParseDuration("5s") h := collector.NewCollector(&collector.CollectorOptions{ URI: s.URL, SkipSslVerify: true, Timeout: timeout, FreezeTimeSeconds: true, - Logger: log.NewNopLogger(), + Logger: nopLogger, EnableSoraClientMetrics: false, EnableSoraConnectionErrorMetrics: false, EnableErlangVMMetrics: false, @@ -440,13 +473,14 @@ func TestSoraClusterEnabledMetrics(t *testing.T) { s := newSora([]byte(testJSONData), []byte(listClusterNodesJSONData), []byte(getLicenseJSONDATA)) defer s.Close() + nopLogger := slog.New(slog.NewTextHandler(io.Discard, nil)) timeout, _ := time.ParseDuration("5s") h := collector.NewCollector(&collector.CollectorOptions{ URI: s.URL, SkipSslVerify: true, Timeout: timeout, FreezeTimeSeconds: true, - Logger: log.NewNopLogger(), + Logger: nopLogger, EnableSoraClientMetrics: false, EnableSoraConnectionErrorMetrics: false, EnableErlangVMMetrics: false, @@ -460,13 +494,14 @@ func TestSoraClusterEnabledMetricsCurrentJsonData(t *testing.T) { s := newSora([]byte(testJSONData), []byte(listClusterNodesCurrentJSONData), []byte(getLicenseJSONDATA)) defer s.Close() + nopLogger := slog.New(slog.NewTextHandler(io.Discard, nil)) timeout, _ := time.ParseDuration("5s") h := collector.NewCollector(&collector.CollectorOptions{ URI: s.URL, SkipSslVerify: true, Timeout: timeout, FreezeTimeSeconds: true, - Logger: log.NewNopLogger(), + Logger: nopLogger, EnableSoraClientMetrics: false, EnableSoraConnectionErrorMetrics: false, EnableErlangVMMetrics: false, diff --git a/renovate.json b/renovate.json deleted file mode 100644 index 1b8481f..0000000 --- a/renovate.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base" - ], - "dependencyDashboard": false, - "packageRules": [ - { - "matchUpdateTypes": ["minor", "patch", "pin", "digest"], - "platformAutomerge": true, - "automerge": true - } - ] -} diff --git a/test/maximum.metrics b/test/maximum.metrics index 602a210..9dc08c0 100644 --- a/test/maximum.metrics +++ b/test/maximum.metrics @@ -164,6 +164,7 @@ sora_erlang_vm_wall_clock_wallclock_time_since_last_call 9090 # HELP sora_event_webhook_total The total number of event webhook. # TYPE sora_event_webhook_total counter sora_event_webhook_total{state="failed"} 94 +sora_event_webhook_total{state="ignored"} 101 sora_event_webhook_total{state="successful"} 97 # HELP sora_license_expired_at_timestamp_seconds sora license file's expire seconds since epoch. # TYPE sora_license_expired_at_timestamp_seconds gauge @@ -187,13 +188,45 @@ sora_received_invalid_turn_tcp_packet_total 0 # TYPE sora_session_total counter sora_session_total{state="created"} 1 sora_session_total{state="destroyed"} 0 +# HELP sora_sctp_received_bytes_total The total number of received SCTP bytes. +# TYPE sora_sctp_received_bytes_total counter +sora_sctp_received_bytes_total 113 +# HELP sora_sctp_received_packets_total The total number of received SCTP packets. +# TYPE sora_sctp_received_packets_total counter +sora_sctp_received_packets_total 112 +# HELP sora_sctp_sent_bytes_total The total number of sent SCTP bytes. +# TYPE sora_sctp_sent_bytes_total counter +sora_sctp_sent_bytes_total 111 +# HELP sora_sctp_sent_packets_total The total number of sent SCTP packets. +# TYPE sora_sctp_sent_packets_total counter +sora_sctp_sent_packets_total 110 # HELP sora_session_webhook_total The total number of session webhook. # TYPE sora_session_webhook_total counter sora_session_webhook_total{state="failed"} 95 +sora_session_webhook_total{state="ignored"} 102 sora_session_webhook_total{state="successful"} 98 +# HELP sora_srtp_decrpyted_bytes_total The total number of decrypted SRTP bytes. +# TYPE sora_srtp_decrpyted_bytes_total counter +sora_srtp_decrpyted_bytes_total 105 +# HELP sora_srtp_decrypted_packets_total The total number of decrpyted SRTP packets. +# TYPE sora_srtp_decrypted_packets_total counter +sora_srtp_decrypted_packets_total 104 +# HELP sora_srtp_received_bytes_total The total number of received SRTP bytes. +# TYPE sora_srtp_received_bytes_total counter +sora_srtp_received_bytes_total 109 +# HELP sora_srtp_received_packets_total The total number of received SRTP packets. +# TYPE sora_srtp_received_packets_total counter +sora_srtp_received_packets_total 108 +# HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. +# TYPE sora_srtp_sent_bytes_total counter +sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. +# TYPE sora_srtp_sent_packets_total counter +sora_srtp_sent_packets_total 106 # HELP sora_stats_webhook_total The total number of stats webhook. # TYPE sora_stats_webhook_total counter sora_stats_webhook_total{state="failed"} 99 +sora_stats_webhook_total{state="ignored"} 103 sora_stats_webhook_total{state="successful"} 100 # HELP sora_successful_auth_webhook_total The total number of successful auth webhook. # TYPE sora_successful_auth_webhook_total counter diff --git a/test/minimum.metrics b/test/minimum.metrics index b88e5dd..47ed127 100644 --- a/test/minimum.metrics +++ b/test/minimum.metrics @@ -21,6 +21,7 @@ sora_duration_seconds_total 1412 # HELP sora_event_webhook_total The total number of event webhook. # TYPE sora_event_webhook_total counter sora_event_webhook_total{state="failed"} 94 +sora_event_webhook_total{state="ignored"} 101 sora_event_webhook_total{state="successful"} 97 # HELP sora_license_expired_at_timestamp_seconds sora license file's expire seconds since epoch. # TYPE sora_license_expired_at_timestamp_seconds gauge @@ -41,13 +42,45 @@ sora_received_invalid_turn_tcp_packet_total 123 # TYPE sora_session_total counter sora_session_total{state="created"} 111 sora_session_total{state="destroyed"} 222 +# HELP sora_sctp_received_bytes_total The total number of received SCTP bytes. +# TYPE sora_sctp_received_bytes_total counter +sora_sctp_received_bytes_total 113 +# HELP sora_sctp_received_packets_total The total number of received SCTP packets. +# TYPE sora_sctp_received_packets_total counter +sora_sctp_received_packets_total 112 +# HELP sora_sctp_sent_bytes_total The total number of sent SCTP bytes. +# TYPE sora_sctp_sent_bytes_total counter +sora_sctp_sent_bytes_total 111 +# HELP sora_sctp_sent_packets_total The total number of sent SCTP packets. +# TYPE sora_sctp_sent_packets_total counter +sora_sctp_sent_packets_total 110 # HELP sora_session_webhook_total The total number of session webhook. # TYPE sora_session_webhook_total counter sora_session_webhook_total{state="failed"} 95 +sora_session_webhook_total{state="ignored"} 102 sora_session_webhook_total{state="successful"} 98 +# HELP sora_srtp_decrpyted_bytes_total The total number of decrypted SRTP bytes. +# TYPE sora_srtp_decrpyted_bytes_total counter +sora_srtp_decrpyted_bytes_total 105 +# HELP sora_srtp_decrypted_packets_total The total number of decrpyted SRTP packets. +# TYPE sora_srtp_decrypted_packets_total counter +sora_srtp_decrypted_packets_total 104 +# HELP sora_srtp_received_bytes_total The total number of received SRTP bytes. +# TYPE sora_srtp_received_bytes_total counter +sora_srtp_received_bytes_total 109 +# HELP sora_srtp_received_packets_total The total number of received SRTP packets. +# TYPE sora_srtp_received_packets_total counter +sora_srtp_received_packets_total 108 +# HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. +# TYPE sora_srtp_sent_bytes_total counter +sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. +# TYPE sora_srtp_sent_packets_total counter +sora_srtp_sent_packets_total 106 # HELP sora_stats_webhook_total The total number of stats webhook. # TYPE sora_stats_webhook_total counter sora_stats_webhook_total{state="failed"} 99 +sora_stats_webhook_total{state="ignored"} 103 sora_stats_webhook_total{state="successful"} 100 # HELP sora_successful_auth_webhook_total The total number of successful auth webhook. # TYPE sora_successful_auth_webhook_total counter diff --git a/test/sora_client_enabled.metrics b/test/sora_client_enabled.metrics index 0b2877a..ccb12bb 100644 --- a/test/sora_client_enabled.metrics +++ b/test/sora_client_enabled.metrics @@ -49,6 +49,7 @@ sora_duration_seconds_total 1412 # HELP sora_event_webhook_total The total number of event webhook. # TYPE sora_event_webhook_total counter sora_event_webhook_total{state="failed"} 94 +sora_event_webhook_total{state="ignored"} 101 sora_event_webhook_total{state="successful"} 97 # HELP sora_license_expired_at_timestamp_seconds sora license file's expire seconds since epoch. # TYPE sora_license_expired_at_timestamp_seconds gauge @@ -72,13 +73,45 @@ sora_received_invalid_turn_tcp_packet_total 0 # TYPE sora_session_total counter sora_session_total{state="created"} 1 sora_session_total{state="destroyed"} 0 +# HELP sora_sctp_received_bytes_total The total number of received SCTP bytes. +# TYPE sora_sctp_received_bytes_total counter +sora_sctp_received_bytes_total 113 +# HELP sora_sctp_received_packets_total The total number of received SCTP packets. +# TYPE sora_sctp_received_packets_total counter +sora_sctp_received_packets_total 112 +# HELP sora_sctp_sent_bytes_total The total number of sent SCTP bytes. +# TYPE sora_sctp_sent_bytes_total counter +sora_sctp_sent_bytes_total 111 +# HELP sora_sctp_sent_packets_total The total number of sent SCTP packets. +# TYPE sora_sctp_sent_packets_total counter +sora_sctp_sent_packets_total 110 # HELP sora_session_webhook_total The total number of session webhook. # TYPE sora_session_webhook_total counter sora_session_webhook_total{state="failed"} 95 +sora_session_webhook_total{state="ignored"} 102 sora_session_webhook_total{state="successful"} 98 +# HELP sora_srtp_decrpyted_bytes_total The total number of decrypted SRTP bytes. +# TYPE sora_srtp_decrpyted_bytes_total counter +sora_srtp_decrpyted_bytes_total 105 +# HELP sora_srtp_decrypted_packets_total The total number of decrpyted SRTP packets. +# TYPE sora_srtp_decrypted_packets_total counter +sora_srtp_decrypted_packets_total 104 +# HELP sora_srtp_received_bytes_total The total number of received SRTP bytes. +# TYPE sora_srtp_received_bytes_total counter +sora_srtp_received_bytes_total 109 +# HELP sora_srtp_received_packets_total The total number of received SRTP packets. +# TYPE sora_srtp_received_packets_total counter +sora_srtp_received_packets_total 108 +# HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. +# TYPE sora_srtp_sent_bytes_total counter +sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. +# TYPE sora_srtp_sent_packets_total counter +sora_srtp_sent_packets_total 106 # HELP sora_stats_webhook_total The total number of stats webhook. # TYPE sora_stats_webhook_total counter sora_stats_webhook_total{state="failed"} 99 +sora_stats_webhook_total{state="ignored"} 103 sora_stats_webhook_total{state="successful"} 100 # HELP sora_successful_auth_webhook_total The total number of successful auth webhook. # TYPE sora_successful_auth_webhook_total counter diff --git a/test/sora_cluster_metrics_enabled.metrics b/test/sora_cluster_metrics_enabled.metrics index 31b9f3e..fa234ba 100644 --- a/test/sora_cluster_metrics_enabled.metrics +++ b/test/sora_cluster_metrics_enabled.metrics @@ -51,6 +51,7 @@ sora_duration_seconds_total 1412 # HELP sora_event_webhook_total The total number of event webhook. # TYPE sora_event_webhook_total counter sora_event_webhook_total{state="failed"} 94 +sora_event_webhook_total{state="ignored"} 101 sora_event_webhook_total{state="successful"} 97 # HELP sora_license_expired_at_timestamp_seconds sora license file's expire seconds since epoch. # TYPE sora_license_expired_at_timestamp_seconds gauge @@ -74,13 +75,45 @@ sora_received_invalid_turn_tcp_packet_total 0 # TYPE sora_session_total counter sora_session_total{state="created"} 1 sora_session_total{state="destroyed"} 0 +# HELP sora_sctp_received_bytes_total The total number of received SCTP bytes. +# TYPE sora_sctp_received_bytes_total counter +sora_sctp_received_bytes_total 113 +# HELP sora_sctp_received_packets_total The total number of received SCTP packets. +# TYPE sora_sctp_received_packets_total counter +sora_sctp_received_packets_total 112 +# HELP sora_sctp_sent_bytes_total The total number of sent SCTP bytes. +# TYPE sora_sctp_sent_bytes_total counter +sora_sctp_sent_bytes_total 111 +# HELP sora_sctp_sent_packets_total The total number of sent SCTP packets. +# TYPE sora_sctp_sent_packets_total counter +sora_sctp_sent_packets_total 110 # HELP sora_session_webhook_total The total number of session webhook. # TYPE sora_session_webhook_total counter sora_session_webhook_total{state="failed"} 95 +sora_session_webhook_total{state="ignored"} 102 sora_session_webhook_total{state="successful"} 98 +# HELP sora_srtp_decrpyted_bytes_total The total number of decrypted SRTP bytes. +# TYPE sora_srtp_decrpyted_bytes_total counter +sora_srtp_decrpyted_bytes_total 105 +# HELP sora_srtp_decrypted_packets_total The total number of decrpyted SRTP packets. +# TYPE sora_srtp_decrypted_packets_total counter +sora_srtp_decrypted_packets_total 104 +# HELP sora_srtp_received_bytes_total The total number of received SRTP bytes. +# TYPE sora_srtp_received_bytes_total counter +sora_srtp_received_bytes_total 109 +# HELP sora_srtp_received_packets_total The total number of received SRTP packets. +# TYPE sora_srtp_received_packets_total counter +sora_srtp_received_packets_total 108 +# HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. +# TYPE sora_srtp_sent_bytes_total counter +sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. +# TYPE sora_srtp_sent_packets_total counter +sora_srtp_sent_packets_total 106 # HELP sora_stats_webhook_total The total number of stats webhook. # TYPE sora_stats_webhook_total counter sora_stats_webhook_total{state="failed"} 99 +sora_stats_webhook_total{state="ignored"} 103 sora_stats_webhook_total{state="successful"} 100 # HELP sora_successful_auth_webhook_total The total number of successful auth webhook. # TYPE sora_successful_auth_webhook_total counter diff --git a/test/sora_connection_error_enabled.metrics b/test/sora_connection_error_enabled.metrics index 105a911..a9a7eef 100644 --- a/test/sora_connection_error_enabled.metrics +++ b/test/sora_connection_error_enabled.metrics @@ -25,6 +25,7 @@ sora_duration_seconds_total 1412 # HELP sora_event_webhook_total The total number of event webhook. # TYPE sora_event_webhook_total counter sora_event_webhook_total{state="failed"} 94 +sora_event_webhook_total{state="ignored"} 101 sora_event_webhook_total{state="successful"} 97 # HELP sora_license_expired_at_timestamp_seconds sora license file's expire seconds since epoch. # TYPE sora_license_expired_at_timestamp_seconds gauge @@ -48,13 +49,45 @@ sora_received_invalid_turn_tcp_packet_total 0 # TYPE sora_session_total counter sora_session_total{state="created"} 1 sora_session_total{state="destroyed"} 0 +# HELP sora_sctp_received_bytes_total The total number of received SCTP bytes. +# TYPE sora_sctp_received_bytes_total counter +sora_sctp_received_bytes_total 113 +# HELP sora_sctp_received_packets_total The total number of received SCTP packets. +# TYPE sora_sctp_received_packets_total counter +sora_sctp_received_packets_total 112 +# HELP sora_sctp_sent_bytes_total The total number of sent SCTP bytes. +# TYPE sora_sctp_sent_bytes_total counter +sora_sctp_sent_bytes_total 111 +# HELP sora_sctp_sent_packets_total The total number of sent SCTP packets. +# TYPE sora_sctp_sent_packets_total counter +sora_sctp_sent_packets_total 110 # HELP sora_session_webhook_total The total number of session webhook. # TYPE sora_session_webhook_total counter sora_session_webhook_total{state="failed"} 95 +sora_session_webhook_total{state="ignored"} 102 sora_session_webhook_total{state="successful"} 98 +# HELP sora_srtp_decrpyted_bytes_total The total number of decrypted SRTP bytes. +# TYPE sora_srtp_decrpyted_bytes_total counter +sora_srtp_decrpyted_bytes_total 105 +# HELP sora_srtp_decrypted_packets_total The total number of decrpyted SRTP packets. +# TYPE sora_srtp_decrypted_packets_total counter +sora_srtp_decrypted_packets_total 104 +# HELP sora_srtp_received_bytes_total The total number of received SRTP bytes. +# TYPE sora_srtp_received_bytes_total counter +sora_srtp_received_bytes_total 109 +# HELP sora_srtp_received_packets_total The total number of received SRTP packets. +# TYPE sora_srtp_received_packets_total counter +sora_srtp_received_packets_total 108 +# HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. +# TYPE sora_srtp_sent_bytes_total counter +sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. +# TYPE sora_srtp_sent_packets_total counter +sora_srtp_sent_packets_total 106 # HELP sora_stats_webhook_total The total number of stats webhook. # TYPE sora_stats_webhook_total counter sora_stats_webhook_total{state="failed"} 99 +sora_stats_webhook_total{state="ignored"} 103 sora_stats_webhook_total{state="successful"} 100 # HELP sora_successful_auth_webhook_total The total number of successful auth webhook. # TYPE sora_successful_auth_webhook_total counter diff --git a/test/sora_erlang_vm_enabled.metrics b/test/sora_erlang_vm_enabled.metrics index 0d91a4e..d5e3a1b 100644 --- a/test/sora_erlang_vm_enabled.metrics +++ b/test/sora_erlang_vm_enabled.metrics @@ -102,6 +102,7 @@ sora_erlang_vm_wall_clock_wallclock_time_since_last_call 9090 # HELP sora_event_webhook_total The total number of event webhook. # TYPE sora_event_webhook_total counter sora_event_webhook_total{state="failed"} 94 +sora_event_webhook_total{state="ignored"} 101 sora_event_webhook_total{state="successful"} 97 # HELP sora_license_expired_at_timestamp_seconds sora license file's expire seconds since epoch. # TYPE sora_license_expired_at_timestamp_seconds gauge @@ -125,13 +126,45 @@ sora_received_invalid_turn_tcp_packet_total 0 # TYPE sora_session_total counter sora_session_total{state="created"} 1 sora_session_total{state="destroyed"} 0 +# HELP sora_sctp_received_bytes_total The total number of received SCTP bytes. +# TYPE sora_sctp_received_bytes_total counter +sora_sctp_received_bytes_total 113 +# HELP sora_sctp_received_packets_total The total number of received SCTP packets. +# TYPE sora_sctp_received_packets_total counter +sora_sctp_received_packets_total 112 +# HELP sora_sctp_sent_bytes_total The total number of sent SCTP bytes. +# TYPE sora_sctp_sent_bytes_total counter +sora_sctp_sent_bytes_total 111 +# HELP sora_sctp_sent_packets_total The total number of sent SCTP packets. +# TYPE sora_sctp_sent_packets_total counter +sora_sctp_sent_packets_total 110 # HELP sora_session_webhook_total The total number of session webhook. # TYPE sora_session_webhook_total counter sora_session_webhook_total{state="failed"} 95 +sora_session_webhook_total{state="ignored"} 102 sora_session_webhook_total{state="successful"} 98 +# HELP sora_srtp_decrpyted_bytes_total The total number of decrypted SRTP bytes. +# TYPE sora_srtp_decrpyted_bytes_total counter +sora_srtp_decrpyted_bytes_total 105 +# HELP sora_srtp_decrypted_packets_total The total number of decrpyted SRTP packets. +# TYPE sora_srtp_decrypted_packets_total counter +sora_srtp_decrypted_packets_total 104 +# HELP sora_srtp_received_bytes_total The total number of received SRTP bytes. +# TYPE sora_srtp_received_bytes_total counter +sora_srtp_received_bytes_total 109 +# HELP sora_srtp_received_packets_total The total number of received SRTP packets. +# TYPE sora_srtp_received_packets_total counter +sora_srtp_received_packets_total 108 +# HELP sora_srtp_sent_bytes_total The total number of sent SRTP bytes. +# TYPE sora_srtp_sent_bytes_total counter +sora_srtp_sent_bytes_total 107 +# HELP sora_srtp_sent_packets_total The total number of sent SRTP packets. +# TYPE sora_srtp_sent_packets_total counter +sora_srtp_sent_packets_total 106 # HELP sora_stats_webhook_total The total number of stats webhook. # TYPE sora_stats_webhook_total counter sora_stats_webhook_total{state="failed"} 99 +sora_stats_webhook_total{state="ignored"} 103 sora_stats_webhook_total{state="successful"} 100 # HELP sora_successful_auth_webhook_total The total number of successful auth webhook. # TYPE sora_successful_auth_webhook_total counter