Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve auth analytics #285

Merged
2 commits merged into from
Feb 24, 2023
Merged

improve auth analytics #285

2 commits merged into from
Feb 24, 2023

Conversation

ghost
Copy link

@ghost ghost commented Feb 23, 2023

Always get a LoginInfo from the authorizer; this is never nil, and always contains an "Authorizer" field which should be a non-empty string describing the authorizer (for now, just "auth0" or "local"). Then, always attach that info to the analytics. This will let us know e.g. how many compiles are using local vs auth0.

This resolves #218

Standard checks

  • Unit tests: n/a
  • Docs: n/a
  • Backwards compatibility: no issues

Always get a LoginInfo from the authorizer; this is never nil, and
always contains an "Authorizer" field which should be a non-empty string
describing the authorizer (for now, just "auth0" or "local"). Then,
always attach that info to the analytics. This will let us know e.g. how
many compiles are using local vs auth0.

This resolves #218
@@ -37,11 +37,11 @@ type KlothoMain struct {
}
type Authorizer interface {

// Authorize tries to authorize the user. The KlothoClaims it returns may be nil, even if the authentication
// succeeds. Conversely, if the KlothoClaims is non-nil, it is valid even if the error is also non-nil; you can use
// Authorize tries to authorize the user. The klothoClaims it returns may be nil, even if the authentication
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Authorize tries to authorize the user. The klothoClaims it returns may be nil, even if the authentication
// Authorize tries to authorize the user. The `LoginInfo` it returns may be nil, even if the authentication

@github-actions
Copy link

Package Line Rate Health
github.com/klothoplatform/klotho/pkg/analytics 46%
github.com/klothoplatform/klotho/pkg/annotation 23%
github.com/klothoplatform/klotho/pkg/cli 4%
github.com/klothoplatform/klotho/pkg/core 21%
github.com/klothoplatform/klotho/pkg/env_var 82%
github.com/klothoplatform/klotho/pkg/exec_unit 54%
github.com/klothoplatform/klotho/pkg/infra/kubernetes 59%
github.com/klothoplatform/klotho/pkg/infra/kubernetes/helm 39%
github.com/klothoplatform/klotho/pkg/input 72%
github.com/klothoplatform/klotho/pkg/lang 38%
github.com/klothoplatform/klotho/pkg/lang/dockerfile 0%
github.com/klothoplatform/klotho/pkg/lang/golang 36%
github.com/klothoplatform/klotho/pkg/lang/javascript 48%
github.com/klothoplatform/klotho/pkg/lang/python 63%
github.com/klothoplatform/klotho/pkg/lang/yaml 0%
github.com/klothoplatform/klotho/pkg/logging 23%
github.com/klothoplatform/klotho/pkg/multierr 95%
github.com/klothoplatform/klotho/pkg/provider/aws 49%
github.com/klothoplatform/klotho/pkg/provider/aws/resources 70%
github.com/klothoplatform/klotho/pkg/runtime 78%
github.com/klothoplatform/klotho/pkg/static_unit 33%
github.com/klothoplatform/klotho/pkg/updater 30%
github.com/klothoplatform/klotho/pkg/validation 74%
github.com/klothoplatform/klotho/pkg/yaml_util 79%
Summary 44% (4352 / 9945)

@ghost ghost merged commit e7573e7 into main Feb 24, 2023
@ghost ghost deleted the auth-analytics branch February 24, 2023 15:50
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

client-level analytics for tracking auth events
1 participant