-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.telemetryx/telemetry issuesx/telemetry issues
Milestone
Description
Currently StackCounter.Inc captures the Inc caller's stack using runtime.Callers(2, ...).
One use case we want to explore is to have a StackCounter to track calls to gopls/internal/bug.report.
If we call StackCounter.Inc from this report function (wrapper of StackCounter.Inc), the first couple of entries are always the functions in this gopls/internal/bug package, which isn't very interesting while taking up a good fraction of the counter name which already has pretty small max limit (#61181).
Can we allow the api to configure custom skip depth like runtime.Callers or log.Logger.Output?
Or alternatively, can we have StackCounter.Inc take pcs ?
cc @golang/tools-team @rsc
bcmills and findleyr
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.telemetryx/telemetry issuesx/telemetry issues