Skip to content

Commit 5341b6d

Browse files
committed
Updated admin settings for #399
1 parent 4b48420 commit 5341b6d

File tree

2 files changed

+5
-22
lines changed

2 files changed

+5
-22
lines changed

plugins/wpgraphql-logging/src/Admin/Settings/Fields/Tab/Basic_Configuration_Tab.php

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ class Basic_Configuration_Tab implements Settings_Tab_Interface {
5252
*/
5353
public const ADMIN_USER_LOGGING = 'admin_user_logging';
5454

55-
/**
56-
* The field ID for the performance metrics text input.
57-
*
58-
* @var string
59-
*/
60-
public const PERFORMANCE_METRICS = 'performance_metrics';
61-
6255
/**
6356
* The field ID for the log point selection select.
6457
*
@@ -129,26 +122,17 @@ public function get_fields(): array {
129122
$this->get_name(),
130123
__( 'Data Sampling Rate', 'wpgraphql-logging' ),
131124
[
132-
'100' => __( '100% (All requests)', 'wpgraphql-logging' ),
133-
'50' => __( '50% (Every other request)', 'wpgraphql-logging' ),
134-
'25' => __( '25% (Every 4th request)', 'wpgraphql-logging' ),
135125
'10' => __( '10% (Every 10th request)', 'wpgraphql-logging' ),
126+
'25' => __( '25% (Every 4th request)', 'wpgraphql-logging' ),
127+
'50' => __( '50% (Every other request)', 'wpgraphql-logging' ),
128+
'75' => __( '75% (Every 3 out of 4 requests)', 'wpgraphql-logging' ),
129+
'100' => __( '100% (All requests)', 'wpgraphql-logging' ),
136130
],
137131
'',
138132
__( 'Percentage of requests to log for performance optimization.', 'wpgraphql-logging' ),
139133
false
140134
);
141135

142-
$fields[ self::PERFORMANCE_METRICS ] = new Text_Input_Field(
143-
self::PERFORMANCE_METRICS,
144-
$this->get_name(),
145-
__( 'Performance Threshold (seconds)', 'wpgraphql-logging' ),
146-
'',
147-
__( 'Only log requests that take longer than this threshold. 0 logs all requests. Calculated in seconds.', 'wpgraphql-logging' ),
148-
__( 'e.g., 1.5', 'wpgraphql-logging' )
149-
);
150-
151-
152136
$fields[ self::EVENT_LOG_SELECTION ] = new Select_Field(
153137
self::EVENT_LOG_SELECTION,
154138
$this->get_name(),
@@ -162,7 +146,7 @@ public function get_fields(): array {
162146
Events::RESPONSE_HEADERS_TO_SEND => __( 'Response Headers', 'wpgraphql-logging' ),
163147
],
164148
'',
165-
__( 'Select which points in the request lifecycle to log. By default, all points are logged.', 'wpgraphql-logging' ),
149+
__( 'Select which points in the request lifecycle to log. By default, no events are logged.', 'wpgraphql-logging' ),
166150
true
167151
);
168152

plugins/wpgraphql-logging/src/Admin/Settings/Templates/admin.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@
6969
<li><?php esc_html_e( 'Log only for admin users', 'wpgraphql-logging' ); ?></li>
7070
<li><?php esc_html_e( 'Filter specific queries', 'wpgraphql-logging' ); ?></li>
7171
<li><?php esc_html_e( 'Set data sampling rates', 'wpgraphql-logging' ); ?></li>
72-
<li><?php esc_html_e( 'Performance threshold', 'wpgraphql-logging' ); ?></li>
7372
<li><?php esc_html_e( 'Log for specific events', 'wpgraphql-logging' ); ?></li>
7473
</ul>
7574
<?php

0 commit comments

Comments
 (0)