Skip to content

Commit 08e4570

Browse files
authored
test: Updated core tracing cross agent tests (#3860)
1 parent e3d84c2 commit 08e4570

File tree

2 files changed

+16
-37
lines changed

2 files changed

+16
-37
lines changed

test/lib/cross_agent_tests/distributed_tracing/partial_granularity.json

Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[
22
{
33
"test_name": "partial_granularity_reduced",
4-
"comment": [ "Use transaction from tracer_info.json, with partial granularity set to 'reduced'",
4+
"comment": [ "Use transaction from tracer_info_standard.json, with partial granularity set to 'reduced'",
55
"We should drop the in-process span and keep the rest.",
66
"The External span External/B2 under the in-process span should be re-parented to the root span."],
77
"tracer_info":"tracer_info_standard.json",
@@ -23,7 +23,7 @@
2323
"agent_attrs": {
2424
"exact": {
2525
"http.url": "serviceB",
26-
"non_essential_attr": "somevalue",
26+
"subcomponent": "somevalue",
2727
"error.class": "errorclass1",
2828
"error.message": "errormessage1",
2929
"error.expected": true
@@ -66,20 +66,14 @@
6666
"messaging.system": "MQS",
6767
"peer.hostname": "peer",
6868
"server.address": "server",
69-
"server.port": 80,
70-
"span.kind": "SPAN"
69+
"server.port": 80
7170
}
7271
}
7372
}
7473
},
7574
{
7675
"Llm/SOMETHING/function": {
77-
"parent": "root",
78-
"agent_attrs": {
79-
"exact": {
80-
"http.url": "myllm"
81-
}
82-
}
76+
"parent": "root"
8377
}
8478
},
8579
{
@@ -97,7 +91,7 @@
9791
},
9892
{
9993
"test_name": "partial_granularity_essential",
100-
"comment": [ "Use transaction from tracer_info.json, with partial granularity set to 'essential'",
94+
"comment": [ "Use transaction from tracer_info_standard.json, with partial granularity set to 'essential'",
10195
"We should drop the in-process span and keep the rest.",
10296
"The External span External/B2 under the in-process span should be re-parented to the root span.",
10397
"The non-essential attribute on External/B1 should be dropped"],
@@ -124,7 +118,7 @@
124118
"error.message": "errormessage1",
125119
"error.expected": true
126120
},
127-
"unexpected": ["non_essential_attr"]
121+
"unexpected": ["subcomponent"]
128122
},
129123
"user_attrs": {
130124
"unexpected": ["my_user_attr"]
@@ -161,20 +155,14 @@
161155
"messaging.system": "MQS",
162156
"peer.hostname": "peer",
163157
"server.address": "server",
164-
"server.port": 80,
165-
"span.kind": "SPAN"
158+
"server.port": 80
166159
}
167160
}
168161
}
169162
},
170163
{
171164
"Llm/SOMETHING/function": {
172-
"parent": "root",
173-
"agent_attrs": {
174-
"exact": {
175-
"http.url": "myllm"
176-
}
177-
}
165+
"parent": "root"
178166
}
179167
},
180168
{
@@ -192,7 +180,7 @@
192180
},
193181
{
194182
"test_name": "partial_granularity_compact",
195-
"comment": [ "Use transaction from tracer_info.json, with partial granularity set to 'compact'",
183+
"comment": [ "Use transaction from tracer_info_standard.json, with partial granularity set to 'compact'",
196184
"We should drop the in-process span and keep the rest.",
197185
"The External span External/B2 under the in-process span should be merged into External/B1.",
198186
"Their durations should be merged and the merged span should have 2 new attributes: nr.ids and nr.durations.",
@@ -231,7 +219,7 @@
231219
"error.expected"
232220
],
233221
"unexpected": [
234-
"non_essential_attr"
222+
"subcomponent"
235223
]
236224
},
237225
"user_attrs": {
@@ -256,20 +244,14 @@
256244
"messaging.system": "MQS",
257245
"peer.hostname": "peer",
258246
"server.address": "server",
259-
"server.port": 80,
260-
"span.kind": "SPAN"
247+
"server.port": 80
261248
}
262249
}
263250
}
264251
},
265252
{
266253
"Llm/SOMETHING/function": {
267-
"parent": "root",
268-
"agent_attrs": {
269-
"exact": {
270-
"http.url": "myllm"
271-
}
272-
}
254+
"parent": "root"
273255
}
274256
},
275257
{
@@ -287,7 +269,7 @@
287269
},
288270
{
289271
"test_name": "partial_granularity_compact_too_many_nrids",
290-
"comment": [ "Use transaction from tracer_info.json, with partial granularity set to 'compact'",
272+
"comment": [ "Use transaction from tracer_info_compact_too_many.json, with partial granularity set to 'compact'",
291273
"We should group all the child spans together which should be too many to add all to nr.ids",
292274
"This should produce a metric called Supportability/Java/PartialGranularity/NrIds/Dropped with the right value"
293275
],

test/lib/cross_agent_tests/distributed_tracing/tracer_info_standard.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"duration_millis": 100,
1717
"agent_attrs": {
1818
"http.url": "serviceB",
19-
"non_essential_attr": "somevalue",
19+
"subcomponent": "somevalue",
2020
"error.class": "errorclass1",
2121
"error.message": "errormessage1",
2222
"error.expected": true
@@ -60,8 +60,7 @@
6060
"messaging.system": "MQS",
6161
"peer.hostname": "peer",
6262
"server.address": "server",
63-
"server.port": 80,
64-
"span.kind": "SPAN"
63+
"server.port": 80
6564
}
6665
},
6766
{
@@ -73,9 +72,7 @@
7372
"name": "Llm/SOMETHING/function",
7473
"timestamp": 1766435411000,
7574
"duration_millis": 200,
76-
"agent_attrs": {
77-
"http.url": "myllm"
78-
},
75+
"agent_attrs": {},
7976
"children": [
8077
{
8178
"name": "External/D",

0 commit comments

Comments
 (0)