Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iker-barriocanal committed Jun 9, 2023
1 parent 70d4748 commit 5a7c7cb
Show file tree
Hide file tree
Showing 2 changed files with 312 additions and 0 deletions.
162 changes: 162 additions & 0 deletions relay-server/src/metrics_extraction/transactions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,39 @@ mod tests {
"status_code": "200"
}
},
{
"description": "POST http://sth.subdomain.domain.tld:targetport/api/hi",
"op": "http.client",
"tags": {
"http.status_code": "200"
},
"parent_span_id": "8f5a2b8768cafb4e",
"span_id": "bd2eb23da2beb459",
"start_timestamp": 1597976300.0000000,
"timestamp": 1597976302.0000000,
"trace_id": "ff62a8b040f340bda5d830223def1d81",
"status": "ok",
"data": {
"http.method": "POST"
}
},
{
"description": "POST http://sth.subdomain.domain.tld:targetport/api/hi",
"op": "http.client",
"tags": {
"http.status_code": "200"
},
"parent_span_id": "8f5a2b8768cafb4e",
"span_id": "bd2eb23da2beb459",
"start_timestamp": 1597976300.0000000,
"timestamp": 1597976302.0000000,
"trace_id": "ff62a8b040f340bda5d830223def1d81",
"status": "ok",
"data": {
"http.method": "POST",
"status_code": "200"
}
},
{
"description": "SeLeCt column FROM tAbLe WHERE id IN (1, 2, 3)",
"op": "db.sql.query",
Expand Down Expand Up @@ -1068,6 +1101,7 @@ mod tests {
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
Expand All @@ -1087,6 +1121,7 @@ mod tests {
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
Expand All @@ -1106,6 +1141,7 @@ mod tests {
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
Expand All @@ -1125,6 +1161,7 @@ mod tests {
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
Expand All @@ -1144,6 +1181,7 @@ mod tests {
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
Expand All @@ -1163,6 +1201,7 @@ mod tests {
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
Expand All @@ -1184,6 +1223,7 @@ mod tests {
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
Expand All @@ -1205,6 +1245,7 @@ mod tests {
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
Expand All @@ -1226,6 +1267,127 @@ mod tests {
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
},
},
Metric {
name: "s:transactions/span.user@none",
value: Set(
933084975,
),
timestamp: UnixTimestamp(1619420400),
tags: {
"environment": "fake_environment",
"span.action": "POST",
"span.category": "http",
"span.domain": "*.domain.tld:targetport",
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
},
},
Metric {
name: "d:transactions/span.exclusive_time@millisecond",
value: Distribution(
2000.0,
),
timestamp: UnixTimestamp(1619420400),
tags: {
"environment": "fake_environment",
"span.action": "POST",
"span.category": "http",
"span.domain": "*.domain.tld:targetport",
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
},
},
Metric {
name: "d:transactions/span.duration@millisecond",
value: Distribution(
59000.0,
),
timestamp: UnixTimestamp(1619420400),
tags: {
"environment": "fake_environment",
"span.action": "POST",
"span.category": "http",
"span.domain": "*.domain.tld:targetport",
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
},
},
Metric {
name: "s:transactions/span.user@none",
value: Set(
933084975,
),
timestamp: UnixTimestamp(1619420400),
tags: {
"environment": "fake_environment",
"span.action": "POST",
"span.category": "http",
"span.domain": "*.domain.tld:targetport",
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
},
},
Metric {
name: "d:transactions/span.exclusive_time@millisecond",
value: Distribution(
2000.0,
),
timestamp: UnixTimestamp(1619420400),
tags: {
"environment": "fake_environment",
"span.action": "POST",
"span.category": "http",
"span.domain": "*.domain.tld:targetport",
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
},
},
Metric {
name: "d:transactions/span.duration@millisecond",
value: Distribution(
59000.0,
),
timestamp: UnixTimestamp(1619420400),
tags: {
"environment": "fake_environment",
"span.action": "POST",
"span.category": "http",
"span.domain": "*.domain.tld:targetport",
"span.module": "http",
"span.op": "http.client",
"span.status": "ok",
"span.status_code": "200",
"transaction": "gEt /api/:version/users/",
"transaction.method": "GET",
"transaction.op": "myop",
Expand Down
Loading

0 comments on commit 5a7c7cb

Please sign in to comment.