darkweak / souin

An HTTP cache system, RFC compliant, compatible with @tyktechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @go-kratos, @gin-gonic, @roadrunner-server, @zalando, @zeromicro, @nginx and @apache

Home Page:https://docs.souin.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Prom Metrics not Incrementing

0xEmma opened this issue · comments

Caddy File:

   {
      auto_https off
      order cache before rewrite
      cache {
        mode bypass_request
        log_level info
        key {
          disable_host
        }
        api {
          prometheus
        }
        redis {
           url 10.69.42.42:6379
        }
      }
      servers {
        metrics
      }
    }

    localhost:80 {
      root * /srv/
      file_server browse
      log {
        format json
      }
    }
    host.example.com:80 {
      metrics /stream/metrics
      root * /srv/
      file_server {
        browse /etc/caddy/Browse.html
      }
      log {
        format json
      }
      encode zstd gzip
      @match {
        path *.xml
        path *.rpm
        path *.bz2
      }
      cache @match {
        ttl 3600s
      }
    }

Caddy is behind a seperate L7 LB, connected to redis 7.2.4

# HELP souin_cached_response_counter Cached response counter
# TYPE souin_cached_response_counter counter
souin_cached_response_counter 0
# HELP souin_no_cached_response_counter No cached response counter
# TYPE souin_no_cached_response_counter counter
souin_no_cached_response_counter 0
# HELP souin_request_counter Total request counter
# TYPE souin_request_counter counter
souin_request_counter 1
# HELP souin_request_revalidation_counter Total request revalidation counter
# TYPE souin_request_revalidation_counter counter
souin_request_revalidation_counter 0

response time metrics will properly increment, however the cache response metrics will not, only request counter will increment, but not show the proper number of requests as indicated via response time count & logs