Skip to content

Commit bb144af

Browse files
authored
feat(agent): send logging configuration metrics (newrelic#520)
Send Supportability/Logging/Metrics/PHP/{enabled|disabled} and Supportability/Logging/Forwarding/PHP/{enabled|disabled} with value for {enabled|disabled} based on the INI settings. Metrics will only be sent once. Update integration tests expectation.
1 parent fbb90ef commit bb144af

File tree

321 files changed

+1803
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+1803
-27
lines changed

agent/php_txn.c

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,35 @@ static void nr_php_txn_log_error_dt_on_tt_off(void) {
624624
}
625625
}
626626

627+
static void nr_php_txn_send_metrics_once(nrtxn_t* txn TSRMLS_DC) {
628+
static unsigned int sent = 0;
629+
char* metname = NULL;
630+
631+
if (nrunlikely(NULL == NRPRG(txn))) {
632+
return;
633+
}
634+
635+
if (nrlikely(0 != sent)) {
636+
return;
637+
}
638+
639+
#define FMT_BOOL(v) (v) ? "enabled" : "disabled"
640+
641+
metname = nr_formatf("Supportability/Logging/Forwarding/PHP/%s",
642+
FMT_BOOL(nr_txn_log_forwarding_enabled(txn)));
643+
nrm_force_add(NRTXN(unscoped_metrics), metname, 0);
644+
nr_free(metname);
645+
646+
metname = nr_formatf("Supportability/Logging/Metrics/PHP/%s",
647+
FMT_BOOL(nr_txn_log_metrics_enabled(txn)));
648+
nrm_force_add(NRTXN(unscoped_metrics), metname, 0);
649+
nr_free(metname);
650+
651+
sent = 1;
652+
653+
#undef FMT_BOOL
654+
}
655+
627656
nr_status_t nr_php_txn_begin(const char* appnames,
628657
const char* license TSRMLS_DC) {
629658
nrtxnopt_t opts;
@@ -784,6 +813,8 @@ nr_status_t nr_php_txn_begin(const char* appnames,
784813
return NR_FAILURE;
785814
}
786815

816+
nr_php_txn_send_metrics_once(NRPRG(txn) TSRMLS_CC);
817+
787818
/*
788819
* Disable automated parenting for the default parent context. See
789820
* php_stacked_segment.h for further details.

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_disabled.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
newrelic.span_events_enabled=1
1515
newrelic.span_events.attributes.enabled = false
1616
newrelic.cross_application_tracer.enabled = false
17+
newrelic.application_logging.enabled = false
18+
newrelic.application_logging.forwarding.enabled = false
19+
newrelic.application_logging.metrics.enabled = false
1720
*/
1821

1922
/*EXPECT
@@ -87,6 +90,8 @@
8790
[1, "??", "??", "??", "??", "??"]],
8891
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
8992
[1, "??", "??", "??", "??", "??"]],
93+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
94+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
9095
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
9196
[{"name":"Supportability/api/add_custom_span_parameter"}, [4, 0, 0, 0, 0, 0]]
9297
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_duplicate.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
newrelic.transaction_tracer.detail = false
1717
newrelic.span_events_enabled=1
1818
newrelic.cross_application_tracer.enabled = false
19+
newrelic.application_logging.enabled = false
20+
newrelic.application_logging.forwarding.enabled = false
21+
newrelic.application_logging.metrics.enabled = false
1922
*/
2023

2124
/*EXPECT
@@ -129,6 +132,8 @@
129132
[1, "??", "??", "??", "??", "??"]],
130133
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
131134
[1, "??", "??", "??", "??", "??"]],
135+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
136+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
132137
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
133138
[{"name":"Supportability/api/add_custom_span_parameter"}, [3, 0, 0, 0, 0, 0]],
134139
[{"name":"Supportability/api/add_custom_parameter"}, [5, 0, 0, 0, 0, 0]]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_duplicate_te_off.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
newrelic.span_events_enabled=1
1818
newrelic.cross_application_tracer.enabled = false
1919
newrelic.transaction_events.enabled = false
20+
newrelic.application_logging.enabled = false
21+
newrelic.application_logging.forwarding.enabled = false
22+
newrelic.application_logging.metrics.enabled = false
2023
*/
2124

2225
/*EXPECT
@@ -103,6 +106,8 @@
103106
[1, "??", "??", "??", "??", "??"]],
104107
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
105108
[1, "??", "??", "??", "??", "??"]],
109+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
110+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
106111
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
107112
[{"name":"Supportability/api/add_custom_span_parameter"}, [4, 0, 0, 0, 0, 0]],
108113
[{"name":"Supportability/api/add_custom_parameter"}, [4, 0, 0, 0, 0, 0]]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_filter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
newrelic.span_events.attributes.exclude = bool, string
1717
newrelic.transaction_events.attributes.exclude = double
1818
newrelic.cross_application_tracer.enabled = false
19+
newrelic.application_logging.enabled = false
20+
newrelic.application_logging.forwarding.enabled = false
21+
newrelic.application_logging.metrics.enabled = false
1922
*/
2023

2124
/*EXPECT
@@ -91,6 +94,8 @@
9194
[1, "??", "??", "??", "??", "??"]],
9295
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
9396
[1, "??", "??", "??", "??", "??"]],
97+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
98+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
9499
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
95100
[{"name":"Supportability/api/add_custom_span_parameter"}, [4, 0, 0, 0, 0, 0]]
96101
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_max_key.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
newrelic.transaction_tracer.detail = false
1515
newrelic.span_events_enabled=1
1616
newrelic.cross_application_tracer.enabled = false
17+
newrelic.application_logging.enabled = false
18+
newrelic.application_logging.forwarding.enabled = false
19+
newrelic.application_logging.metrics.enabled = false
1720
*/
1821

1922
/*EXPECT
@@ -91,6 +94,8 @@
9194
[1, "??", "??", "??", "??", "??"]],
9295
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
9396
[1, "??", "??", "??", "??", "??"]],
97+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
98+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
9499
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
95100
[{"name":"Supportability/api/add_custom_span_parameter"}, [4, 0, 0, 0, 0, 0]]
96101
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_max_key_te_off.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
newrelic.span_events_enabled = 1
1616
newrelic.transaction_events.enabled = false
1717
newrelic.cross_application_tracer.enabled = false
18+
newrelic.application_logging.enabled = false
19+
newrelic.application_logging.forwarding.enabled = false
20+
newrelic.application_logging.metrics.enabled = false
1821
*/
1922

2023
/*EXPECT
@@ -96,6 +99,8 @@
9699
[1, "??", "??", "??", "??", "??"]],
97100
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
98101
[1, "??", "??", "??", "??", "??"]],
102+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
103+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
99104
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
100105
[{"name":"Supportability/api/add_custom_span_parameter"}, [4, 0, 0, 0, 0, 0]]
101106
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_max_parameters.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
newrelic.transaction_tracer.detail = false
1616
newrelic.span_events_enabled=1
1717
newrelic.cross_application_tracer.enabled = false
18+
newrelic.application_logging.enabled = false
19+
newrelic.application_logging.forwarding.enabled = false
20+
newrelic.application_logging.metrics.enabled = false
1821
*/
1922

2023
/*EXPECT
@@ -213,6 +216,8 @@
213216
[1, "??", "??", "??", "??", "??"]],
214217
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
215218
[1, "??", "??", "??", "??", "??"]],
219+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
220+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
216221
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
217222
[{"name":"Supportability/api/add_custom_span_parameter"}, [64, 0, 0, 0, 0, 0]]
218223
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_max_value.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
newrelic.transaction_tracer.detail = false
1414
newrelic.span_events_enabled=1
1515
newrelic.cross_application_tracer.enabled = false
16+
newrelic.application_logging.enabled = false
17+
newrelic.application_logging.forwarding.enabled = false
18+
newrelic.application_logging.metrics.enabled = false
1619
*/
1720

1821
/*EXPECT
@@ -91,6 +94,8 @@
9194
[1, "??", "??", "??", "??", "??"]],
9295
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
9396
[1, "??", "??", "??", "??", "??"]],
97+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
98+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
9499
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
95100
[{"name":"Supportability/api/add_custom_span_parameter"}, [4, 0, 0, 0, 0, 0]]
96101
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_max_value_te_off.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
newrelic.span_events_enabled=1
2020
newrelic.cross_application_tracer.enabled = false
2121
newrelic.transaction_events.enabled = false
22+
newrelic.application_logging.enabled = false
23+
newrelic.application_logging.forwarding.enabled = false
24+
newrelic.application_logging.metrics.enabled = false
2225
*/
2326

2427
/*EXPECT
@@ -101,6 +104,8 @@
101104
[1, "??", "??", "??", "??", "??"]],
102105
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
103106
[1, "??", "??", "??", "??", "??"]],
107+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
108+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
104109
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
105110
[{"name":"Supportability/api/add_custom_span_parameter"}, [4, 0, 0, 0, 0, 0]]
106111
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_maxplus_parameters.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
newrelic.transaction_tracer.detail = false
1515
newrelic.span_events_enabled=1
1616
newrelic.cross_application_tracer.enabled = false
17+
newrelic.application_logging.enabled = false
18+
newrelic.application_logging.forwarding.enabled = false
19+
newrelic.application_logging.metrics.enabled = false
1720
*/
1821

1922
/*EXPECT
@@ -213,6 +216,8 @@
213216
[1, "??", "??", "??", "??", "??"]],
214217
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
215218
[1, "??", "??", "??", "??", "??"]],
219+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
220+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
216221
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
217222
[{"name":"Supportability/api/add_custom_span_parameter"}, [65, 0, 0, 0, 0, 0]]
218223
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_maxplus_parameters_te_off.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
newrelic.span_events_enabled=1
1717
newrelic.cross_application_tracer.enabled = false
1818
newrelic.transaction_events.enabled = 0
19+
newrelic.application_logging.enabled = false
20+
newrelic.application_logging.forwarding.enabled = false
21+
newrelic.application_logging.metrics.enabled = false
1922
*/
2023

2124
/*EXPECT
@@ -219,6 +222,8 @@
219222
[1, "??", "??", "??", "??", "??"]],
220223
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
221224
[1, "??", "??", "??", "??", "??"]],
225+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
226+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
222227
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
223228
[{"name":"Supportability/api/add_custom_span_parameter"}, [65, 0, 0, 0, 0, 0]]
224229
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_maxplus_span_and_te.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
newrelic.span_events_enabled=1
1616
newrelic.cross_application_tracer.enabled = false
1717
newrelic.loglevel = "verbosedebug"
18+
newrelic.application_logging.enabled = false
19+
newrelic.application_logging.forwarding.enabled = false
20+
newrelic.application_logging.metrics.enabled = false
1821
*/
1922

2023
/*EXPECT
@@ -339,6 +342,8 @@
339342
[1, "??", "??", "??", "??", "??"]],
340343
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
341344
[1, "??", "??", "??", "??", "??"]],
345+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
346+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
342347
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
343348
[{"name":"Supportability/api/add_custom_parameter"}, [65, 0, 0, 0, 0, 0]],
344349
[{"name":"Supportability/api/add_custom_span_parameter"}, [34, 0, 0, 0, 0, 0]]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_maxplus_span_and_te_te_off.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
newrelic.cross_application_tracer.enabled = false
1717
newrelic.transaction_events.enabled = false
1818
newrelic.loglevel = "verbosedebug"
19+
newrelic.application_logging.enabled = false
20+
newrelic.application_logging.forwarding.enabled = false
21+
newrelic.application_logging.metrics.enabled = false
1922
*/
2023

2124
/*EXPECT
@@ -253,6 +256,8 @@
253256
[1, "??", "??", "??", "??", "??"]],
254257
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
255258
[1, "??", "??", "??", "??", "??"]],
259+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
260+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
256261
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
257262
[{"name":"Supportability/api/add_custom_parameter"}, [65, 0, 0, 0, 0, 0]],
258263
[{"name":"Supportability/api/add_custom_span_parameter"}, [34, 0, 0, 0, 0, 0]]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_overwrite.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
newrelic.transaction_tracer.detail = false
1414
newrelic.span_events_enabled=1
1515
newrelic.cross_application_tracer.enabled = false
16+
newrelic.application_logging.enabled = false
17+
newrelic.application_logging.forwarding.enabled = false
18+
newrelic.application_logging.metrics.enabled = false
1619
*/
1720

1821
/*EXPECT
@@ -91,6 +94,8 @@
9194
[1, "??", "??", "??", "??", "??"]],
9295
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
9396
[1, "??", "??", "??", "??", "??"]],
97+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
98+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
9499
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
95100
[{"name":"Supportability/api/add_custom_parameter"}, [3, 0, 0, 0, 0, 0]],
96101
[{"name":"Supportability/api/add_custom_span_parameter"}, [2, 0, 0, 0, 0, 0]]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_te_off.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
newrelic.span_events_enabled=1
1616
newrelic.cross_application_tracer.enabled = false
1717
newrelic.transaction_events.enabled = 0
18+
newrelic.application_logging.enabled = false
19+
newrelic.application_logging.forwarding.enabled = false
20+
newrelic.application_logging.metrics.enabled = false
1821
*/
1922

2023
/*EXPECT
@@ -93,6 +96,8 @@
9396
[1, "??", "??", "??", "??", "??"]],
9497
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
9598
[1, "??", "??", "??", "??", "??"]],
99+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
100+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
96101
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
97102
[{"name":"Supportability/api/add_custom_span_parameter"}, [4, 0, 0, 0, 0, 0]]
98103
]

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_types.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
newrelic.transaction_tracer.detail = false
1515
newrelic.span_events_enabled=1
1616
newrelic.cross_application_tracer.enabled = false
17+
newrelic.application_logging.enabled = false
18+
newrelic.application_logging.forwarding.enabled = false
19+
newrelic.application_logging.metrics.enabled = false
1720
*/
1821

1922
/*EXPECT
@@ -92,6 +95,8 @@
9295
[1, "??", "??", "??", "??", "??"]],
9396
[{"name":"DurationByCaller/Unknown/Unknown/Unknown/Unknown/allOther"},
9497
[1, "??", "??", "??", "??", "??"]],
98+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
99+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
95100
[{"name":"Supportability/api/add_custom_tracer"}, [1, 0, 0, 0, 0, 0]],
96101
[{"name":"Supportability/api/add_custom_span_parameter"}, [4, 0, 0, 0, 0, 0]]
97102
]

tests/integration/api/add_custom_tracer/test_happy.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
Test normal successful usage of newrelic_add_custom_tracer.
99
*/
1010

11+
/*INI
12+
newrelic.application_logging.enabled = false
13+
newrelic.application_logging.forwarding.enabled = false
14+
newrelic.application_logging.metrics.enabled = false
15+
*/
16+
1117
/*EXPECT
1218
zip
1319
zap
@@ -33,6 +39,8 @@
3339
[{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
3440
[{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]],
3541
[{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
42+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
43+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
3644
[{"name":"Supportability/api/add_custom_tracer"}, [2, "??", "??", "??", "??", "??"]]
3745
]
3846
]

tests/integration/api/add_custom_tracer/test_not_user_function.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
Test that adding custom tracers for internal functions does not blow up.
99
*/
1010

11+
/*INI
12+
newrelic.application_logging.enabled = false
13+
newrelic.application_logging.forwarding.enabled = false
14+
newrelic.application_logging.metrics.enabled = false
15+
*/
16+
1117
/*EXPECT_METRICS
1218
[
1319
"?? agent run id",
@@ -22,6 +28,8 @@
2228
[{"name":"OtherTransaction/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
2329
[{"name":"OtherTransactionTotalTime"}, [1, "??", "??", "??", "??", "??"]],
2430
[{"name":"OtherTransactionTotalTime/php__FILE__"}, [1, "??", "??", "??", "??", "??"]],
31+
[{"name": "Supportability/Logging/Forwarding/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
32+
[{"name": "Supportability/Logging/Metrics/PHP/disabled"}, [1, "??", "??", "??", "??", "??"]],
2533
[{"name":"Supportability/api/add_custom_tracer"}, [2, "??", "??", "??", "??", "??"]]
2634
]
2735
]

0 commit comments

Comments
 (0)