Skip to content

Commit b6f1b20

Browse files
feat(agent): clm off by default (#1049)
1 parent f58a459 commit b6f1b20

File tree

178 files changed

+341
-7567
lines changed

Some content is hidden

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

178 files changed

+341
-7567
lines changed

agent/php_nrini.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3046,7 +3046,7 @@ STD_PHP_INI_ENTRY_EX(
30463046
* Code Level Metrics
30473047
*/
30483048
STD_PHP_INI_ENTRY_EX("newrelic.code_level_metrics.enabled",
3049-
"1",
3049+
"0",
30503050
NR_PHP_REQUEST,
30513051
nr_boolean_mh,
30523052
code_level_metrics_enabled,

agent/scripts/newrelic.ini.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1334,7 +1334,7 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
13341334
; Setting: newrelic.code_level_metrics.enabled
13351335
; Type : boolean
13361336
; Scope : per-directory
1337-
; Default: true
1337+
; Default: false
13381338
; Info : Toggles whether the agent provides function name, function
13391339
; filepath, function namespace, and function lineno as
13401340
; attributes on reported spans
@@ -1348,7 +1348,7 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
13481348
; entirely
13491349
; c) lower the value for newrelic.span_events.max_samples_stored
13501350
;
1351-
;newrelic.code_level_metrics.enabled = true
1351+
;newrelic.code_level_metrics.enabled = false
13521352

13531353
; Setting: newrelic.vulnerability_management.package_detection.enabled
13541354
; Type : boolean

tests/integration/api/add_custom_parameter/test_add_custom_parameter_nested_caught_exception.php

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
Tests newrelic_add_custom_parameter() on a nested path that includes a caught exception.
88
*/
99

10-
/*SKIPIF
11-
<?php
12-
if (version_compare(PHP_VERSION, "7.0", "<")) {
13-
die("skip: CLM for PHP 5 not supported\n");
14-
}
15-
*/
16-
1710
/*INI
1811
newrelic.distributed_tracing_enabled=1
1912
newrelic.transaction_tracer.threshold = 0
@@ -71,11 +64,7 @@
7164
"int": 7,
7265
"string": "a_str"
7366
},
74-
{
75-
"code.lineno": "??",
76-
"code.filepath": "__FILE__",
77-
"code.function": "??"
78-
}
67+
{}
7968
],
8069
[
8170
{
@@ -97,11 +86,7 @@
9786
"int": 7,
9887
"string": "b_str"
9988
},
100-
{
101-
"code.lineno": "??",
102-
"code.filepath": "__FILE__",
103-
"code.function": "??"
104-
}
89+
{}
10590
],
10691
[
10792
{
@@ -120,10 +105,7 @@
120105
{},
121106
{
122107
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
123-
"error.class": "RuntimeException",
124-
"code.lineno": "??",
125-
"code.filepath": "__FILE__",
126-
"code.function": "??"
108+
"error.class": "RuntimeException"
127109
}
128110
],
129111
[
@@ -141,11 +123,7 @@
141123
"parentId": "??"
142124
},
143125
{},
144-
{
145-
"code.lineno": "??",
146-
"code.filepath": "__FILE__",
147-
"code.function": "??"
148-
}
126+
{}
149127
],
150128
[
151129
{
@@ -164,10 +142,7 @@
164142
{},
165143
{
166144
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
167-
"error.class": "RuntimeException",
168-
"code.lineno": "??",
169-
"code.filepath": "__FILE__",
170-
"code.function": "??"
145+
"error.class": "RuntimeException"
171146
}
172147
]
173148
]

tests/integration/api/add_custom_parameter/test_add_custom_parameter_nested_happy.php

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
Tests newrelic_add_span_parameter() on a nested, happy path.
88
*/
99

10-
/*SKIPIF
11-
<?php
12-
if (version_compare(PHP_VERSION, "7.0", "<")) {
13-
die("skip: CLM for PHP 5 not supported\n");
14-
}
15-
*/
16-
1710
/*INI
1811
newrelic.distributed_tracing_enabled=1
1912
newrelic.transaction_tracer.threshold = 0
@@ -71,11 +64,7 @@
7164
"int": 7,
7265
"string": "a_str"
7366
},
74-
{
75-
"code.lineno": "??",
76-
"code.filepath": "__FILE__",
77-
"code.function": "??"
78-
}
67+
{}
7968
],
8069
[
8170
{
@@ -97,11 +86,7 @@
9786
"int": 7,
9887
"string": "b_str"
9988
},
100-
{
101-
"code.lineno": "??",
102-
"code.filepath": "__FILE__",
103-
"code.function": "??"
104-
}
89+
{}
10590
],
10691
[
10792
{
@@ -118,11 +103,7 @@
118103
"parentId": "??"
119104
},
120105
{},
121-
{
122-
"code.lineno": "??",
123-
"code.filepath": "__FILE__",
124-
"code.function": "??"
125-
}
106+
{}
126107
],
127108
[
128109
{
@@ -139,11 +120,7 @@
139120
"parentId": "??"
140121
},
141122
{},
142-
{
143-
"code.lineno": "??",
144-
"code.filepath": "__FILE__",
145-
"code.function": "??"
146-
}
123+
{}
147124
],
148125
[
149126
{
@@ -160,11 +137,7 @@
160137
"parentId": "??"
161138
},
162139
{},
163-
{
164-
"code.lineno": "??",
165-
"code.filepath": "__FILE__",
166-
"code.function": "??"
167-
}
140+
{}
168141
]
169142
]
170143
]

tests/integration/api/add_custom_parameter/test_add_custom_parameter_nested_uncaught_exception.php

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
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.
88
*/
99

10-
/*SKIPIF
11-
<?php
12-
if (version_compare(PHP_VERSION, "7.0", "<")) {
13-
die("skip: CLM for PHP 5 not supported\n");
14-
}
15-
*/
16-
1710
/*INI
1811
newrelic.distributed_tracing_enabled=1
1912
newrelic.transaction_tracer.threshold = 0
@@ -105,11 +98,7 @@
10598
"int": 7,
10699
"string": "a_str"
107100
},
108-
{
109-
"code.lineno": "??",
110-
"code.filepath": "__FILE__",
111-
"code.function": "??"
112-
}
101+
{}
113102
],
114103
[
115104
{
@@ -128,10 +117,7 @@
128117
{},
129118
{
130119
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
131-
"error.class": "RuntimeException",
132-
"code.lineno": "??",
133-
"code.filepath": "__FILE__",
134-
"code.function": "??"
120+
"error.class": "RuntimeException"
135121
}
136122
],
137123
[
@@ -151,10 +137,7 @@
151137
{},
152138
{
153139
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
154-
"error.class": "RuntimeException",
155-
"code.lineno": "??",
156-
"code.filepath": "__FILE__",
157-
"code.function": "??"
140+
"error.class": "RuntimeException"
158141
}
159142
],
160143
[
@@ -172,11 +155,7 @@
172155
"parentId": "??"
173156
},
174157
{},
175-
{
176-
"code.lineno": "??",
177-
"code.filepath": "__FILE__",
178-
"code.function": "??"
179-
}
158+
{}
180159
],
181160
[
182161
{
@@ -195,10 +174,7 @@
195174
{},
196175
{
197176
"error.message": "Uncaught exception 'RuntimeException' with message 'Division by zero' in __FILE__:??",
198-
"error.class": "RuntimeException",
199-
"code.lineno": "??",
200-
"code.filepath": "__FILE__",
201-
"code.function": "??"
177+
"error.class": "RuntimeException"
202178
}
203179
]
204180
]

tests/integration/api/add_custom_parameter/test_span_event.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
Test that custom transaction attributes are added to span events.
99
*/
1010

11-
/*SKIPIF
12-
<?php
13-
if (version_compare(PHP_VERSION, "7.0", "<")) {
14-
die("skip: CLM for PHP 5 not supported\n");
15-
}
16-
*/
17-
1811
/*INI
1912
newrelic.distributed_tracing_enabled=1
2013
newrelic.transaction_tracer.threshold = 0
@@ -107,11 +100,7 @@
107100
"int": 7,
108101
"string": "str"
109102
},
110-
{
111-
"code.lineno": 124,
112-
"code.filepath": "__FILE__",
113-
"code.function": "a"
114-
}
103+
{}
115104
]
116105
]
117106
]

0 commit comments

Comments
 (0)