swift-server / swift-prometheus

Prometheus client library for Swift
https://swiftpackageindex.com/swift-server/swift-prometheus
Apache License 2.0
145 stars 32 forks source link

👯‍♀️ Merge Prometheus and PrometheusMetrics targets into one library #9

Closed Yasumoto closed 5 years ago

Yasumoto commented 5 years ago

This is following discussion in #5.

As a library author and application developer, I'd find this much simpler to use if I'm only working with one library since I expect this functionality to be present.

Very open-minded to improvements or suggested tweaks, however!

Checklist

Motivation and Context

We want to provide a simple solution for end-users to take advantage of. swift-metrics has broad applicability across the community, and is already included in the dependency graph. If a user does not wish to use swift-metrics they don't need to, but this change will make it much clearer how to do so.

This fixes #5.

Description

I moved PrometheusMetrics into the Prometheus target, which composes SwiftPrometheus.

In addition, I created a PrometheusExample executable to make it easier for users to see the output format and follow along with the code (particularly from within Xcode 🔨 ).

MrLotU commented 5 years ago

@Yasumoto Thanks for this PR!