apple / swift-metrics

Metrics API for Swift
https://apple.github.io/swift-metrics/
Apache License 2.0
645 stars 59 forks source link

Import TestMetrics from swift-metrics-extras #106

Closed ktoso closed 2 years ago

ktoso commented 2 years ago

After a long chain of "originally developed in" (swift distributed actors -> swift cluster membership -> swift metrics extras) finally moving the test metrics to where they should belong, the metrics repo!

This set of types allows for testing metrics. The backend can be used in tests to bootstrap and then get metrics of the right label/dimensions and write assertions against them.

TODO:

cc @fabianfett @tomerd

ktoso commented 2 years ago

Resolves https://github.com/apple/swift-metrics/issues/107

tomerd commented 2 years ago

The only issue I can see is the potential naming conflict, since we now have MetricsTestUtils in swift-metrics and swift-metrics-extras. But since adopters need to declare which package an imported library is coming from this shouldn't be an issue, right?

I actually think this is a problem.. at least until https://forums.swift.org/t/se-0339-module-aliasing-for-disambiguation/54730 is in place

ktoso commented 2 years ago

How about moving back to best name ever -- MetricsTestKit then? :-)

fabianfett commented 2 years ago

MetricsTestKit it is!

ktoso commented 2 years ago

@swift-server-bot test this please

ktoso commented 2 years ago

@swift-server-bot test this please

ktoso commented 2 years ago

Merging since @fabianfett approved 👍