Skip to content

Commit

Permalink
Prepare for v0.1.0 release (#73)
Browse files Browse the repository at this point in the history
Signed-off-by: oluwole fadeyi <[email protected]>
  • Loading branch information
tfadeyi authored Aug 6, 2023
1 parent f318280 commit 8bb0991
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions deploy/charts/auth0-exporter/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.2
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.2"
appVersion: "0.1.0"

home: https://github.com/tfadeyi/auth0-simple-exporter
maintainers:
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/auth0-exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ on the `/metrics` endpoint.
| exporter.tls.disabled | bool | `false` | Run exporter without TLS. |
| exporter.tls.keyFile | string | `""` | The key file for the exporter TLS connection. |
| fullnameOverride | string | `""` | Helm default setting, use this to shorten install name |
| image | object | `{"pullPolicy":"IfNotPresent","repository":"ghcr.io/tfadeyi/auth0-simple-exporter","tag":"v0.0.3"}` | image settings |
| image | object | `{"pullPolicy":"IfNotPresent","repository":"ghcr.io/tfadeyi/auth0-simple-exporter","tag":"v0.1.0"}` | image settings |
| imagePullSecrets | list | `[]` | specify credentials if pulling from a customer registry |
| labels | object | `{}` | |
| nameOverride | string | `""` | Helm default setting to override release name, leave blank |
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/auth0-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ image:
repository: ghcr.io/tfadeyi/auth0-simple-exporter
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.0.3"
tag: "v0.1.0"

# -- specify credentials if pulling from a customer registry
imagePullSecrets: []
Expand Down
2 changes: 1 addition & 1 deletion pkg/client/logs/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (l *logClient) List(ctx context.Context, args ...interface{}) (interface{},
ctx,
management.IncludeFields("type", "log_id", "date", "client_name"),
management.PerPage(1),
management.Query(fmt.Sprintf("date:[%s TO %s]", previousDay, previousDay)),
management.Query(fmt.Sprintf("date:[* TO %s]", previousDay)),
)
switch {
case errors.Is(err, errors.QuotaLimitExceeded):
Expand Down
6 changes: 3 additions & 3 deletions pkg/docs/docs.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Code generated by swaggo/swag. DO NOT EDIT.

// Package docs GENERATED BY SWAG; DO NOT EDIT
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"
Expand Down Expand Up @@ -49,7 +49,7 @@ const docTemplate = `{

// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = &swag.Spec{
Version: "0.0.2",
Version: "0.1.0",
Host: "localhost:8080",
BasePath: "/",
Schemes: []string{},
Expand Down
2 changes: 1 addition & 1 deletion pkg/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "Apache 2.0",
"url": "https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE"
},
"version": "0.0.2"
"version": "0.1.0"
},
"host": "localhost:8080",
"basePath": "/",
Expand Down
2 changes: 1 addition & 1 deletion pkg/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ info:
name: Apache 2.0
url: https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE
title: Auth0 simple exporter
version: 0.0.2
version: 0.1.0
paths:
/metrics:
get:
Expand Down
20 changes: 10 additions & 10 deletions pkg/exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ func New(ctx context.Context, opts ...Option) *exporter {

// metrics godoc
//
// @Summary Auth0 metrics in Prometheus format.
// @Description.markdown metrics.md
// @Produce json
// @Produce text/plain; charset=utf-8
// @Router /metrics [get]
// @Summary Auth0 metrics in Prometheus format.
// @Description.markdown metrics.md
// @Produce json
// @Produce text/plain; charset=utf-8
// @Router /metrics [get]
func (e *exporter) metrics() echo.HandlerFunc {
return func(ctx echo.Context) error {
log := logging.LoggerFromEchoContext(ctx)
Expand Down Expand Up @@ -124,11 +124,11 @@ func (e *exporter) metrics() echo.HandlerFunc {

// probe godoc
//
// @Summary Exporter's own metrics for its operations.
// @Description Exposes the exporter's own metrics, i.e: target_scrape_request_total.
// @Produce json
// @Produce text/plain; charset=utf-8
// @Router /probe [get]
// @Summary Exporter's own metrics for its operations.
// @Description Exposes the exporter's own metrics, i.e: target_scrape_request_total.
// @Produce json
// @Produce text/plain; charset=utf-8
// @Router /probe [get]
func (e *exporter) probe() echo.HandlerFunc {
return func(ctx echo.Context) error {
promhttp.HandlerFor(e.probeRegistry, promhttp.HandlerOpts{}).ServeHTTP(ctx.Response(), ctx.Request())
Expand Down
20 changes: 10 additions & 10 deletions pkg/exporter/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ import (
"golang.org/x/sync/errgroup"
)

// @title Auth0 simple exporter
// @version 0.0.2
// @description A simple Prometheus exporter for Auth0 log [events](https://auth0.com/docs/api/management/v2#!/Logs/get_logs),
// @description which allows you to collect metrics from Auth0 and expose them in a format that can be consumed by Prometheus.
// @title Auth0 simple exporter
// @version 0.1.0
// @description A simple Prometheus exporter for Auth0 log [events](https://auth0.com/docs/api/management/v2#!/Logs/get_logs),
// @description which allows you to collect metrics from Auth0 and expose them in a format that can be consumed by Prometheus.

// @contact.name Oluwole Fadeyi (@tfadeyi)
// @contact.name Oluwole Fadeyi (@tfadeyi)

// @license.name Apache 2.0
// @license.url https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE
// @license.name Apache 2.0
// @license.url https://github.com/tfadeyi/auth0-simple-exporter/blob/main/LICENSE

// @host localhost:8080
// @BasePath /
// @host localhost:8080
// @BasePath /

// Export configures the exporter Router and starts the server with the given configuration
func (e *exporter) Export() error {
log := e.logger
log.Info("initialising exporter", "build", version.BuildInfo())
log.Info("initialising exporter", "build", version.Info())

// collect all the auth0 apps/clients, this is required for initialising the prometheus counter metrics to zero
// all labels must be known before.
Expand Down

0 comments on commit 8bb0991

Please sign in to comment.