Metrics¶
Each TraceLake process serves its metrics in the Prometheus text format at GET /metrics on
metrics.port (default 9090). This page lists each metric with its type, its labels and its
meaning.
| Process | Command | Metrics |
|---|---|---|
| Ingestor | ingestor run |
Ingestor, background tasks, catalog |
| Compactor | ingestor compact |
Compactor, background tasks, catalog |
| Query gateway | gateway |
Query gateway, background tasks, catalog |
| Tail service | ingestor tail |
Tail service, background tasks. Only with a TAIL hot source |
The compactor has its own pod and its own scrape target. A manual compaction run (with --dataset,
--date-range, --partition, --dry-run, --orphan-dry-run or --retention-dry-run) does not
serve /metrics.
How to read the tables¶
- Absent is not zero. A series that Prometheus has never seen is absent from the scrape. Most
metrics with a
datasetlabel start at zero for each configured dataset when the process starts. The tables say "not seeded" where a series appears only after the first event. An expression on such a series must tolerate its absence. - Counters start again at zero when a pod starts.
- Buckets are the upper limits of the histogram buckets, in the unit of the metric.
Ingestor¶
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_ingestor_fetched_records_total |
Counter | dataset |
Records fetched from Kafka, before decode and before the WAL. Includes records that Kafka delivers again. |
tracelake_ingestor_fetched_bytes_total |
Counter | dataset |
Payload bytes of the fetched records. |
tracelake_ingestor_events_total |
Counter | dataset |
Records that the WAL accepted into a segment. This is the measure of ingested volume. |
tracelake_ingestor_bytes_total |
Counter | dataset |
Payload bytes (not compressed) of the records that the WAL accepted. |
tracelake_ingestor_consumer_lag |
Gauge | dataset, partition |
Kafka consumer lag: the end offset of the log minus the committed offset, for each assigned partition. Not seeded. A partition with no reading has no series. |
tracelake_ingestor_consume_errors_total |
Counter | dataset |
Kafka consume attempts that failed. The ingestor waits and tries again. |
tracelake_ingestor_records_dropped_total |
Counter | dataset |
Records dropped because they could not be decoded. |
tracelake_ingestor_wal_active_files |
Gauge | dataset |
Open active_* WAL files. |
tracelake_ingestor_wal_ready_files |
Gauge | dataset |
Rotated WAL files (sealed_* and ready_*) that wait for upload and commit. |
tracelake_ingestor_wal_disk_bytes |
Gauge | none | Approximate bytes of all WAL files on the WAL volume. All datasets share the volume. |
tracelake_ingestor_wal_buffered_bytes |
Gauge | dataset |
Decoded records in memory for open segments. The limit is ingestion.wal.maxBufferedBytes. The real memory use is higher than this value. |
tracelake_ingestor_wal_rowgroup_bytes |
Gauge | dataset |
Parquet row groups in memory for open segments. |
tracelake_ingestor_wal_duplicate_records_total |
Counter | dataset |
Records that the ingestor discarded because it fetched them before it released their partition. The new owner of the partition reads them again. An increase at a rebalance is normal. |
tracelake_ingestor_wal_segment_overfilled_total |
Counter | dataset |
WAL files closed with more rows than their offset range can contain. This must stay at zero. A value above zero means that a file contains duplicate rows. |
tracelake_ingestor_upload_latency_seconds |
Histogram | dataset |
Time to upload one ready_* file. Buckets: 1, 5, 10, 15, 30, 60. |
tracelake_ingestor_upload_errors_total |
Counter | dataset |
Upload attempts that failed. |
tracelake_ingestor_ready_cleanup_seconds |
Histogram | dataset |
Time to delete the local files of one committed batch. Buckets: 0.001, 0.01, 0.05, 0.25, 1, 5. |
tracelake_ingestor_drain_total |
Counter | outcome |
Shutdown drains. outcome is complete or deadline. |
tracelake_ingestor_drain_seconds |
Histogram | none | Duration of the shutdown drain. Not seeded. Buckets: 1, 5, 15, 30, 60, 96, 300, 600. |
tracelake_ingestor_stale_spec_files_total |
Counter | dataset |
WAL files that the ingestor did not commit, because they were written under a partition spec that the table has since evolved past. Their rows are on the WAL volume and not in the table. |
tracelake_ingestor_schema_name_drift |
Gauge | dataset |
Columns in parquetSchema that have a different name in the table. The ingestor starts, but it writes the old names into new files. |
tracelake_freshness_seconds |
Histogram | dataset |
Time from the arrival of a record at Kafka to the table commit that contains it. Buckets: 30, 60, 120, 240, 360, 480, 600. |
Fetched and accepted¶
fetched_* counts what the pod reads from Kafka. events_total and bytes_total count what the
WAL accepts. The difference has three parts, and each is a metric or is temporary:
fetched_records_total - events_total
= wal_duplicate_records_total (fetched, then discarded at a rebalance)
+ records_dropped_total (fetched, then not decoded)
+ records in progress (between the fetch and the WAL)
fetched_*stops andconsumer_lagincreases: the Kafka side has stopped.fetched_*continues andevents_totalstops: the WAL has stopped.
Do not use events_total to find out if consumption is alive.
Ingested volume is not exact after a crash¶
events_total and bytes_total count a record when the WAL accepts it, not when the table commit
contains it. If recovery discards a WAL file and Kafka delivers its records again, the ingestor
counts those records a second time. This occurs only when recovery discards a file, or when a
segment fails to rotate at a rebalance: the ingestor then discards that segment and the other open
segments of its partition. It does not occur at each rebalance. No metric shows it; the ingestor
writes each discarded file and each failed rotation to its log. For a period where the exact
number is important, compare with the row counts of the Iceberg table.
Shutdown metrics¶
drain_total and drain_seconds change one time, at the end of the drain, and then the process
exits. Prometheus will usually not collect the last value. The log line of the drain is the
reliable record.
Query gateway¶
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_gateway_query_requests_total |
Counter | dataset, method, format, status, error_code |
HTTP query requests. Only the success series (status="200", empty error_code) is seeded. |
tracelake_gateway_query_duration_seconds |
Histogram | dataset, method, format |
Time from the first byte of the request to the end of the response body. Buckets: 0.05, 0.2, 0.5, 1, 3, 5, 10, 30. |
tracelake_gateway_dataset_fenced |
Gauge | dataset |
1 while queryGateway.auth.datasetRoles denies the dataset to all callers; 0 if not. |
tracelake_gateway_manifest_files_scanned |
Histogram | dataset |
Data files that remain after pruning pass 1, for each query. Buckets: 1, 4, 16, 64, 256, 1024, 4096, 16384. |
tracelake_gateway_files_scanned |
Histogram | dataset |
Data files that a query opens, after all three pruning passes. Same buckets. |
tracelake_gateway_puffin_bytes_total |
Counter | dataset, part |
Bloom-filter sidecar bytes. part is fetched (read from storage) or consulted (used by a query). |
tracelake_gateway_datafile_requests_total |
Counter | dataset, op |
Storage requests of the data-file scan, for HTTP and PostgreSQL queries. op is get or list. list must stay at zero. It counts only the lists that the scan itself makes. |
tracelake_gateway_datafile_bytes_total |
Counter | dataset |
Bytes that the data-file scan reads from storage, for HTTP and PostgreSQL queries. A statement that reads two datasets counts each under its own label. |
tracelake_gateway_sidecar_fetch_seconds |
Histogram | kind |
Time of one sidecar read from storage. For puffin, one read is the full sidecar on a cache miss. For idx, one read is one part of a full-text sidecar: its size, the small parts on a cache miss, or the list of entries for one query term. The count for idx is the number of reads. Buckets: 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 30, 60, 120. |
tracelake_gateway_idx_range_bytes_total |
Counter | none | Bytes of full-text sidecars read from storage. |
tracelake_gateway_sidecar_miss_total |
Counter | dataset, kind |
Sidecar lookups with no result. kind is puffin, idx or ndv. See below. |
tracelake_gateway_prune_candidates_in_total |
Counter | dataset, pass |
Candidate files that enter a pruning pass. |
tracelake_gateway_prune_candidates_out_total |
Counter | dataset, pass |
Candidate files that remain after a pruning pass. |
tracelake_gateway_idx_declines_total |
Counter | dataset, reason |
Full-text sidecars that the gateway read but that could not answer the filter. |
tracelake_gateway_bloom_unserved_total |
Counter | dataset, reason |
Filters on a bloom column that the bloom pass could not use. One for each filter in each query. |
tracelake_gateway_index_cache_hits_total |
Counter | none | Sidecar lookups answered without storage: bloom-filter sidecars from memory, full-text sidecars from disk. |
tracelake_gateway_index_cache_misses_total |
Counter | none | Sidecar lookups that read storage. |
tracelake_gateway_index_cache_bytes |
Gauge | none | Bytes in the memory cache of bloom-filter sidecars and data-file footers, some with their page index. The limit is queryGateway.indexCache.maxBytes. |
tracelake_gateway_index_cache_disk_bytes |
Gauge | none | Bytes of full-text sidecar parts on disk in queryGateway.indexCache.diskDir. The limit is queryGateway.indexCache.diskMaxBytes. A sidecar that a query still reads after it is removed from the cache is not counted. |
tracelake_gateway_index_cache_hit_ratio |
Gauge | none | Fraction of sidecar lookups answered from the cache, 0 to 1, since the pod started. For a time window, use the two counters. |
tracelake_gateway_index_cache_footer_loads_total |
Counter | kind |
Data-file footers read from storage into the memory cache. kind is page_index when the cache entry then held the page index, and footer when it did not. A footer that the cache serves adds nothing. The first read of a file also counts, so on a pod that has served queries for some time, a steady page_index rate shows that the page index does not fit in queryGateway.indexCache.maxBytes. |
tracelake_gateway_manifest_cache_hits_total |
Counter | dataset |
Queries answered from cached table metadata. |
tracelake_gateway_manifest_cache_misses_total |
Counter | dataset |
Queries that read manifests from storage. |
tracelake_gateway_manifest_cache_bytes |
Gauge | dataset |
Bytes of cached table metadata. The limit, queryGateway.manifestCache.maxBytes, applies to the sum of all datasets. |
tracelake_gateway_jwks_cache_age_seconds |
Gauge | none | Time since the last successful fetch of the OIDC signing keys, or since the pod started if there is none. When the value gets near queryGateway.auth.maxJwksStalenessSeconds, requests will soon get 503. |
tracelake_gateway_jwks_fetch_duration_seconds |
Histogram | outcome |
Duration of a fetch of the signing keys. outcome is ok or error. Buckets: 0.01, 0.05, 0.1, 0.25, 0.5, 1, 2, 5, 10. |
Label values are fixed sets. A caller cannot add a value.
| Label | Values |
|---|---|
method |
GET, POST, QUERY, other |
format |
rows |
error_code |
Empty on success. If not, the error code of the response, for example FORBIDDEN. |
pass |
partition, manifest, bloom, idx, idx_rowgroups |
reason on idx_declines_total |
no_field, pattern_too_short, no_rowgroups, capped, unreadable, oversized, unavailable |
reason on bloom_unserved_total |
type, function, not, negation, null, range, like, nested_and, sibling_ruled_out_by_bounds, sibling_unanswerable |
Response compression¶
Response compression does not change a byte metric. Each gateway byte metric counts bytes that
the gateway reads from storage or keeps in a cache. No metric counts the bytes of a response.
tracelake_gateway_query_duration_seconds includes the time to compress the response.
Errors after the response starts¶
A query that fails after the gateway sent the status 200 is counted with status="200" and an
error_code that is not empty. Write an error-rate expression on error_code!="", not on status.
Refused for concurrency¶
query_requests_total{status="503",error_code="QUERY_CONCURRENCY_EXCEEDED"} counts the queries that
the gateway refused at queryGateway.maxInFlightHttpQueries. A continuous rate means that the pod
is at its limit. Add pods, or increase the limit if the pod has the memory.
The pruning funnel¶
manifest_files_scanned and files_scanned are the two ends of the funnel: the files after pass 1,
and the files that the scan opens.
For one value of pass, prune_candidates_out_total / prune_candidates_in_total is the fraction
of files that the pass keeps. Do not add the counters of different passes together. The partition
value is recorded only when the filter of a query limits the partition column. For
pass="idx_rowgroups" the counters count row groups, not files.
Sidecar misses¶
sidecar_miss_total has two meanings:
kind="puffin"andkind="idx": a pruning pass had no sidecar to use, and the gateway scans the file. This increases the data that a query reads.kind="ndv": the planner had no distinct-value sketch for a file and used the column statistics. The query reads no more data.
An increase is not an error. Files that are not compacted yet have no full-text sidecar. A high rate with slow queries means that compaction is behind, or that a column needs an index.
idx_declines_total is a part of sidecar_miss_total{kind="idx"}: the sidecar is there, but it
cannot answer the filter.
PostgreSQL interface¶
These metrics exist only when queryGateway.postgres is configured.
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_gateway_pg_connections |
Gauge | none | Open PostgreSQL connections. |
tracelake_gateway_pg_queries_total |
Counter | status |
Statements. status is ok, denied, timeout, unavailable or failed. |
tracelake_gateway_pg_query_duration_seconds |
Histogram | none | Duration of a statement. Buckets: the Prometheus defaults. |
tracelake_gateway_pg_table_resolve_failures_total |
Counter | dataset |
Statements for which the gateway could not get the snapshot of a table. |
denied includes authorization refusals, limit refusals, unknown tables and statements that do not
parse. It is above zero in a healthy deployment. failed is the value that shows a fault.
Heavy-query pool¶
These metrics exist only when queryGateway.heavyQueryBytes is set. class is short or heavy.
Each statement on each interface counts once, EXPLAIN included.
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_gateway_query_class_total |
Counter | class |
Statements, by the class the gateway gave them. |
tracelake_gateway_query_class_bytes |
Histogram | class |
The bytes a statement's scans would read after pruning: the estimate that decides the class. Buckets: 1 MiB to 64 GiB, ×4. |
tracelake_gateway_query_class_seconds |
Histogram | class |
From the end of planning until the last part of the statement finishes or the client stops reading. |
Use _bytes to set heavyQueryBytes: put it between the short and heavy queries' sizes. A short
statement with a long _seconds uses much CPU for each byte (a regular expression, a large
groupBy). A lower threshold sends such statements to the heavy pool.
Hot source¶
These metrics exist only when a dataset has a hotSource, and have series only for such datasets.
Each such dataset has a series in each metric from the start, and one for each outcome of
hot_scans_total. The exception is cold_tier_lag_seconds: it has no series until the
pod has a snapshot with a commit. A value of 0 would show a healthy dataset during an outage.
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_gateway_hot_pool_connections |
Gauge | dataset |
Connections to the hot source that queries use now. Idle connections are not included. With TAIL, the streams to the tail service that are open now. |
tracelake_gateway_hot_scan_duration_seconds |
Histogram | dataset |
Time from when the gateway sends the statement to the hot source until it gets the last row, for each served read. This includes the time that the client takes to read the answer, up to hotSource.readTimeoutMs. A slow client makes this value large. Buckets: 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 30, 60. |
tracelake_gateway_cold_tier_lag_seconds |
Gauge | dataset |
The time since the newest append commit in the snapshot of this pod. This is the age of the commit, not the age of the rows. The ingestor appends only when a WAL file rotates, so in a healthy deployment the value increases to approximately one maxFileAgeMinutes and then decreases. Commits by the compactor do not change it. The gateway calculates it at each scrape, so it continues to increase while the catalog is not available. It also increases on a dataset that gets no data; the alert does not fire for such a dataset, because it also requires tracelake_ingestor_wal_ready_files > 0. |
tracelake_gateway_cold_tier_lag_threshold_seconds |
Gauge | dataset |
The value at which TraceLakeColdTierLagNearBoundary fires: the longest healthy time between append commits, maxFileAgeMinutes × 60 + 15 s (upload) + 1.25 × (ingestion.commitIntervalSeconds + queryGateway.snapshotPollIntervalSeconds). This is 350 s at the defaults. The gateway calculates it from the configuration at start. |
tracelake_gateway_hot_scans_total |
Counter | dataset, outcome |
Reads of the hot source, one at most for each read, when it ends. served: the gateway read all the rows. The other two values are reads that failed. A read that the gateway does not need (all the rows are before the boundary), or that the client stops, is not counted. A check of the hot source before the answer that succeeds is not counted if its read does not run (for example, an EXPLAIN); a check that fails is counted also then. If the read failed before the gateway started the answer, the answer is from Iceberg only and has the hotTier member or the NOTICE, or, for a query on the hot source only, is 503. If the read failed after this, the answer is not complete and ends with an error. outcome is unavailable (no connection, login refused, connection lost, or hotSource.statementTimeoutMs or hotSource.readTimeoutMs exceeded; with TAIL also: no replica is ready, the tail service refused the token, the tail service does not have all the rows after T, or it is more than hotSource.maxLagSeconds behind) or schema_drift (the columns of the hot table changed, or a value does not have the correct type). The metric does not show which of the two answers the client got. A client that reads the answer more slowly than hotSource.readTimeoutMs allows also adds to unavailable, although the hot source has no problem. |
If hot_pool_connections stays at hotSource.maxConnections, queries wait for a connection. Your database can
have up to maxConnections connections from each pod when this value is 0.
Tail service¶
These metrics exist only when a dataset has hotSource.type: TAIL. Each replica of the tail
service serves them on its own metrics.port, together with GET /ready: 200 when each window has
read its topic to the end and is not more than maxLagSeconds behind. Each metric has a series for
each such dataset from the start, except lag_seconds, which has a series for each partition when
the replica reads it. The tail service calculates the window metrics and the lag at each scrape.
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_tail_rows |
Gauge | dataset |
Rows in the window. |
tracelake_tail_bytes |
Gauge | dataset |
Bytes in the window, against hotSource.maxBytes. The process uses more memory than this: a query that is open keeps the rows that it reads, also rows that the window deleted after it started. |
tracelake_tail_covered_from_age_seconds |
Gauge | dataset |
The age of the oldest time that the window has all the rows for. retentionSeconds when the window is full; less after a short replay at start or when maxBytes deleted old rows. |
tracelake_tail_window_whole |
Gauge | dataset |
1 when the window has all of retentionSeconds, else 0. At 0, queries on the hot source only get 503. |
tracelake_tail_lag_seconds |
Gauge | dataset, partition |
How far this replica is behind each partition, on the clock of the tail service. 0 at the end of the partition, so a partition with no new data has no lag. |
tracelake_tail_replay_seconds |
Gauge | dataset |
The time that the replay at start took. 0 until the replica has read to the end. |
tracelake_tail_requests_total |
Counter | dataset, outcome |
Requests from the gateway: served, unauthenticated, permission_denied, failed. When the tail service cannot get the signing keys of the identity provider, requests are failed. |
tracelake_tail_records_dropped_total |
Counter | dataset, reason |
Records that the tail service did not keep: decode (cannot be mapped), null_time (no timeColumn value), future (a timeColumn value more than replaySlackSeconds in the future). The rows still go to Iceberg. |
tracelake_tail_max_lag_seconds |
Gauge | dataset |
The hotSource.maxLagSeconds of the dataset. The threshold of TraceLakeTailLagging. |
tracelake_tail_boundary_seconds |
Gauge | dataset |
The hotSource.boundarySeconds of the dataset. The threshold of TraceLakeTailCoverageShort. |
Compactor¶
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_compactor_partition_files_total |
Gauge | dataset, partition |
Small files (below compaction.minFileSizeMb) in each partition of the current snapshot. |
tracelake_compactor_unindexed_files_total |
Gauge | dataset, partition |
Data files with no full-text sidecar in each partition. It counts only files that TraceLake wrote and that are not larger than 2 × compaction.targetSizeMb. Absent for a dataset with no tantivy.indexingColumns. |
tracelake_compactor_unindexed_oversized_files |
Gauge | dataset |
Data files that TraceLake wrote, with no full-text sidecar, that are larger than 2 × compaction.targetSizeMb. The compactor does not give these files an index, and unindexed_files_total does not count them. Expected 0. Absent for a dataset with no tantivy.indexingColumns. |
tracelake_compactor_runs_total |
Counter | dataset, status |
Compaction runs. status is success or failed. |
tracelake_compactor_duration_seconds |
Histogram | dataset |
Duration of a compaction run for one dataset. Buckets: 60, 300, 900, 1800, 3600. |
tracelake_compactor_deadline_exceeded_total |
Counter | dataset |
Passes that ran longer than compaction.runtimeDeadlineHours. |
tracelake_compactor_data_files_rewritten_total |
Counter | dataset |
Data files that a merge commit replaced. |
tracelake_compactor_sidecar_bytes |
Histogram | dataset, kind |
Size of each object that a pass writes. kind is data, idx or puffin. Not seeded. Buckets: 1e4, 1e5, 1e6, 1e7, 1e8, 1e9. |
tracelake_compactor_idx_build_failures_total |
Counter | dataset, stage |
Merged files committed with no full-text sidecar because the build or the upload failed. stage is start, batch, finish or upload. |
tracelake_compactor_backfill_detect_seconds |
Histogram | dataset |
Duration of the search for files with no full-text sidecar. Not seeded. Buckets: 0.01, 0.025, 0.05, 0.1, 0.5, 1, 5, 30, 120, 300, 900. |
tracelake_compactor_ephemeral_peak_bytes |
Gauge | dataset |
Largest temporary disk use of the most recent pass. Use it to set the size of the temporary volume of the pod. |
tracelake_snapshots_expired_total |
Counter | dataset |
Snapshots that snapshot expiry removed. |
tracelake_orphan_files_deleted_total |
Counter | dataset |
Objects that orphan cleanup deleted. |
tracelake_orphan_kept_rewritten_total |
Counter | dataset |
Objects that orphan cleanup kept because their ETag or last-modified time changed between the listing and the delete. Not seeded. |
tracelake_orphan_keep_streak |
Gauge | dataset |
Consecutive orphan cleanup passes that kept at least one such object. A pass that keeps none sets it to 0, and it starts again when the compactor restarts. At 2 or more it fires TraceLakeOrphanKeptRepeatedly. |
tracelake_table_metadata_files |
Gauge | dataset, kind |
Objects in the metadata/ folder of the table, counted at the end of each orphan cleanup pass, after the pass cleaned that folder. kind is json (the table metadata files) or other (manifest lists, manifests and engine statistics). Absent if the catalog put the table in another container than storage.destinationUri. |
tracelake_retention_files_deleted_total |
Counter | dataset |
Data files that the retention delete removed from the table. It does not change data_files_rewritten_total. |
tracelake_retention_window_seconds |
Gauge | dataset |
The age at which the retention delete removes data: retentionDays + retentionSafetyMarginDays, in seconds. |
tracelake_retention_oldest_referenced_seconds |
Gauge | dataset |
After each retention pass: the age of the newest row in the oldest file that the retention delete can remove. 0 if there is no such file. |
tracelake_retention_unreclaimable_bytes |
Gauge | dataset |
Bytes in files that the retention delete never removes: no timeColumn statistics, or a row with a NULL timeColumn. |
tracelake_retention_unreclaimable_rows |
Gauge | dataset |
Rows in those files. |
The retention_* metrics are present only for datasets with a retentionDays value, and only while
maintenance.retentionDeleteEnabled is on. If oldest_referenced_seconds stays above
window_seconds for longer than one retentionIntervalMinutes, old data is not being deleted: look
for retention pass failed in the compactor log.
The catalog deletes old table metadata files, not TraceLake. Lakekeeper keeps the current file and
the 100 previous ones, so table_metadata_files{kind="json"} stays at 101 for a table with 100
commits or more. Orphan cleanup deletes the manifest lists and manifests of expired snapshots when
they are older than snapshotRetentionHours + orphanMinAgeHours (48 hours by default), so
kind="other" stays at about two days of commits. These deletions are counted in
orphan_files_deleted_total.
unindexed_files_total above zero between scheduled passes is normal: the compactor counts the
files at each pass, but it gives them an index only on a scheduled pass. If the value does not
decrease after the scheduled passes, look at idx_build_failures_total. An increase there means
that the index cannot be built, and more compactor capacity will not help.
The two metrics with a partition label keep one series for each partition until the pod starts
again. With one partition for each day, that is approximately 365 series for each dataset, for each
metric, for each year of retention.
TLS certificates¶
Only a listener with TLS has these metrics: the tail service with tail.tls (listener="tail"),
and the gateway with queryGateway.postgres (listener="postgres").
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_tls_certificate_not_before_timestamp_seconds |
Gauge | listener |
Unix time of the notBefore of the certificate that the listener uses. |
tracelake_tls_certificate_not_after_timestamp_seconds |
Gauge | listener |
Unix time of the notAfter of the certificate that the listener uses. |
Each 60 s, the listener compares its two files with the certificate that it uses. When the files change, it loads them, and the two metrics change. When the files are not correct, the listener keeps the certificate that it uses, writes a WARN line at each check, and the metrics do not change. Thus the metrics always show the certificate in use, not the files.
Background tasks¶
All the processes have these metrics.
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_task_exits_total |
Counter | task |
Background tasks that stopped because of a panic. A value above zero means that this pod runs with a dead task. Replace the pod. |
tracelake_task_last_pass_timestamp_seconds |
Gauge | task, dataset |
Unix time of the end of the last pass of a periodic task. If time() minus this value increases without limit, the task has stopped without an exit. |
A stop on purpose, such as a shutdown, is not counted in task_exits_total.
Five tasks have a time stamp: wal_age_sweep and kafka_lag_refresh in the ingestor,
snapshot_expiry and orphan_cleanup in the compactor, and gateway_snapshot_poll in the
gateway. The tasks of the compactor and the gateway have dataset="-". The two tasks of the tail
service, tail_consume and tail_refresh, have no time stamp: when one of them stops,
tracelake_tail_lag_seconds increases. The tls_reload task of a listener with TLS has no time
stamp either. If it panics, TraceLakeBackgroundTaskDied fires. If it stops without a panic,
the certificate in use becomes older, and TraceLakeTlsCertificateExpiring fires.
Catalog¶
All processes that use the Iceberg catalog have these metrics.
| Metric | Type | Labels | Meaning |
|---|---|---|---|
tracelake_catalog_snapshot_age_seconds |
Gauge | dataset |
Time since the gateway last got the snapshot pointer from the catalog. Read it on the gateway. |
tracelake_catalog_commit_latency_seconds |
Histogram | component |
Duration of a catalog commit. Buckets: 0.1, 0.5, 1, 5, 15, 60. |
tracelake_catalog_commit_conflicts_total |
Counter | dataset, component |
Commits that the catalog refused because another writer committed first. The writer tries again. Not seeded. |
component is ingestor, compactor or maintenance. The gateway makes no commits.