dennis zhuang
ec8263b464
fix: log not print ( #7272 )
...
fix: log missing
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
2025-11-21 03:14:45 +00:00
Ruihang Xia
5d8819e7af
fix: dynamic reload tracing layer loses trace id ( #7257 )
...
* not working
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* works
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Apply suggestions from code review
Co-authored-by: Yingwen <realevenyag@gmail.com >
* clean up
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Yingwen <realevenyag@gmail.com >
2025-11-19 06:16:56 +00:00
Ruihang Xia
cc61af7c65
feat: dynamic enable or disable trace ( #6609 )
...
* wip
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* set `TRACE_RELOAD_HANDLE`
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
* wrap http api
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update dependencies
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* type alias and unwrap_or_else
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* better error handling
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* simplify
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* lazy initialize tracer
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* integration test
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Signed-off-by: Zhenchi <zhongzc_arch@outlook.com >
Co-authored-by: Zhenchi <zhongzc_arch@outlook.com >
2025-11-17 12:16:46 +00:00
LFC
8fe17d43d5
chore: update rust to nightly 2025-10-01 ( #7069 )
...
* chore: update rust to nightly 2025-10-01
Signed-off-by: luofucong <luofc@foxmail.com >
* chore: nix update
---------
Signed-off-by: luofucong <luofc@foxmail.com >
Co-authored-by: Ning Sun <sunning@greptime.com >
2025-10-11 07:30:52 +00:00
Ning Sun
660790148d
fix: various typos reported by CI ( #7047 )
...
* fix: various typos reported by CI
* fix: additional typo
2025-10-02 15:11:09 +00:00
Ruihang Xia
c9377e7c5a
build: bump rust edition to 2024 ( #6920 )
...
* bump edition
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* format
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* gen keyword
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* lifetime and env var
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* one more gen fix
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* lifetime of temporaries in tail expressions
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* format again
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* clippy nested if
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* clippy let and return
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2025-09-08 02:37:18 +00:00
Ning Sun
cdc168e753
feat: support for custom headers in otel exporter ( #6773 )
...
* feat: support for custom headers in otel exporter
Signed-off-by: Ning Sun <sunning@greptime.com >
* chore: remove wrapping option
Signed-off-by: Ning Sun <sunning@greptime.com >
---------
Signed-off-by: Ning Sun <sunning@greptime.com >
2025-08-21 13:10:13 +00:00
Ning Sun
5a4036cc66
feat: update opentelemetry family ( #6762 )
...
* feat: update opentelemetry family
Signed-off-by: Ning Sun <sunning@greptime.com >
* doc: update doc samples
Signed-off-by: Ning Sun <sunning@greptime.com >
* chore: toml format
Signed-off-by: Ning Sun <sunning@greptime.com >
* chore: update default otel enpoint
Signed-off-by: Ning Sun <sunning@greptime.com >
---------
Signed-off-by: Ning Sun <sunning@greptime.com >
2025-08-19 09:23:50 +00:00
dennis zhuang
c0fe800e79
feat: improve slow queries options deserialization ( #6734 )
...
* feat: improve slow queries options deserialization
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
* refactor: use serde default for struct
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
---------
Signed-off-by: Dennis Zhuang <killme2008@gmail.com >
2025-08-14 03:43:13 +00:00
zyy17
777da35b0d
refactor: unify the event recorder ( #6689 )
...
* refactor: unify the event recorder
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* refactor: add `table_name()` in `Event` trait
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* chore: add `slow_query_options` in `Instance`
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* refactor: add `EventHandlerOptions` and `options()` in `EventHandler` trait
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* chore: add `aggregate_events_by_type()` and support log mode of slow query
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* chore: polish the code
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* fix: clippy errors
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* chore: support to set ttl by using extension of query context
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* chore: refine the configs fields
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* fix: sqlness test errors
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* refactor: use `Duration` type instead of `String` for ttl fields
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* refactor: use pre-allocation for building RowInsertRequests
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* chore: fix clippy errors
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* refactor: code review
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* chore: fix integration errors
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* refactor: polish code for `group_events_by_type()` and `build_row_inserts_request()`, also add the unit tests
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* chore: refine comments
---------
Signed-off-by: zyy17 <zyylsxm@gmail.com >
2025-08-12 18:26:12 +00:00
Ning Sun
916967ea59
feat: allow alternative version string ( #6472 )
...
* feat: allow alternative version string
* refactor: rename original version function to verbose_version
Signed-off-by: Ning Sun <sunning@greptime.com >
---------
Signed-off-by: Ning Sun <sunning@greptime.com >
2025-07-09 06:43:01 +00:00
liyang
7aa9af5ba6
chore: clarify default OTLP endpoint value ( #6381 )
...
Signed-off-by: liyang <daviderli614@gmail.com >
2025-06-24 11:44:45 +00:00
zyy17
a49edc6ca6
refactor: add otlp_export_protocol config to support export trace data through gRPC and HTTP protocol ( #6357 )
...
* refactor: support http traces
* refactor: add `otlp_export_protocol` config to support export trace data through gRPC and HTTP protocol
Signed-off-by: zyy17 <zyylsxm@gmail.com >
* Update src/common/telemetry/src/logging.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
---------
Signed-off-by: zyy17 <zyylsxm@gmail.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-06-23 02:56:12 +00:00
Ning Sun
12c3a3205b
chore: security updates ( #6351 )
2025-06-19 06:43:43 +00:00
zyy17
fdf32a8f46
refactor: respect data_home as root data home directory ( #6050 )
...
* refactor: initialize logging dir by using data_home
* chore: remove tail '/' for dir name
2025-06-09 02:31:21 +00:00
zyy17
01076069a3
chore: modify default slow_query.threshold from 5s to 30s ( #6107 )
...
chore: modify slow_query.threshold from 5s to 30s
2025-05-15 20:16:13 +00:00
zyy17
14b655ea57
refactor: add SlowQueryRecorder to record slow query in system table and refactor slow query options ( #6008 )
...
* refactor: add common-slow-query crate
* refactor: refine the naming
* chore: fix clippy
* chore: fix typo
* chore: sperate SlowQueryOptions From Logging
* chore: fix clippy
* chore: fix ci
* chore: refine the code
* chore: update config example
* refactor: use drop() to end the slow query timer
* refactor: move common-slow-query to frontend crate
* chore: polish some code
* refactor: code review
* refactor: add promql_range/promql_step/promql_start/promql_end fields in slow_queries
* refactor: add build_slow_query_logger()
* refactor: turn on slow query on frontend by default
2025-05-15 04:18:48 +00:00
Ning Sun
dc76571166
feat: move default data path from /tmp to current directory ( #5719 )
2025-03-16 09:57:46 +00:00
LFC
fd8eba36a8
refactor: make use of the "pre_execute" in sql execution interceptor ( #4875 )
...
* feat: dynamic definition of plugin options
* rebase
* revert
* fix ci
2024-10-30 09:16:46 +00:00
pa
9d3ee6384a
feat: Limit CPU in runtime ( #3685 ) ( #4782 )
...
feat: add throttle runtime (#3685 )
2024-10-24 07:30:24 +00:00
Kaifeng Zheng
a283e13da7
feat: set max log files to 720 by default, info log only ( #4787 )
...
* feat: set max log files to 720 by default, info log only
* expose max_log_files in tomls
* include dir info when panicing, limit max_log_files of err_log to 30, and that of slow_queries to opt.max_log_files
* fix clippy
* update config.md
* update expected config str
* limit err_log max files size to `max_log_files` too, include err info when panicing, put `max_l_f` in right position
* fix typos
* chore: config
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
---------
Co-authored-by: dennis zhuang <killme2008@gmail.com >
Co-authored-by: Lei, HUANG <6406592+v0y4g3r@users.noreply.github.com >
2024-10-04 18:05:40 +00:00
zyy17
e39a9e6feb
feat: add StatementStatistics for slow query logging implementation ( #4719 )
...
* feat: log slow query
* feat: log slow query for sql
* refactor: add slow query logging options
* ci: fix errors
* feat: add StatementStatistics
* chore: revert modification of servers crate
* docs: update config docs
* fix: clippy errors
2024-09-30 03:26:50 +00:00
discord9
19e2a9d44b
feat: change log level dynamically ( #4653 )
...
* feat: add dyn_log handle
* feat: use reload handle
* chore: per review
2024-09-04 07:54:50 +00:00
zyy17
8453df1392
refactor: make init_global_logging() clean and add log_format ( #4657 )
...
refactor: refine the code logic of init_global_logging and add json output format
2024-09-04 03:04:51 +00:00
Weny Xu
2564b5daee
fix: correct otlp endpoint formatting ( #4646 )
2024-09-02 02:59:50 +00:00
Weny Xu
a25d9f736f
chore: set default otlp_endpoint ( #4508 )
...
* chore: set default `otlp_endpoint`
* fix: fix ci
2024-08-06 06:48:14 +00:00
Weny Xu
6e9a9dc333
refactor(log_store): remove associated type Namespace and Entry in LogStore ( #4038 )
...
* refactor(log_store): remove associated type `Namespace` in `LogStore`
* fix(test): filter entries
* refactor: ignore incomplete parts
* refactor: simplify `RawEntryReaderFilter`
* chore: avoid cloning
* test: add tests for `maybe_emit_entry`
* refactor: remove `Namespace` trait and rename `LogStoreNamespace` to `Namespace`
* chore: apply suggestions from CR
* refactor: refine `entry` method signature
* feat: ingore any potential incomplete parts
* refactor: rename `namespace` to `provider`
* chore: add debug assertion
* refactor: associated type `Entry` in `LogStore`
* refactor: renamse `namespace` to `provider`
* refactor: remove unwrap
* refactor: let `remaining_entries` return a optional vector
* test: add basic tests for kafka logstore
* refactor: move `append` method under `cfg(test)`
* refactor: rename `RawEntry` to `Entry`
* refactor: rename `CorruptedLogEntry` to `CorruptedEntry`
* test: add tests for handling corrupted raw entry stream
* refactor: rename `ns` to `provider`
* refactor: remove `entry_stream.rs` file
* chore: remove unused code
* chore: update comments
* chore: apply suggestions from CR
* chore: update comments
* chore: apply suggestions from CR
* chore: remove Deref
* chore: add comments
* fix: ignores tail corrupted data
* chore: add comments
* fix: add `MIN_BATCH_SIZE` limit
2024-05-29 13:44:01 +00:00
zyy17
82c3eca25e
refactor: make the command entry cleaner ( #3981 )
...
* refactor: move run() in App trait
* refactor: introduce AppBuilder trait
* chore: remove AppBuilder
* refactor: remove Options struct and make the start() clean
* refactor: init once for common_telemetry::init_global_logging
2024-05-20 03:34:06 +00:00
zyy17
60eb5de3f1
refactor: add tracing options in xOptions ( #3919 )
...
* refactor: add tracing options in {DatanodeOptions, FrontendOptions, MetasrvOptions, StandaloneOptions}
* ci: fix integration error
* refactor: minor modification for initialization of tracing options
2024-05-13 05:16:50 +00:00
Ruihang Xia
530353785c
refactor: remove re-export from logging ( #3865 )
...
* refactor: remove re-export from logging
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix merge problem
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* run formatter
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2024-05-06 13:26:01 +00:00
dimbtp
dd18d8c97b
build(deps): remove some unused dependencies ( #3582 )
...
* build(deps): remove some unused dependencies
* add `arc-swap` dependency back
2024-03-26 12:48:28 +00:00
WU Jingdi
53f2a5846c
feat: support tracing rule sampler ( #3405 )
...
* feat: support tracing rule sampler
* chore: simplify code
2024-03-05 15:40:02 +08:00
SteveLauC
e9a2b0a9ee
chore: use workspace-wide lints ( #3352 )
...
* chore: use workspace-wide lints
* respond to review
2024-02-22 01:01:10 +00:00
Ruihang Xia
b1f54d8a03
fix: disable ansi contorl char when stdout is redirected ( #3332 )
...
* fix: disable ansi contorl char when stdout is redirected
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* don't touch file logging layer
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* update comment
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* disable ansi for two file layers
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: LFC <bayinamine@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: LFC <bayinamine@gmail.com >
2024-02-20 06:42:56 +00:00
Ruihang Xia
72cd443ba3
feat: organize tracing on query path ( #3310 )
...
* feat: organize tracing on query path
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* warp json conversion to TracingContext's methods
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove unnecessary .trace()
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* Update src/query/src/dist_plan/merge_scan.rs
Co-authored-by: Zhenchi <zhongzc_arch@outlook.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
Co-authored-by: Zhenchi <zhongzc_arch@outlook.com >
2024-02-18 15:04:57 +00:00
zyy17
a89840f5f9
refactor(metrics): add 'greptime_' prefix for every metrics ( #3093 )
...
* refactor(metrics): add 'greptimedb_' prefix for every metrics
* chore: use 'greptime_' as prefix
* chore: add some prefix for new metrics
* chore: fix format error
2024-01-05 08:12:23 +00:00
LFC
196c06db14
feat: make logging to stdout configurable ( #3003 )
...
* feat: make logging to stdout configurable
* fix sqlness
* fix: resolve PR comments
2023-12-26 07:37:50 +00:00
WU Jingdi
675767c023
feat: Support export metric in remote write format ( #2928 )
...
* feat: remote write metric task
* chore: pass stanalone task to frontend
* chore: change name to system metric
* fix: add header and rename to export metrics
2023-12-22 02:09:12 +00:00
WU Jingdi
0badb3715e
feat: support sample ratio in trace ( #2809 )
...
* feat: support sample ratio in trace
* chore: fix code advice
2023-11-27 06:46:46 +00:00
WU Jingdi
500e299e40
feat: Enable distributed tracing in greptimedb ( #2755 )
...
* feat: implement distributed tracing
* fix: change usage of span
* fix: use otlp as exporter
* chore: update dependence
* chore: add span info
* chore: add alias
* chore: use instrument instead of trace
2023-11-17 08:51:57 +00:00
Yingwen
142035340d
fix: compiler errors under non-default features ( #2761 )
...
* feat: bump prost and fix pprof feature compiler errors
* feat: fix compiler errors on tokio-console
* chore: fix compiler errors
* ci: add all features check to ci
2023-11-16 19:43:44 +00:00
Ruihang Xia
5b978269cc
feat: simplify log file output by removing bunyan layer ( #2747 )
...
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-11-14 14:18:34 +00:00
Ruihang Xia
93f21b188d
chore: unify workspace dependencies and remove some unused ( #2713 )
...
* log-store
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* base64
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* udeps
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* snafu
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* snafu style
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* change the workspace deps' style
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-11-09 07:34:22 +00:00
WU Jingdi
180bc64cb0
feat: change metric crate from metrics to prometheus ( #2655 )
...
* feat: change metrics to prometheus
* chore: fix code advise
* chore: resolve merge conflict
* chore: fix code advise
2023-10-31 15:46:57 +00:00
Yingwen
d4577e7372
feat(mito): add metrics to mito engine ( #2556 )
...
* feat: allow discarding a timer
* feat: flush metrics
* feat: flush bytes and region count metrics
* refactor: add as_str to get static string
* feat: add handle request elapsed metrics
* feat: add some write related metrics
* style: fix clippy
2023-10-10 03:53:17 +00:00
Ruihang Xia
fbe2f2df46
refactor: simplify warn! and error! macros ( #2503 )
...
* refactor: simplify the error! and warn! macros
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* support display format
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* err.msg to err
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-09-27 03:07:03 +00:00
Ruihang Xia
515ce825bd
feat: stack trace style debug print for error ( #2489 )
...
* impl macro stack_trace_debug
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* manually mark external error
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* ignore warnings
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy warnings
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* use debug print
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* simplify the error and warn macro
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix ut
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* add docs
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* replace snafu backtrace with location
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-09-26 11:23:21 +00:00
Ning Sun
c39de9072f
refactor: use workspace dependencies for internal modules ( #2119 )
...
* refactor: use workspace dependencies for internal modules
* fix: resolve issue with mock module in datanode
* refactor: update test modules
2023-08-08 11:02:34 +00:00
Ruihang Xia
f55bff51ac
feat: set and retrieve trace id in log macro ( #2016 )
...
* trace id passed by task local store
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* modify log macro
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* remove tokio::spawn
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* use real trace id
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
* fix clippy
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
---------
Signed-off-by: Ruihang Xia <waynestxia@gmail.com >
2023-07-25 03:50:27 +00:00
Weny Xu
0fc0f74cd7
fix: fix parking_lot unresolved ( #2025 )
2023-07-25 03:20:12 +00:00