-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add integration test with metrics from the prometheus receiver (#348)
- Loading branch information
Showing
3 changed files
with
1,453 additions
and
0 deletions.
There are no files selected for viewing
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
311 changes: 311 additions & 0 deletions
311
exporter/collector/integrationtest/testdata/fixtures/basic_prometheus_metrics.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,311 @@ | ||
{ | ||
"resourceMetrics":[ | ||
{ | ||
"resource":{ | ||
"attributes":[ | ||
{ | ||
"key":"service.name", | ||
"value":{ | ||
"stringValue":"demo" | ||
} | ||
}, | ||
{ | ||
"key":"service.instance.id", | ||
"value":{ | ||
"stringValue":"localhost:2222" | ||
} | ||
}, | ||
{ | ||
"key":"net.host.port", | ||
"value":{ | ||
"stringValue":"2222" | ||
} | ||
}, | ||
{ | ||
"key":"http.scheme", | ||
"value":{ | ||
"stringValue":"http" | ||
} | ||
} | ||
] | ||
}, | ||
"instrumentationLibraryMetrics":[ | ||
{ | ||
"instrumentationLibrary":{}, | ||
"metrics":[ | ||
{ | ||
"name":"scrape_series_added", | ||
"description":"The approximate number of new series in this scrape", | ||
"gauge":{ | ||
"dataPoints":[ | ||
{ | ||
"timeUnixNano":"1649443516286000000", | ||
"asDouble":22 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name":"ex_com_one", | ||
"gauge":{ | ||
"dataPoints":[ | ||
{ | ||
"attributes":[ | ||
{ | ||
"key":"ex_com_lemons", | ||
"value":{ | ||
"stringValue":"13" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_language", | ||
"value":{ | ||
"stringValue":"go" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_name", | ||
"value":{ | ||
"stringValue":"opentelemetry" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_version", | ||
"value":{ | ||
"stringValue":"1.6.2" | ||
} | ||
} | ||
], | ||
"timeUnixNano":"1649443516286000000", | ||
"asDouble":1 | ||
}, | ||
{ | ||
"attributes":[ | ||
{ | ||
"key":"A", | ||
"value":{ | ||
"stringValue":"1" | ||
} | ||
}, | ||
{ | ||
"key":"B", | ||
"value":{ | ||
"stringValue":"2" | ||
} | ||
}, | ||
{ | ||
"key":"C", | ||
"value":{ | ||
"stringValue":"3" | ||
} | ||
}, | ||
{ | ||
"key":"ex_com_lemons", | ||
"value":{ | ||
"stringValue":"10" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_language", | ||
"value":{ | ||
"stringValue":"go" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_name", | ||
"value":{ | ||
"stringValue":"opentelemetry" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_version", | ||
"value":{ | ||
"stringValue":"1.6.2" | ||
} | ||
} | ||
], | ||
"timeUnixNano":"1649443516286000000", | ||
"asDouble":13 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name":"ex_com_two", | ||
"histogram":{ | ||
"dataPoints":[ | ||
{ | ||
"attributes":[ | ||
{ | ||
"key":"ex_com_lemons", | ||
"value":{ | ||
"stringValue":"13" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_language", | ||
"value":{ | ||
"stringValue":"go" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_name", | ||
"value":{ | ||
"stringValue":"opentelemetry" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_version", | ||
"value":{ | ||
"stringValue":"1.6.2" | ||
} | ||
} | ||
], | ||
"startTimeUnixNano":"1649443516286000000", | ||
"timeUnixNano":"1649443516286000000", | ||
"count":"1", | ||
"sum":2, | ||
"bucketCounts":[ | ||
"0", | ||
"0", | ||
"1", | ||
"0", | ||
"0", | ||
"0", | ||
"0" | ||
], | ||
"explicitBounds":[ | ||
1, | ||
2, | ||
5, | ||
10, | ||
20, | ||
50 | ||
] | ||
}, | ||
{ | ||
"attributes":[ | ||
{ | ||
"key":"A", | ||
"value":{ | ||
"stringValue":"1" | ||
} | ||
}, | ||
{ | ||
"key":"B", | ||
"value":{ | ||
"stringValue":"2" | ||
} | ||
}, | ||
{ | ||
"key":"C", | ||
"value":{ | ||
"stringValue":"3" | ||
} | ||
}, | ||
{ | ||
"key":"ex_com_lemons", | ||
"value":{ | ||
"stringValue":"10" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_language", | ||
"value":{ | ||
"stringValue":"go" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_name", | ||
"value":{ | ||
"stringValue":"opentelemetry" | ||
} | ||
}, | ||
{ | ||
"key":"telemetry_sdk_version", | ||
"value":{ | ||
"stringValue":"1.6.2" | ||
} | ||
} | ||
], | ||
"startTimeUnixNano":"1649443516286000000", | ||
"timeUnixNano":"1649443516286000000", | ||
"count":"2", | ||
"sum":14, | ||
"bucketCounts":[ | ||
"0", | ||
"0", | ||
"1", | ||
"0", | ||
"1", | ||
"0", | ||
"0" | ||
], | ||
"explicitBounds":[ | ||
1, | ||
2, | ||
5, | ||
10, | ||
20, | ||
50 | ||
] | ||
} | ||
], | ||
"aggregationTemporality":"AGGREGATION_TEMPORALITY_CUMULATIVE" | ||
} | ||
}, | ||
{ | ||
"name":"up", | ||
"description":"The scraping was successful", | ||
"gauge":{ | ||
"dataPoints":[ | ||
{ | ||
"timeUnixNano":"1649443516286000000", | ||
"asDouble":1 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name":"scrape_duration_seconds", | ||
"description":"Duration of the scrape", | ||
"unit":"seconds", | ||
"gauge":{ | ||
"dataPoints":[ | ||
{ | ||
"timeUnixNano":"1649443516286000000", | ||
"asDouble":0.00699415 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name":"scrape_samples_scraped", | ||
"description":"The number of samples the target exposed", | ||
"gauge":{ | ||
"dataPoints":[ | ||
{ | ||
"timeUnixNano":"1649443516286000000", | ||
"asDouble":22 | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name":"scrape_samples_post_metric_relabeling", | ||
"description":"The number of samples remaining after metric relabeling was applied", | ||
"gauge":{ | ||
"dataPoints":[ | ||
{ | ||
"timeUnixNano":"1649443516286000000", | ||
"asDouble":22 | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.