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
Chore: Add tracing to team service #86999
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🚀
pkg/services/team/teamimpl/team.go
Outdated
} | ||
|
||
func (s *Service) CreateTeam(name, email string, orgID int64) (team.Team, error) { | ||
_, span := s.tracer.Start(context.Background(), "team.CreateTeam", trace.WithAttributes( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this and the IsTeamMember
functions would create a new root span (because the context is not propagated). I'm not 100% sure, but the current context should be passed to those functions to have proper tracing. Wdyt?
It can be also handled in a follow up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing it out. I was putting it off as CreateTeam
is used in soooo many tests but otherwise only from the team creation API function, so it felt like a lot of work for no benefit (as no useful context would be propagated for any non-test code execution path). But now that I see the amount of test changes that are required for ProvideService
anyway, I might as well add a few more 😄
What is this feature?
Adds tracing to team service.
Enterprise PR: https://github.com/grafana/grafana-enterprise/pull/6546
Related to https://github.com/grafana/identity-access-team/issues/601