commit | f4731e891087e89f92882f51d2f6d6c56b69aaf9 | [log] [tgz] |
---|---|---|
author | Vadim Shtayura <vadimsh@chromium.org> | Fri Aug 09 00:01:26 2024 |
committer | LUCI CQ <infra-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Aug 09 00:01:26 2024 |
tree | e9864cb462973bdc38de313dfb8fb49e14ea5aed | |
parent | b00b2aae05da88389b0515f3c9d550fb44e23d6e [diff] |
[server] Initialize more of OTEL when running locally. Before by default we were installing noop OTEL Provider in dev mode (~= running locally) which effectively disabled most of OTEL at an earliest entry point. Now we install the real provider (together with the real "resource" and the sampler and the batcher), but the noop exporter. That way more of OTEL guts are exercised locally. This is important because these guts to do not appear particularly trustworthy and without running them locally we risk finding problems only in staging or production (happened twice already). One of such problems is essentially https://github.com/open-telemetry/opentelemetry-go/issues/4476 Unfortunately, even with this CL we can't trigger this problem locally, since the relevant OTEL code does nothing when running not on GCP. There will be a separate CL that adds a test that launches OTEL within an emulated GCP environment. Our existing emulation (as done in `luci-auth context` seems to be enough to trigger this particular bug). One side effect of this change is that server.New(...) now mutates global process state (since this is where OTEL keeps its provider), which may be problematic for parallel tests. There's only one test that calls server.New though, so we can just isolate it. R=iannucci@chromium.org BUG=b/356517179 Change-Id: Icb92c1679bd8f3537990edd0d55bf83fbc1a715e Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-go/+/5774462 Commit-Queue: Vadim Shtayura <vadimsh@chromium.org> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
LUCI Go code is meant to be worked on from an Chromium infra.git checkout, which enforces packages versions and Go toolchain version. First get fetch via depot_tools.git then run:
fetch infra cd infra/go eval `./env.py` cd src/go.chromium.org/luci
It is now possible to directly install tools with go install:
go install go.chromium.org/luci/auth/client/cmd/...@latest go install go.chromium.org/luci/buildbucket/cmd/...@latest go install go.chromium.org/luci/cipd/client/cmd/...@latest go install go.chromium.org/luci/client/cmd/...@latest go install go.chromium.org/luci/cv/cmd/...@latest go install go.chromium.org/luci/gce/cmd/...@latest go install go.chromium.org/luci/grpc/cmd/...@latest go install go.chromium.org/luci/logdog/client/cmd/...@latest go install go.chromium.org/luci/luci_notify/cmd/...@latest go install go.chromium.org/luci/lucicfg/cmd/...@latest go install go.chromium.org/luci/luciexe/legacy/cmd/...@latest go install go.chromium.org/luci/mailer/cmd/...@latest go install go.chromium.org/luci/mmutex/cmd/...@latest go install go.chromium.org/luci/resultdb/cmd/...@latest go install go.chromium.org/luci/server/cmd/...@latest go install go.chromium.org/luci/swarming/cmd/...@latest go install go.chromium.org/luci/tokenserver/cmd/...@latest go install go.chromium.org/luci/tools/cmd/...@latest
Contributing uses the same flow as Chromium contributions.