sourcegraph/doc
Keegan Carruthers-Smith c79e380ca0
trace: Logger helper (#36139)
I don't see many uses of log.WithTrace, but I think this is because it
is clunky to use since Span or Context may be nil on a context. This
introduces a helper so we can start logging against a span more easily.
Here is an example of using it I want:

  logger := trace.Logger(ctx, s.Log).Scoped("...", "...").With(...

This seems like the best place to add the logger, since we need to use
internal functions in the trace pkg (ie won't work in lib/log).

I updated the documentation to include an example of it. Right now the
documentation has one other place it calls WithTrace, but it needs to be
reworked to be more realistic. I think calling log.Scoped on something
that is traced seems surprising to me.

Test Plan: unused, so just that CI is happy.

Co-authored-by: Robert Lin <robert@bobheadxi.dev>
2022-05-30 11:35:52 +00:00
..
_resources Product Education: Add some redirect links to address recent doc changes (#35062) 2022-05-06 14:34:17 -04:00
admin [Bug] Fix dismissable Typos (#36171) 2022-05-27 14:49:11 +00:00
adopt Product Education: Rewrite for Overview, Docker Compose, and Docker Single Container to align to new IA and deployment focus (#34715) 2022-05-06 12:54:45 -04:00
api insights: update how to find insight ID (#34725) 2022-04-29 21:59:49 +00:00
batch_changes docs: Revisit LSIF mentions in docs for SCIP. (#36071) 2022-05-26 14:26:05 -07:00
cli Update to the latest src-cli release (#36050) 2022-05-25 20:06:26 +00:00
cloud Remove cloud waitlist from docs (#34021) 2022-04-20 10:34:23 -07:00
code_insights add share link docs (#35773) 2022-05-23 17:43:16 -07:00
code_intelligence docs: Revisit LSIF mentions in docs for SCIP. (#36071) 2022-05-26 14:26:05 -07:00
code_monitoring Code monitoring docs improvements (#35753) 2022-05-24 10:33:29 -07:00
code_search docs: Update lsif-py(thon)? → scip-python. (#36070) 2022-05-26 14:18:42 -07:00
dev trace: Logger helper (#36139) 2022-05-30 11:35:52 +00:00
extensions docs: Add support for Bitbucket Data Center (#30610) 2022-02-03 11:42:39 +00:00
getting-started Product Education: Rewrite for Overview, Docker Compose, and Docker Single Container to align to new IA and deployment focus (#34715) 2022-05-06 12:54:45 -04:00
integration docs: Revisit LSIF mentions in docs for SCIP. (#36071) 2022-05-26 14:26:05 -07:00
notebooks initial notebooks ga updates (#34020) 2022-04-19 06:24:31 -07:00
CHANGELOG.md doc: symlink CHANGELOG.md to docs for better search results (#22918) 2021-07-16 23:25:02 +08:00
CODENOTIFY Update docs to upgrade pure_docker from 3.33 to 3.34.2 directly (#28736) 2021-12-08 20:56:46 +00:00
dependency_decisions.yml luasandbox: Add initial libraries (#34022) 2022-04-18 22:12:34 +00:00
docsite.json insights: re-index docs (#32415) 2022-03-10 10:05:59 -07:00
index.md release: sourcegraph@3.40.0 (#35910) 2022-05-24 09:49:02 +00:00
sidebar.md Code monitoring docs improvements (#35753) 2022-05-24 10:33:29 -07:00