Remove external dependencies to implementation classes
Last week I started working on #24028 (moved). But after making a few local commits I realized that there's one major issue that makes this task harder than it should be: external dependencies to metrics-lib's implementation classes.
Some background: The idea behind metrics-lib was to provide a library for parsing descriptors. It contains one package with interfaces and another package with implementations of those interfaces. External applications, including our own, shall only depend on the first package, so that we can make changes to the second package at any time.
After a while we started sharing code (not interfaces) from metrics-lib in other applications, including code to parse
index.json files or code to sanitize web server logs. And even though sharing code is a good idea in many cases, it sometimes comes at the cost of creating unwanted dependencies. I'd rather want to turn metrics-lib into just the descriptor-parsing library as it was before and share more generic code between all code bases in another way than stuffing it into metrics-lib.
Here's my suggestion: We remove external dependencies to metrics-lib's
log packages, put out a set of releases, refactor those packages including renaming them as planned in #24028 (moved), and finally come up with a better plan for sharing code between modules.
I'm going to post two branches for review here in a minute.