mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Add cron-based/manual reset to ExporterMetrics
This commit is contained in:
committed by
Dan Christian Bogos
parent
934815d9ee
commit
1c00a3aad1
@@ -33,7 +33,7 @@ import (
|
||||
)
|
||||
|
||||
func NewHTTPjsonMapEE(cfg *config.EventExporterCfg, cgrCfg *config.CGRConfig, filterS *engine.FilterS,
|
||||
dc *utils.SafeMapStorage) (pstrJSON *HTTPjsonMapEE, err error) {
|
||||
dc *utils.ExporterMetrics) (pstrJSON *HTTPjsonMapEE, err error) {
|
||||
pstrJSON = &HTTPjsonMapEE{
|
||||
cfg: cfg,
|
||||
dc: dc,
|
||||
@@ -47,7 +47,7 @@ func NewHTTPjsonMapEE(cfg *config.EventExporterCfg, cgrCfg *config.CGRConfig, fi
|
||||
// HTTPjsonMapEE implements EventExporter interface for .csv files
|
||||
type HTTPjsonMapEE struct {
|
||||
cfg *config.EventExporterCfg
|
||||
dc *utils.SafeMapStorage
|
||||
dc *utils.ExporterMetrics
|
||||
client *http.Client
|
||||
reqs *concReq
|
||||
|
||||
@@ -91,7 +91,7 @@ func (httpEE *HTTPjsonMapEE) ExportEvent(content any, _ string) (err error) {
|
||||
|
||||
func (httpEE *HTTPjsonMapEE) Close() (_ error) { return }
|
||||
|
||||
func (httpEE *HTTPjsonMapEE) GetMetrics() *utils.SafeMapStorage { return httpEE.dc }
|
||||
func (httpEE *HTTPjsonMapEE) GetMetrics() *utils.ExporterMetrics { return httpEE.dc }
|
||||
|
||||
func (httpEE *HTTPjsonMapEE) PrepareMap(mp *utils.CGREvent) (any, error) {
|
||||
body, err := json.Marshal(mp.Event)
|
||||
|
||||
Reference in New Issue
Block a user