Commit Graph

7 Commits

Author SHA1 Message Date
Kostia Balytskyi
e4dab84619 scuba: turn ScubaSampleBuilderExt into a wrapper struct
Summary:
This diff prepares the Mononoke codebase for composition-based extendability of
`ScubaSampleBuilder`. Specifically, in the near future I will add:
- new methods for verbose scuba logging
- new data field (`ObservabilityContext`) to check if verbose logging should
  be enabled or disabled

The higher-level goal here is to be able to enable/disable verbose Scuba
logging (either overall or for certain slices of logs, like for a certain
session id) in real time, without restarting Mononoke. To do so, I plan to
expose the aforementioned verbose logging methods, which will run a check
against the stored `ObservabilityContext` and make a decision of whether the
logging is enabled or not. `ObservabilityContext` will of course hide
implementation details from the renamed `ScubaSampleBuilderExt`, and just provide a yes/no
answer based on the current config and sample fields.

At the moment this should be a completely harmless change.

Reviewed By: krallin

Differential Revision: D25211089

fbshipit-source-id: ea03dda82fadb7fc91a2433e12e220582ede5fb8
2020-11-30 21:26:24 -08:00
Lukas Piatkowski
fa1a195fd0 mononoke/blobstore: pass CoreContext via borrowed instead of owned value
Summary: Follow up after removing 'static from blobstore.

Reviewed By: StanislavGlebik

Differential Revision: D25182106

fbshipit-source-id: e13a7a31d71b4674425123268e655ae66127f1b7
2020-11-27 03:31:07 -08:00
Stanislau Hlebik
a5f6874c72 mononoke: add a tunable to log large read requests
Reviewed By: krallin

Differential Revision: D24780218

fbshipit-source-id: 9207a471e65407a023223ce5a0aeee3511a9823e
2020-11-06 04:23:40 -08:00
Thomas Orozco
ada1d7e7a9 mononoke/{multiplexedblob,logblob}: capture operation perf counters
Summary:
This updates multiplexedblob and logblob to capture perf counters for the
operations we run, and log them to Scuba. Along with the previous diffs in this
stack, this gives us the number of Manifold retries, total delay, and conflicts
all logged to blobstore trace on a per-operation basis.

Reviewed By: HarveyHunt

Differential Revision: D24333039

fbshipit-source-id: 9c7d0a467f8df08dcb2a0d3bb6b543cdb3ea1d90
2020-10-16 08:57:13 -07:00
Alex Hornby
4acca67600 mononoke: make logblob PutBehaviour aware
Summary:
log whether puts overwrite keys by implementing BlobstoreWithPutBehaviour for Logblob.

It logs a count of type of overwrite per put so we can sum them up.

Reviewed By: StanislavGlebik

Differential Revision: D24079272

fbshipit-source-id: 81944d92a56b0d3349ef390eb83f9e5bf4ee3d39
2020-10-13 03:09:37 -07:00
Alex Hornby
4203aca84b mononoke: include the causes in the log to mononoke_blobstore_trace
Summary:
We are currently logging only the outermost underlying error or context, not any of the lower level causes. This makes mononoke_blobstore_trace less useful!

This changes to use anyhow's alternate format that includes causes

Reviewed By: krallin

Differential Revision: D23708577

fbshipit-source-id: fa2e71734841e2b75d824c456dccf61c1fb13fd2
2020-09-16 02:02:56 -07:00
Harvey Hunt
cecc0bf2dc mononoke: Add logging blobstore
Summary:
The blobstore multiplexer contains logic to log blobstore operations to
scuba, as well as updating `PerfCounters`. There are some cases where we don't use the
multiplexed blobstore, which means that we're missing this important logging.

Factor out the logging to a separate crate and implement `LogBlob`, which wraps
another blobstore and performs logging to both scuba and PerfCounters.

Reviewed By: StanislavGlebik

Differential Revision: D21573455

fbshipit-source-id: 490ffd347f1ad19effc93b93f880836467b87651
2020-05-15 10:28:31 -07:00