File tree 7 files changed +45
-29
lines changed
7 files changed +45
-29
lines changed Original file line number Diff line number Diff line change @@ -2,24 +2,16 @@ columns:
2
2
- column : " Option"
3
3
- column : " Description"
4
4
rows :
5
- - Option : " `--dump-docker <boolean>`"
6
- Description : |
7
-
8
- <a name="dump-docker"></a> If `true`, dump debug information from the Docker container.
9
-
10
- Defaults to `true`.
11
-
12
5
- Option : " `--docker-container-id <ID>`"
13
6
Description : |
14
7
15
8
<a name="docker-container-id"></a> The Docker container to dump.
16
9
17
- Required if [`--dump-docker`](#dump-docker) is true .
10
+ Required.
18
11
19
- - Option : " `--mz-connection-url <URL >`"
12
+ - Option : " `--dump-docker <boolean >`"
20
13
Description : |
21
14
22
- <a name="mz-connection-url"></a>The URL of the Materialize's SQL
23
- connection.
15
+ <a name="dump-docker"></a> If `true`, dump debug information from the Docker container.
24
16
25
- Defaults to `postgres://127.0.0.1:6875/materialize?sslmode=prefer `.
17
+ Defaults to `true `.
Original file line number Diff line number Diff line change @@ -2,10 +2,36 @@ columns:
2
2
- column : " Option"
3
3
- column : " Description"
4
4
rows :
5
+ - Option : " `--dump-heap-profiles <boolean>`"
6
+ Description : |
7
+
8
+ <a name="dump-heap-profiles"></a> If `true`, dump heap profiles (.pprof) from
9
+ your Materialize instance.
10
+
11
+ Defaults to `true`.
12
+ - Option : " `--dump-prometheus-metrics <boolean>`"
13
+ Description : |
14
+
15
+ <a name="dump-prometheus-metrics"></a> If `true`, dump prometheus metrics from
16
+ your Materialize instance.
17
+
18
+ Defaults to `true`.
19
+
20
+
5
21
- Option : " `--dump-system-catalog <boolean>`"
6
22
Description : |
7
23
8
24
<a name="dump-system-catalog"></a> If `true`, dump the system catalog from
9
25
your Materialize instance.
10
26
11
27
Defaults to `true`.
28
+
29
+
30
+ - Option : " `--mz-connection-url <URL>`"
31
+ Description : |
32
+
33
+ <a name="mz-connection-url"></a>The Materialize instance's [PostgreSQL
34
+ connection
35
+ URL](https://www.postgresql.org/docs/14/libpq-connect.html#LIBPQ-CONNSTRING).
36
+
37
+ Defaults to `postgres://127.0.0.1:6875/materialize?sslmode=prefer`.
Original file line number Diff line number Diff line change 57
57
58
58
Defaults to `6875`.
59
59
60
- - Option : " `--mz-connection-url <URL>`"
61
- Description : |
62
-
63
- <a name="mz-connection-url"></a>The Materialize instance's [PostgreSQL
64
- connection
65
- URL](https://www.postgresql.org/docs/14/libpq-connect.html#LIBPQ-CONNSTRING).
66
-
67
- Defaults to a connection URL constructed from:
68
-
69
- [`--port-forward-local-address`](#port-forward-local-address) and
70
- [`--port-forward-local-port`](#port-forward-local-port) values.
71
-
72
60
- Option : " `-h`, `--help`"
73
61
Description : |
74
62
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " mz-debug"
3
3
description = " Debug tool for self-managed Materialize."
4
- version = " 0.1 .0"
4
+ version = " 0.2 .0"
5
5
edition.workspace = true
6
6
rust-version.workspace = true
7
7
publish = false
Original file line number Diff line number Diff line change
1
+ // Copyright Materialize, Inc. and contributors. All rights reserved.
2
+ //
3
+ // Use of this software is governed by the Business Source License
4
+ // included in the LICENSE file.
5
+ //
6
+ // As of the Change Date specified in that file, in accordance with
7
+ // the Business Source License, use of this software will be governed
8
+ // by the Apache License, Version 2.0.
9
+
10
+ //! Dumps internal http debug information to files.
1
11
use anyhow:: { Context as AnyhowContext , Result } ;
2
12
use futures:: StreamExt ;
3
13
use k8s_openapi:: api:: core:: v1:: ServicePort ;
@@ -95,7 +105,7 @@ impl<'n> InternalHttpDumpClient<'n> {
95
105
let output_path = output_dir. join ( format ! ( "{}.memprof.pprof" , service_name) ) ;
96
106
97
107
self . dump_request_to_file (
98
- & relative_url,
108
+ relative_url,
99
109
{
100
110
let mut headers = HeaderMap :: new ( ) ;
101
111
headers. insert (
@@ -127,7 +137,7 @@ impl<'n> InternalHttpDumpClient<'n> {
127
137
128
138
let output_path = output_dir. join ( format ! ( "{}.metrics.txt" , service_name) ) ;
129
139
self . dump_request_to_file (
130
- & relative_url,
140
+ relative_url,
131
141
{
132
142
let mut headers = HeaderMap :: new ( ) ;
133
143
headers. insert ( "Accept" , HeaderValue :: from_static ( "text/plain" ) ) ;
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ pub async fn create_pg_wire_port_forwarder(
202
202
) -> Result < KubectlPortForwarder > {
203
203
let service_info = find_environmentd_service ( client, k8s_namespaces)
204
204
. await
205
- . with_context ( || format ! ( "Cannot find ports for environmentd service" ) ) ?;
205
+ . with_context ( || "Cannot find ports for environmentd service" ) ?;
206
206
207
207
let maybe_internal_sql_port = service_info. service_ports . iter ( ) . find_map ( |port_info| {
208
208
if let Some ( port_name) = & port_info. name {
You can’t perform that action at this time.
0 commit comments