Skip to content

Commit 1d17141

Browse files
Merge pull request #612 from newrelic/dev
Release 10.6
2 parents f21ec1e + 10bbaa2 commit 1d17141

File tree

96 files changed

+7853
-78
lines changed

Some content is hidden

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

96 files changed

+7853
-78
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.5.0
1+
10.6.0

agent/php_nrini.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2922,10 +2922,10 @@ STD_PHP_INI_ENTRY_EX(
29222922
0)
29232923

29242924
/*
2925-
* Code Level Metrics, initially off by default
2925+
* Code Level Metrics
29262926
*/
29272927
STD_PHP_INI_ENTRY_EX("newrelic.code_level_metrics.enabled",
2928-
"0",
2928+
"1",
29292929
NR_PHP_REQUEST,
29302930
nr_boolean_mh,
29312931
code_level_metrics_enabled,

agent/scripts/newrelic.ini.template

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,15 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
929929
; per transaction. A value of 0 will use the agent default. The max
930930
; setting is 10000.
931931
;
932+
; !IMPORTANT: If you have Code Level Metrics enabled & long absolute
933+
; pathnames to your PHP files/functions, you may exceed the max message
934+
; size limit set by the Daemon if your max_samples_stored setting is
935+
; too high. To fix this, you can either:
936+
; a) enable infinite tracing (newrelic.infinite_tracing.trace_observer.host)
937+
; b) set newrelic.code_level_metrics.enabled=false, disabling it
938+
; entirely
939+
; c) lower the value for newrelic.span_events.max_samples_stored
940+
;
932941
;newrelic.span_events.max_samples_stored = 0
933942

934943

@@ -1221,10 +1230,19 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
12211230
; Setting: newrelic.code_level_metrics.enabled
12221231
; Type : boolean
12231232
; Scope : per-directory
1224-
; Default: false
1233+
; Default: true
12251234
; Info : Toggles whether the agent provides function name, function
12261235
; filepath, function namespace, and function lineno as
12271236
; attributes on reported spans
12281237
;
1229-
;newrelic.code_level_metrics.enabled = false
1238+
; !IMPORTANT: If you have Code Level Metrics enabled & long absolute
1239+
; pathnames to your PHP files/functions, you may exceed the max message
1240+
; size limit set by the Daemon if your max_samples_stored setting is
1241+
; too high. To fix this, you can either:
1242+
; a) enable infinite tracing (newrelic.infinite_tracing.trace_observer.host)
1243+
; b) set newrelic.code_level_metrics.enabled=false, disabling it
1244+
; entirely
1245+
; c) lower the value for newrelic.span_events.max_samples_stored
1246+
;
1247+
;newrelic.code_level_metrics.enabled = true
12301248

axiom/nr_version.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
/*
2424
* Current version naming scheme is flowers
2525
*
26-
* vanilla 07Dec2020 (9.15)
2726
* watermelon 25Jan2021 (9.16)
2827
* xigua 21Apr2021 (9.17)
2928
* yam 23Aug2021 (9.18)
@@ -35,8 +34,9 @@
3534
* echinacea 03Oct2022 (10.2)
3635
* freesia 03Nov2022 (10.3)
3736
* goldenrod 12Dec2022 (10.4)
37+
* hydrangea 18Jan2023 (10.5)
3838
*/
39-
#define NR_CODENAME "hydrangea"
39+
#define NR_CODENAME "impatiens"
4040

4141
const char* nr_version(void) {
4242
return NR_STR2(NR_VERSION);

tests/integration/api/add_custom_parameter/test_span_event.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
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+
1118
/*INI
1219
newrelic.distributed_tracing_enabled=1
1320
newrelic.transaction_tracer.threshold = 0
@@ -100,7 +107,11 @@
100107
"int": 7,
101108
"string": "str"
102109
},
103-
{}
110+
{
111+
"code.lineno": 124,
112+
"code.filepath": "__FILE__",
113+
"code.function": "a"
114+
}
104115
]
105116
]
106117
]
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
<?php
2+
/*
3+
* Copyright 2020 New Relic Corporation. All rights reserved.
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/*DESCRIPTION
8+
Test that custom transaction attributes are added to span events.
9+
*/
10+
11+
/*INI
12+
newrelic.distributed_tracing_enabled=1
13+
newrelic.transaction_tracer.threshold = 0
14+
newrelic.transaction_tracer.detail = false
15+
newrelic.span_events_enabled=1
16+
newrelic.cross_application_tracer.enabled = false
17+
newrelic.code_level_metrics.enabled=false
18+
*/
19+
20+
/*EXPECT
21+
ok - string attribute added
22+
ok - int attribute added
23+
ok - bool attribute added
24+
ok - double attribute added
25+
*/
26+
27+
/*EXPECT_ANALYTICS_EVENTS
28+
[
29+
"?? agent run id",
30+
"?? sampling information",
31+
[
32+
[
33+
{
34+
"type": "Transaction",
35+
"name": "OtherTransaction/php__FILE__",
36+
"timestamp": "??",
37+
"duration": "??",
38+
"totalTime": "??",
39+
"guid": "??",
40+
"sampled": true,
41+
"priority": "??",
42+
"traceId": "??",
43+
"error": false
44+
},
45+
{
46+
"double": 1.50000,
47+
"bool": false,
48+
"int": 7,
49+
"string": "str"
50+
},
51+
{
52+
}
53+
]
54+
]
55+
]
56+
*/
57+
58+
/*EXPECT_SPAN_EVENTS
59+
[
60+
"?? agent run id",
61+
{
62+
"reservoir_size": 10000,
63+
"events_seen": 2
64+
},
65+
[
66+
[
67+
{
68+
"traceId": "??",
69+
"duration": "??",
70+
"transactionId": "??",
71+
"name": "OtherTransaction\/php__FILE__",
72+
"guid": "??",
73+
"type": "Span",
74+
"category": "generic",
75+
"priority": "??",
76+
"sampled": true,
77+
"nr.entryPoint": true,
78+
"timestamp": "??",
79+
"transaction.name": "OtherTransaction/php__FILE__"
80+
},
81+
{},
82+
{}
83+
],
84+
[
85+
{
86+
"type": "Span",
87+
"traceId": "??",
88+
"transactionId": "??",
89+
"sampled": true,
90+
"priority": "??",
91+
"name": "Custom\/a",
92+
"guid": "??",
93+
"timestamp": "??",
94+
"duration": "??",
95+
"category": "generic",
96+
"parentId": "??"
97+
},
98+
{
99+
"double": 1.50000,
100+
"bool": false,
101+
"int": 7,
102+
"string": "str"
103+
},
104+
{}
105+
]
106+
]
107+
]
108+
*/
109+
110+
require_once(realpath(dirname(__FILE__)) . '/../../../include/tap.php');
111+
112+
newrelic_add_custom_tracer("a");
113+
114+
function a() {
115+
tap_assert(newrelic_add_custom_parameter("string", "str"), "string attribute added");
116+
tap_assert(newrelic_add_custom_parameter("int", 7), "int attribute added");
117+
tap_assert(newrelic_add_custom_parameter("bool", false), "bool attribute added");
118+
tap_assert(newrelic_add_custom_parameter("double", 1.5), "double attribute added");
119+
}
120+
121+
a();

tests/integration/api/add_custom_span_parameter/test_span_event_parameter_duplicate.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
from the span MUST be kept.
1111
*/
1212

13+
/*SKIPIF
14+
<?php
15+
if (version_compare(PHP_VERSION, "7.0", "<")) {
16+
die("skip: CLM for PHP 5 not supported\n");
17+
}
18+
*/
19+
1320
/*INI
1421
newrelic.distributed_tracing_enabled=1
1522
newrelic.transaction_tracer.threshold = 0
@@ -106,7 +113,11 @@
106113
"int": 1,
107114
"string": "span str"
108115
},
109-
{}
116+
{
117+
"code.lineno": 155,
118+
"code.filepath": "__FILE__",
119+
"code.function": "a"
120+
}
110121
]
111122
]
112123
]

0 commit comments

Comments
 (0)