-
Notifications
You must be signed in to change notification settings - Fork 527
Expand file tree
/
Copy pathEndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml
More file actions
158 lines (154 loc) · 8.31 KB
/
EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml
File metadata and controls
158 lines (154 loc) · 8.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<Results>
<Result>
<Input>
<Description>Batch Operation</Description>
<Setup><![CDATA[
string pkValue = "DiagnosticTestPk";
TransactionalBatch batch = container.CreateTransactionalBatch(new PartitionKey(pkValue));
BatchCore batchCore = (BatchCore)batch;
List<PatchOperation> patch = new List<PatchOperation>()
{
PatchOperation.Remove("/cost")
};
List<ToDoActivity> createItems = new List<ToDoActivity>();
for (int i = 0; i < 50; i++)
{
ToDoActivity item = ToDoActivity.CreateRandomToDoActivity(pk: pkValue);
createItems.Add(item);
batch.CreateItem<ToDoActivity>(item);
}
for (int i = 0; i < 20; i++)
{
batch.ReadItem(createItems[i].id);
batchCore.PatchItem(createItems[i].id, patch);
}
TransactionalBatchRequestOptions requestOptions = null;
TransactionalBatchResponse response = await batch.ExecuteAsync(requestOptions);
Assert.IsNotNull(response);
ITrace trace = ((CosmosTraceDiagnostics)response.Diagnostics).Value;
]]></Setup>
</Input>
<Output>
<Text><![CDATA[.
└── ExecuteAsync(00000000-0000-0000-0000-000000000000) Transport-Component 12:00:00:000 0.00 milliseconds
│ (
│ [Client Configuration]
│ Redacted To Not Change The Baselines From Run To Run
│ )
└── Execute Next Batch(00000000-0000-0000-0000-000000000000) Batch-Component 12:00:00:000 0.00 milliseconds
├── Create Batch Request(00000000-0000-0000-0000-000000000000) Batch-Component 12:00:00:000 0.00 milliseconds
└── Execute Batch Request(00000000-0000-0000-0000-000000000000) Batch-Component 12:00:00:000 0.00 milliseconds
├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 12:00:00:000 0.00 milliseconds
│ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 12:00:00:000 0.00 milliseconds
│ │ (
│ │ [System Info]
│ │ Redacted To Not Change The Baselines From Run To Run
│ │ )
│ └── Microsoft.Azure.Cosmos.Handlers.RetryHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 12:00:00:000 0.00 milliseconds
│ └── Microsoft.Azure.Cosmos.Handlers.RouterHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 12:00:00:000 0.00 milliseconds
│ └── Microsoft.Azure.Cosmos.Handlers.TransportHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 12:00:00:000 0.00 milliseconds
│ └── Microsoft.Azure.Documents.ServerStoreModel Transport Request(00000000-0000-0000-0000-000000000000) Transport-Component 12:00:00:000 0.00 milliseconds
│ (
│ [Client Side Request Stats]
│ Redacted To Not Change The Baselines From Run To Run
│ )
└── Create Trace(00000000-0000-0000-0000-000000000000) Batch-Component 12:00:00:000 0.00 milliseconds
]]></Text>
<Json><![CDATA[{
"Summary": {},
"name": "ExecuteAsync",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0,
"data": {
"Client Configuration": "Redacted To Not Change The Baselines From Run To Run"
},
"children": [
{
"name": "Execute Next Batch",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0,
"children": [
{
"name": "Create Batch Request",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0
},
{
"name": "Execute Batch Request",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0,
"children": [
{
"name": "Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0,
"children": [
{
"name": "Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0,
"data": {
"System Info": "Redacted To Not Change The Baselines From Run To Run"
},
"children": [
{
"name": "Microsoft.Azure.Cosmos.Handlers.RetryHandler",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0,
"children": [
{
"name": "Microsoft.Azure.Cosmos.Handlers.RouterHandler",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0,
"children": [
{
"name": "Microsoft.Azure.Cosmos.Handlers.TransportHandler",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0,
"children": [
{
"name": "Microsoft.Azure.Documents.ServerStoreModel Transport Request",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0,
"data": {
"Client Side Request Stats": "Redacted To Not Change The Baselines From Run To Run"
}
}
]
}
]
}
]
}
]
}
]
},
{
"name": "Create Trace",
"id": "00000000-0000-0000-0000-000000000000",
"start time": "12:00:00:000",
"duration in milliseconds": 0
}
]
}
]
}
]
}]]></Json>
<OTelActivities><ACTIVITY><OPERATION>Cosmos.ExecuteAsync</OPERATION><ATTRIBUTE-KEY>kind</ATTRIBUTE-KEY><ATTRIBUTE-KEY>az.namespace</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.system</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.hashed_machine_id</ATTRIBUTE-KEY><ATTRIBUTE-KEY>net.peer.name</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.client_id</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.user_agent</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.connection_mode</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.operation</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.name</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.container</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.request_content_length_bytes</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.response_content_length_bytes</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.status_code</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.sub_status_code</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.request_charge</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.item_count</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.operation_type</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.regions_contacted</ATTRIBUTE-KEY></ACTIVITY>
<EVENT>Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test.</EVENT>
</OTelActivities>
</Output>
</Result>
</Results>