@@ -13,7 +13,7 @@ const client = new tracing.Client({
13
13
endpoint,
14
14
exporter : tracing . EXPORTER_OTLP ,
15
15
tls : {
16
- insecure : true ,
16
+ insecure : true ,
17
17
} ,
18
18
headers : {
19
19
"X-Scope-Orgid" : orgid
@@ -24,8 +24,7 @@ const traceDefaults = {
24
24
attributeSemantics : tracing . SEMANTICS_HTTP ,
25
25
attributes : { "one" : "three" } ,
26
26
randomAttributes : { count : 2 , cardinality : 5 } ,
27
- randomEvents : { generateExceptionOnError : true , rate : 1.0 , randomAttributes : { count : 2 , cardinality : 3 } } ,
28
- randomLinks : { rate : 1.0 , randomAttributes : { count : 2 , cardinality : 3 } } ,
27
+ randomEvents : { count : 0.1 , exceptionCount : 0.2 , randomAttributes : { count : 6 , cardinality : 20 } } ,
29
28
}
30
29
31
30
const traceTemplates = [
@@ -36,7 +35,11 @@ const traceTemplates = [
36
35
{ service : "shop-backend" , name : "authenticate" , duration : { min : 50 , max : 100 } } ,
37
36
{ service : "auth-service" , name : "authenticate" } ,
38
37
{ service : "shop-backend" , name : "fetch-articles" , parentIdx : 0 } ,
39
- { service : "article-service" , name : "list-articles" } ,
38
+ {
39
+ service : "article-service" ,
40
+ name : "list-articles" ,
41
+ links : [ { attributes : { "link-type" : "parent-child" } , randomAttributes : { count : 2 , cardinality : 5 } } ]
42
+ } ,
40
43
{ service : "article-service" , name : "select-articles" , attributeSemantics : tracing . SEMANTICS_DB } ,
41
44
{ service : "postgres" , name : "query-articles" , attributeSemantics : tracing . SEMANTICS_DB , randomAttributes : { count : 5 } } ,
42
45
]
@@ -45,6 +48,7 @@ const traceTemplates = [
45
48
defaults : {
46
49
attributes : { "numbers" : [ "one" , "two" , "three" ] } ,
47
50
attributeSemantics : tracing . SEMANTICS_HTTP ,
51
+ randomEvents : { count : 2 , randomAttributes : { count : 3 , cardinality : 10 } } ,
48
52
} ,
49
53
spans : [
50
54
{ service : "shop-backend" , name : "article-to-cart" , duration : { min : 400 , max : 1200 } } ,
@@ -64,17 +68,30 @@ const traceTemplates = [
64
68
spans : [
65
69
{ service : "shop-backend" , attributes : { "http.status_code" : 403 } } ,
66
70
{ service : "shop-backend" , name : "authenticate" , attributes : { "http.request.header.accept" : [ "application/json" ] } } ,
67
- { service : "auth-service" , name : "authenticate" , attributes : { "http.status_code" : 403 } } ,
71
+ {
72
+ service : "auth-service" ,
73
+ name : "authenticate" ,
74
+ attributes : { "http.status_code" : 403 } ,
75
+ randomEvents : { count : 0.5 , exceptionCount : 2 , randomAttributes : { count : 5 , cardinality : 5 } }
76
+ } ,
68
77
]
69
78
} ,
70
79
{
71
80
defaults : traceDefaults ,
72
81
spans : [
73
- { service : "shop-backend" , attributes : { "http.status_code" : 403 } } ,
82
+ { service : "shop-backend" } ,
74
83
{ service : "shop-backend" , name : "authenticate" , attributes : { "http.request.header.accept" : [ "application/json" ] } } ,
75
- { service : "auth-service" , name : "authenticate" , attributes : { "http.status_code" : 403 } } ,
76
- { service : "cart-service" , name : "checkout" , randomEvents : { exceptionRate : 1 , rate : 2 , randomAttributes : { count : 5 , cardinality : 2 } } } ,
77
- { service : "billing-service" , name : "payment" , randomLinks : { rate : 2 , randomAttributes : { count : 3 , cardinality : 2 } } }
84
+ { service : "auth-service" , name : "authenticate" } ,
85
+ {
86
+ service : "cart-service" ,
87
+ name : "checkout" ,
88
+ randomEvents : { count : 0.5 , exceptionCount : 2 , exceptionOnError : true , randomAttributes : { count : 5 , cardinality : 5 } }
89
+ } ,
90
+ {
91
+ service : "billing-service" ,
92
+ name : "payment" ,
93
+ randomLinks : { count : 0.5 , randomAttributes : { count : 3 , cardinality : 10 } } ,
94
+ randomEvents : { exceptionOnError : true , randomAttributes : { count : 4 } } }
78
95
]
79
96
} ,
80
97
]
@@ -89,4 +106,4 @@ export default function () {
89
106
90
107
export function teardown ( ) {
91
108
client . shutdown ( ) ;
92
- }
109
+ }
0 commit comments