Open robpike opened 4 years ago
Thanks for making this improvement suggestion.
For reference, before the telemetry packages were moved out of internal/lsp
in CL 190403, the package comment was:
// Package telemetry provides the hooks and adapters to allow use of telemetry
// throughout gopls.
package telemetry
I suspect it's challenging to describe what package telemetry
does because "telemetry" is a very broad term covering a large problem space. Perhaps it can be said that the package provides common base types that are used by other golang.org/x/tools/internal/telemetry/...
packages.
/cc @ianthehat
The original comment was more helpful. I'm curious why it was changed.
Can I help in fixing this?
The telemetry package has now been moved to internal/event
and has a different doc comment, which no longer uses the word "opinionated".
// Package event provides a set of packages that cover the main
// concepts of telemetry in an implementation agnostic way.
As the package is still changing, I think it's reasonable to close this issue.
Unless, @ianthehat, do you want to leave this open to track improving the package documentation more generally? I imagine there will be a lot of docs to write before the package is moved out of internal
.
The package doc is still unhelpful. Who is expected to use it, does it honor any standards, the word "agnostic" is somewhat inappropriate, no statement of whose implementation is it agnostic to, and so.
Coincidentally, I think @ianthehat is in the process of removing this package, replacing it with slog. So this package may go away soon anyway.
I know it's an internal package, but the package doc for internal/telemetry is poorly conceived:
It doesn't say what the package does. It claims that the package is "opinionated' (a passive-agressive way to say, we don't care what you think about the design) but gives no hint at what that opinion leads to. Avoid editorializing, just say what the package does. And it wouldn't hurt to say what "telemetry" is and what it's measuring, and for whom.