Skip to content

[Feature Request] Add impersonation metrics #1325

@golanglemonade

Description

@golanglemonade

The openlane API supports impersonation of users to do things like:

  • run jobs on behalf of a user
  • temporary access for support
  • etc.

It would be nice to have metrics added to track counts of requests:

Add metrics with the type (start/stop) and increment the count

Handler:

func (h *Handler) logImpersonationEvent(action string, auditLog *auth.ImpersonationAuditLog) error {

The new metric can be added to the metrics package:
https://github.com/theopenlane/core/blob/main/pkg/metrics/vars.go

With a helper added to the metrics/helpers.go:
https://github.com/theopenlane/core/blob/main/pkg/metrics/helpers.go

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions