Chunks now always have "data" (aka exactly 1 table including
schema/columns). Open chunks can only be created with data. Rollovers do
NOT create open chunks anymore (this is now only done for incoming
data).
Closes#1296.
__Rationale__
Debug logs in the middle ware (and potentially elsewhere) can cause authorization headers
(containing authentication tokens) to be accidentally leaked in the logs.
It's easy to just remove those headers early in our HTTP middleware.
__Rationale__
1. It's useful to know how much data we're throwing on the floor due to errors.
Common ingestion errors are "no such database" or "max hard size reached".
In both cases it's useful to be quickly able to gauge how much data would
be ingested once the limiting factor for ingestion is lifted (e.g. the database is created via
the management interface).
2. The name of the metric is `ingest_points_bytes_total` and the documentation states: `The number of bytes written`
It's confusing to only count successes while not mentioning this neither in the metric name,
nor in the metric description.
3. The sister metric `ingest_points_total` already records both successes and failures.
__Changes__
This PR adds a `status` tag to the `ingest_points_bytes_total`, mirroring what
we already do with `ingest_points_total`, so that both the overall total and the total successfully
ingested bytes can be counted.
Closes#1288
__Rationale__
`tracing::subscriber::set_default` only sets the subscriber for the current thread.
However, we're using multi-threaded tokio runtime, which means that most of the threads running
async code won't inherit the tracing subscriber, which means error/info/debug... logs won't be emitted!
To make things even more confusing, some logs do work (because they just happen to run in the same thread
that called `subscriber::set_default`.
__Change__
This PR makes us call `subscriber::set_global_default`.
This call can only be called once and is meant to be invoked by the main program (not by libraries).
It preserves the `TracingGuard` type, but now it's only used to flush the opentelemetry stuff.
This changes the hierarchy from
```
database -> partition -> chunk -> table
```
to
```
database -> partition -> table -> chunk
```
Only the high-level APIs are changed for now. The chunk states (like
MutableBuffer and ReadBuffer) still multiplex tables, although they will
always only get a single table assigned (or no table if no data was
presented yet).
Closes#1256.
Currently we log the git_hash version the binary has been compiled at only when the server actually starts,
which means that we don't easily see the version of the binary when it crashes before starting.