Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

Reorganize Package Structure To Clarify API #103

Closed
5 tasks
adamgfraser opened this issue Nov 10, 2020 · 3 comments
Closed
5 tasks

Reorganize Package Structure To Clarify API #103

adamgfraser opened this issue Nov 10, 2020 · 3 comments
Labels
good first issue Good for newcomers

Comments

@adamgfraser
Copy link
Contributor

The ZIO ZMX library should expose a small number of core abstractions, primarily the Metrics service in the package.scala file, and then specific implementations of that service in appropriate packages (e.g. a statsd implementation in the zio.zmx.stats package). Everything else that is used to implement these services should be package private to provide a clean API for users and flexibility to evolve implementation details.

This ticket is to reorganize the package structure of the project as follows:

  • Rename the metrics package to be the statsd package
  • Rename UDPClient to StatsdClient and UDPClientUnsafe to StatsdClientUnsafe for clarity since UDP is a communication protocol and this package is really concerned with implementation details that are specific to statsd
  • Move the Metrics.live service in the zio.zmx package object to the zio.zmx.statsd package object since this implementation is specific to statsd
  • Move the data types in the MetricsDataModel and MetricsConfigDataModel traits to be top level data types within the zio.zmx package and delete the trait. Since the trait is not used anywhere except being extended in the package object this should be the same and will make it easier for users to find these data types.
  • Other than the live method in zio.zmx.statsd above make sure everything in any of the zio.zmx sub-packages (e.g. diagnostics, fibers, graph, parser) is private[zmx].

After these changes generating ScalaDoc for ZIO ZMX should produce documentation that only shows the values in the zio.zmx package object, the data types currently in MetricsModel and MetricsDataModel, and the live service in the zio.zmx.statsd package.

@lbdlbdlbdl
Copy link

I would like to work on this one.

@adamgfraser
Copy link
Contributor Author

@lbdlbdlbdl Great!

@atooni
Copy link
Member

atooni commented Dec 4, 2020

@lbdlbdlbdl Hello - Are you currently working on this ? - I am asking because it kind of falls in line with the work I am doing to align the prometheus and the statsd API. see #155

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants