-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add APM instrumentation #702
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪 |
079049f
to
b2de498
Compare
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.
Looks good from the Go Agent usage angle, just a couple of minor comments.
categories.go
Outdated
} | ||
|
||
func (filter categoriesFilter) Filter(ctx context.Context, packages util.Packages) map[string]util.Package { | ||
span, _ := apm.StartSpan(ctx, "FilterPackages", "custom") |
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 would suggest changing all the span types from "custom" to "app". This should work better with the "time spent by span type" chart in APM:
Transaction time is countered under "app", and if you add spans with type "app" then they will add to this. i.e. it's best practice (probably not written down anywhere) to use "app" for spans related to application code.
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.
Changed 👍
Btw, when initializing the service (here), I am using "backend.init" as transaction type, is this ok?
Are there some guidelines or list of recommended values for transaction and span types?
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.
That is okay, and I don't think it particularly matters. HTTP requests will be given the transaction type "request". I'm not aware of any guidance for transaction types for this kind of program initialisation.
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.
LGTM as long as CI is happy. Do we need to modify Dockerfiles in Package Storage too?
Yes, next step would be to see where we send the data, and configure the registries used in production. |
In #670 we are planning to introduce some refactors, in part motivated by performance issues. Introduce some instrumentation to evaluate what parts of the service require more performance tunning. And in the future to be able to compare the impact of the applied changes.
With this instrumentation we can collect traces such as this one:
Checklist:
/categories
, tests failing.