Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/php_nrini.c
Original file line number Diff line number Diff line change
Expand Up @@ -3046,7 +3046,7 @@ STD_PHP_INI_ENTRY_EX(
* Code Level Metrics
*/
STD_PHP_INI_ENTRY_EX("newrelic.code_level_metrics.enabled",
"1",
"0",
NR_PHP_REQUEST,
nr_boolean_mh,
code_level_metrics_enabled,
Expand Down
4 changes: 2 additions & 2 deletions agent/scripts/newrelic.ini.template
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
; Setting: newrelic.code_level_metrics.enabled
; Type : boolean
; Scope : per-directory
; Default: true
; Default: false
; Info : Toggles whether the agent provides function name, function
; filepath, function namespace, and function lineno as
; attributes on reported spans
Expand All @@ -1348,7 +1348,7 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
; entirely
; c) lower the value for newrelic.span_events.max_samples_stored
;
;newrelic.code_level_metrics.enabled = true
;newrelic.code_level_metrics.enabled = false

; Setting: newrelic.vulnerability_management.package_detection.enabled
; Type : boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
Tests newrelic_add_custom_parameter() on a nested path that includes a caught exception.
*/

/*SKIPIF
<?php
if (version_compare(PHP_VERSION, "7.0", "<")) {
die("skip: CLM for PHP 5 not supported\n");
}
*/

/*INI
newrelic.distributed_tracing_enabled=1
newrelic.transaction_tracer.threshold = 0
Expand Down Expand Up @@ -71,11 +64,7 @@
"int": 7,
"string": "a_str"
},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
],
[
{
Expand All @@ -97,11 +86,7 @@
"int": 7,
"string": "b_str"
},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
],
[
{
Expand All @@ -120,10 +105,7 @@
{},
{
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
"error.class": "RuntimeException",
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
"error.class": "RuntimeException"
}
],
[
Expand All @@ -141,11 +123,7 @@
"parentId": "??"
},
{},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
],
[
{
Expand All @@ -164,10 +142,7 @@
{},
{
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
"error.class": "RuntimeException",
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
"error.class": "RuntimeException"
}
]
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
Tests newrelic_add_span_parameter() on a nested, happy path.
*/

/*SKIPIF
<?php
if (version_compare(PHP_VERSION, "7.0", "<")) {
die("skip: CLM for PHP 5 not supported\n");
}
*/

/*INI
newrelic.distributed_tracing_enabled=1
newrelic.transaction_tracer.threshold = 0
Expand Down Expand Up @@ -71,11 +64,7 @@
"int": 7,
"string": "a_str"
},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
],
[
{
Expand All @@ -97,11 +86,7 @@
"int": 7,
"string": "b_str"
},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
],
[
{
Expand All @@ -118,11 +103,7 @@
"parentId": "??"
},
{},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
],
[
{
Expand All @@ -139,11 +120,7 @@
"parentId": "??"
},
{},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
],
[
{
Expand All @@ -160,11 +137,7 @@
"parentId": "??"
},
{},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
]
]
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
Tests newrelic_add_custom_parameter() on a nested path that includes a caught exception. Any txn custom parameters get rolled up, so the parameters for `a` should get rolled up to the error event.
*/

/*SKIPIF
<?php
if (version_compare(PHP_VERSION, "7.0", "<")) {
die("skip: CLM for PHP 5 not supported\n");
}
*/

/*INI
newrelic.distributed_tracing_enabled=1
newrelic.transaction_tracer.threshold = 0
Expand Down Expand Up @@ -105,11 +98,7 @@
"int": 7,
"string": "a_str"
},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
],
[
{
Expand All @@ -128,10 +117,7 @@
{},
{
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
"error.class": "RuntimeException",
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
"error.class": "RuntimeException"
}
],
[
Expand All @@ -151,10 +137,7 @@
{},
{
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
"error.class": "RuntimeException",
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
"error.class": "RuntimeException"
}
],
[
Expand All @@ -172,11 +155,7 @@
"parentId": "??"
},
{},
{
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
}
{}
],
[
{
Expand All @@ -195,10 +174,7 @@
{},
{
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
"error.class": "RuntimeException",
"code.lineno": "??",
"code.filepath": "__FILE__",
"code.function": "??"
"error.class": "RuntimeException"
}
]
]
Expand Down
13 changes: 1 addition & 12 deletions tests/integration/api/add_custom_parameter/test_span_event.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@
Test that custom transaction attributes are added to span events.
*/

/*SKIPIF
<?php
if (version_compare(PHP_VERSION, "7.0", "<")) {
die("skip: CLM for PHP 5 not supported\n");
}
*/

/*INI
newrelic.distributed_tracing_enabled=1
newrelic.transaction_tracer.threshold = 0
Expand Down Expand Up @@ -107,11 +100,7 @@
"int": 7,
"string": "str"
},
{
"code.lineno": 124,
"code.filepath": "__FILE__",
"code.function": "a"
}
{}
]
]
]
Expand Down
Loading