slanatech / swagger-stats

API Observability. Trace API calls and Monitor API performance, health and usage statistics in Node.js Microservices.
https://swaggerstats.io/
MIT License
886 stars 136 forks source link

Issue with Basic Auth when connecting the Endpoint to Grafana cloud #277

Open MrMonkey42 opened 8 months ago

MrMonkey42 commented 8 months ago

I have Auth enabled on my Swagger endpoint and when connecting it to Grafana cloud using below guide, it is failing auth when "Type of Authentication Credentials" set to "Basic".

Guide - https://grafana.com/docs/grafana-cloud/send-data/metrics/metrics-prometheus/prometheus-config-examples/slana-tech-swagger-stats/

When calling the endpoint from Insomnia, if request header is set with Authorization Basic, it is passing but when using Auth type as "Basic Auth" by filling USERNAME and PASSWORD, is fails.

sv2 commented 8 months ago

To confirm, are you using Metrics Endpoint integration or Grafana Agent ? Could you kindly capture logs from your app when you attempt to connect to Grafana ? Please enable swagger-stat log by setting up env variable DEBUG=sws:*

MrMonkey42 commented 8 months ago

I'm using Metrics Endpoint integration. I'll try to capture the logs and see if I can find any issue