move tracer to client,
add tracing in rs, client
This commit is contained in:
parent
0fe7c3307f
commit
1b94f796eb
8 changed files with 59 additions and 37 deletions
|
@ -123,6 +123,9 @@ func WithStaticEndpoints(tokenURL, introspectURL string) Option {
|
|||
//
|
||||
// [RFC7662]: https://www.rfc-editor.org/rfc/rfc7662
|
||||
func Introspect[R any](ctx context.Context, rp ResourceServer, token string) (resp R, err error) {
|
||||
ctx, span := client.Tracer.Start(ctx, "Introspect")
|
||||
defer span.End()
|
||||
|
||||
if rp.IntrospectionURL() == "" {
|
||||
return resp, errors.New("resource server: introspection URL is empty")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue