Closed drinktee closed 4 months ago
You can add your own middleware using options:
https://pkg.go.dev/github.com/zitadel/oidc/v3/pkg/op#WithHTTPMiddleware
We already have OpenTelemetry included in the package for metrics. If you define a tracer in your main package and pass the context, you should get metrics out of the OIDC package.
It is also possible to configure OTEL to export to prometheus using this package: https://pkg.go.dev/go.opentelemetry.io/otel/exporters/prometheus
All the base infrastructure is already present in OIDC. The package consumer needs to setup otel with the desired exporter, in this case prometheus. Such setup is not in the scope of the OIDC library. Therefore I will now close this issue.
Preflight Checklist
Describe your problem
It need to add prometheus metrics for apis. Just like http://xxxx:8888/metrics
Describe your ideal solution
add a middleware for metric
Version
No response
Additional Context
No response