-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pkg/pdatatest] replace compare of span event and link from reflect.D…
…eepEqual to compare functions (#18088) Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
- Loading branch information
1 parent
c632573
commit 2106051
Showing
21 changed files
with
1,046 additions
and
9 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-attributes-mismatch/actual.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"resourceSpans": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "host.name", | ||
"value": { | ||
"stringValue": "node1" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeSpans": [ | ||
{ | ||
"spans": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "key1", | ||
"value": { | ||
"stringValue": "value1" | ||
} | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"name": "event1", | ||
"attributes": [ | ||
{ | ||
"key": "eventkey1", | ||
"value": { | ||
"stringValue": "value2" | ||
} | ||
} | ||
], | ||
"droppedAttributesCount": 0 | ||
} | ||
], | ||
"traceId": "8c8b1765a7b0acf0b66aa4623fcb7bd5" | ||
} | ||
], | ||
"scope": { | ||
"name": "collector", | ||
"version": "v0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
51 changes: 51 additions & 0 deletions
51
pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-attributes-mismatch/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"resourceSpans": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "host.name", | ||
"value": { | ||
"stringValue": "node1" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeSpans": [ | ||
{ | ||
"spans": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "key1", | ||
"value": { | ||
"stringValue": "value1" | ||
} | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"name": "event1", | ||
"attributes": [ | ||
{ | ||
"key": "eventkey1", | ||
"value": { | ||
"stringValue": "value1" | ||
} | ||
} | ||
], | ||
"droppedAttributesCount": 0 | ||
} | ||
], | ||
"traceId": "8c8b1765a7b0acf0b66aa4623fcb7bd5" | ||
} | ||
], | ||
"scope": { | ||
"name": "collector", | ||
"version": "v0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
44 changes: 44 additions & 0 deletions
44
...test/ptracetest/testdata/scopespans-spans-events-dropattributescount-mismatch/actual.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"resourceSpans": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "host.name", | ||
"value": { | ||
"stringValue": "node1" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeSpans": [ | ||
{ | ||
"spans": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "key1", | ||
"value": { | ||
"stringValue": "value1" | ||
} | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"name": "event1", | ||
"attributes": null, | ||
"droppedAttributesCount": 0 | ||
} | ||
], | ||
"traceId": "8c8b1765a7b0acf0b66aa4623fcb7bd5" | ||
} | ||
], | ||
"scope": { | ||
"name": "collector", | ||
"version": "v0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
44 changes: 44 additions & 0 deletions
44
...st/ptracetest/testdata/scopespans-spans-events-dropattributescount-mismatch/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"resourceSpans": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "host.name", | ||
"value": { | ||
"stringValue": "node1" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeSpans": [ | ||
{ | ||
"spans": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "key1", | ||
"value": { | ||
"stringValue": "value1" | ||
} | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"name": "event1", | ||
"attributes": null, | ||
"droppedAttributesCount": 1 | ||
} | ||
], | ||
"traceId": "8c8b1765a7b0acf0b66aa4623fcb7bd5" | ||
} | ||
], | ||
"scope": { | ||
"name": "collector", | ||
"version": "v0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/actual.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"resourceSpans": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "host.name", | ||
"value": { | ||
"stringValue": "node1" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeSpans": [ | ||
{ | ||
"spans": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "key1", | ||
"value": { | ||
"stringValue": "value1" | ||
} | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"name": "event1", | ||
"attributes": null, | ||
"droppedAttributesCount": 0 | ||
} | ||
], | ||
"traceId": "8c8b1765a7b0acf0b66aa4623fcb7bd5" | ||
} | ||
], | ||
"scope": { | ||
"name": "collector", | ||
"version": "v0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
44 changes: 44 additions & 0 deletions
44
pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-name-mismatch/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"resourceSpans": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "host.name", | ||
"value": { | ||
"stringValue": "node1" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeSpans": [ | ||
{ | ||
"spans": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "key1", | ||
"value": { | ||
"stringValue": "value1" | ||
} | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"name": "event2", | ||
"attributes": null, | ||
"droppedAttributesCount": 0 | ||
} | ||
], | ||
"traceId": "8c8b1765a7b0acf0b66aa4623fcb7bd5" | ||
} | ||
], | ||
"scope": { | ||
"name": "collector", | ||
"version": "v0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
45 changes: 45 additions & 0 deletions
45
pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-timestamp-mismatch/actual.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"resourceSpans": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "host.name", | ||
"value": { | ||
"stringValue": "node1" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeSpans": [ | ||
{ | ||
"spans": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "key1", | ||
"value": { | ||
"stringValue": "value1" | ||
} | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"name": "event1", | ||
"attributes": null, | ||
"droppedAttributesCount": 0, | ||
"timeUnixNano": "11651379494838206464" | ||
} | ||
], | ||
"traceId": "8c8b1765a7b0acf0b66aa4623fcb7bd5" | ||
} | ||
], | ||
"scope": { | ||
"name": "collector", | ||
"version": "v0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
45 changes: 45 additions & 0 deletions
45
pkg/pdatatest/ptracetest/testdata/scopespans-spans-events-timestamp-mismatch/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"resourceSpans": [ | ||
{ | ||
"resource": { | ||
"attributes": [ | ||
{ | ||
"key": "host.name", | ||
"value": { | ||
"stringValue": "node1" | ||
} | ||
} | ||
] | ||
}, | ||
"scopeSpans": [ | ||
{ | ||
"spans": [ | ||
{ | ||
"attributes": [ | ||
{ | ||
"key": "key1", | ||
"value": { | ||
"stringValue": "value1" | ||
} | ||
} | ||
], | ||
"events": [ | ||
{ | ||
"name": "event1", | ||
"attributes": null, | ||
"droppedAttributesCount": 0, | ||
"timeUnixNano": "11651379494838206400" | ||
} | ||
], | ||
"traceId": "8c8b1765a7b0acf0b66aa4623fcb7bd5" | ||
} | ||
], | ||
"scope": { | ||
"name": "collector", | ||
"version": "v0.1.0" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.