Skip to content

Commit c85d19a

Browse files
committed
refactor: remove export_metrics feature and related configuration/docs
1 parent 658d07b commit c85d19a

File tree

24 files changed

+8
-806
lines changed

24 files changed

+8
-806
lines changed

config/datanode.example.toml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -672,20 +672,7 @@ otlp_export_protocol = "http"
672672
[logging.tracing_sample_ratio]
673673
default_ratio = 1.0
674674

675-
## The datanode can export its metrics and send to Prometheus compatible service (e.g. `greptimedb` itself) from remote-write API.
676-
## This is only used for `greptimedb` to export its own metrics internally. It's different from prometheus scrape.
677-
[export_metrics]
678-
## whether enable export metrics.
679-
enable = false
680-
## The interval of export metrics.
681-
write_interval = "30s"
682-
683-
[export_metrics.remote_write]
684-
## The prometheus remote write endpoint that the metrics send to. The url example can be: `http://127.0.0.1:4000/v1/prometheus/write?db=greptime_metrics`.
685-
url = ""
686-
687-
## HTTP headers of Prometheus remote-write carry.
688-
headers = { }
675+
## Exporting internal metrics via remote-write has been removed. Please use external Prometheus/OTel/VMA to scrape metrics.
689676

690677
## The tracing options. Only effect when compiled with `tokio-console` feature.
691678
#+ [tracing]

config/frontend.example.toml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -305,20 +305,7 @@ sample_ratio = 1.0
305305
## The TTL of the `slow_queries` system table. Default is `90d` when `record_type` is `system_table`.
306306
ttl = "90d"
307307

308-
## The frontend can export its metrics and send to Prometheus compatible service (e.g. `greptimedb` itself) from remote-write API.
309-
## This is only used for `greptimedb` to export its own metrics internally. It's different from prometheus scrape.
310-
[export_metrics]
311-
## whether enable export metrics.
312-
enable = false
313-
## The interval of export metrics.
314-
write_interval = "30s"
315-
316-
[export_metrics.remote_write]
317-
## The prometheus remote write endpoint that the metrics send to. The url example can be: `http://127.0.0.1:4000/v1/prometheus/write?db=greptime_metrics`.
318-
url = ""
319-
320-
## HTTP headers of Prometheus remote-write carry.
321-
headers = { }
308+
## Exporting internal metrics via remote-write has been removed. Please use external Prometheus/OTel/VMA to scrape metrics.
322309

323310
## The tracing options. Only effect when compiled with `tokio-console` feature.
324311
#+ [tracing]

config/metasrv.example.toml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -325,20 +325,7 @@ otlp_export_protocol = "http"
325325
[logging.tracing_sample_ratio]
326326
default_ratio = 1.0
327327

328-
## The metasrv can export its metrics and send to Prometheus compatible service (e.g. `greptimedb` itself) from remote-write API.
329-
## This is only used for `greptimedb` to export its own metrics internally. It's different from prometheus scrape.
330-
[export_metrics]
331-
## whether enable export metrics.
332-
enable = false
333-
## The interval of export metrics.
334-
write_interval = "30s"
335-
336-
[export_metrics.remote_write]
337-
## The prometheus remote write endpoint that the metrics send to. The url example can be: `http://127.0.0.1:4000/v1/prometheus/write?db=greptime_metrics`.
338-
url = ""
339-
340-
## HTTP headers of Prometheus remote-write carry.
341-
headers = { }
328+
## Exporting internal metrics via remote-write has been removed. Please use external Prometheus/OTel/VMA to scrape metrics.
342329

343330
## The tracing options. Only effect when compiled with `tokio-console` feature.
344331
#+ [tracing]

config/standalone.example.toml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -768,26 +768,7 @@ default_ratio = 1.0
768768
## @toml2docs:none-default
769769
#+ sample_ratio = 1.0
770770

771-
## The standalone can export its metrics and send to Prometheus compatible service (e.g. `greptimedb`) from remote-write API.
772-
## This is only used for `greptimedb` to export its own metrics internally. It's different from prometheus scrape.
773-
[export_metrics]
774-
## whether enable export metrics.
775-
enable = false
776-
## The interval of export metrics.
777-
write_interval = "30s"
778-
779-
## For `standalone` mode, `self_import` is recommended to collect metrics generated by itself
780-
## You must create the database before enabling it.
781-
[export_metrics.self_import]
782-
## @toml2docs:none-default
783-
db = "greptime_metrics"
784-
785-
[export_metrics.remote_write]
786-
## The prometheus remote write endpoint that the metrics send to. The url example can be: `http://127.0.0.1:4000/v1/prometheus/write?db=greptime_metrics`.
787-
url = ""
788-
789-
## HTTP headers of Prometheus remote-write carry.
790-
headers = { }
771+
## Exporting internal metrics via remote-write has been removed. Please use external Prometheus/OTel/VMA to scrape metrics.
791772

792773
## The tracing options. Only effect when compiled with `tokio-console` feature.
793774
#+ [tracing]

src/catalog/src/system_schema/information_schema.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ mod procedure_info;
2222
pub mod process_list;
2323
pub mod region_peers;
2424
mod region_statistics;
25-
mod runtime_metrics;
2625
pub mod schemata;
2726
mod table_constraints;
2827
mod table_names;
@@ -60,7 +59,6 @@ use crate::system_schema::information_schema::information_memory_table::get_sche
6059
use crate::system_schema::information_schema::key_column_usage::InformationSchemaKeyColumnUsage;
6160
use crate::system_schema::information_schema::partitions::InformationSchemaPartitions;
6261
use crate::system_schema::information_schema::region_peers::InformationSchemaRegionPeers;
63-
use crate::system_schema::information_schema::runtime_metrics::InformationSchemaMetrics;
6462
use crate::system_schema::information_schema::schemata::InformationSchemaSchemata;
6563
use crate::system_schema::information_schema::table_constraints::InformationSchemaTableConstraints;
6664
use crate::system_schema::information_schema::tables::InformationSchemaTables;
@@ -211,7 +209,6 @@ impl SystemSchemaProviderInner for InformationSchemaProvider {
211209
self.catalog_name.clone(),
212210
self.catalog_manager.clone(),
213211
)) as _),
214-
RUNTIME_METRICS => Some(Arc::new(InformationSchemaMetrics::new())),
215212
PARTITIONS => Some(Arc::new(InformationSchemaPartitions::new(
216213
self.catalog_name.clone(),
217214
self.catalog_manager.clone(),
@@ -297,10 +294,6 @@ impl InformationSchemaProvider {
297294
// authentication details, and other critical information.
298295
// Only put these tables under `greptime` catalog to prevent info leak.
299296
if self.catalog_name == DEFAULT_CATALOG_NAME {
300-
tables.insert(
301-
RUNTIME_METRICS.to_string(),
302-
self.build_table(RUNTIME_METRICS).unwrap(),
303-
);
304297
tables.insert(
305298
BUILD_INFO.to_string(),
306299
self.build_table(BUILD_INFO).unwrap(),

src/catalog/src/system_schema/information_schema/runtime_metrics.rs

Lines changed: 0 additions & 265 deletions
This file was deleted.

0 commit comments

Comments
 (0)