open-telemetry / opentelemetry-java-instrumentation

OpenTelemetry auto-instrumentation and instrumentation libraries for Java
https://opentelemetry.io
Apache License 2.0
1.9k stars 826 forks source link

Add a badge for CodeCov #3046

Open KKelvinLo opened 3 years ago

KKelvinLo commented 3 years ago

Is your feature request related to a problem? Most of the existing OpenTelemetry repositories display a badge for code coverage. In an effort to have the Java-instrumentation repository to be up to date and consistent with the other established SDKs and repositories, there should be a code coverage badge in the main README.md file.

Describe the solution you'd like. As a developer contributing to OpenTelemetry, I recommend adding a code coverage percentage badge at the top of the README document of the Java-instrumentation repo. Code coverage badges are a common feature of many modern open source projects, which improves readability and convenience to developers. By adding a code coverage badge to the README.md, with a quick scan, any observer will be able to know the status of the repository.

cc: @alolita

anuraaga commented 3 years ago

@KKelvinLo Thanks for calling this out. We don't actually run codecov on this repo. Coverage isn't an easy problem for us, unlike other repositories, since we test shaded code (packages are renamed). This can probably be worked around. We also test code inserted as bytecode, which I am guessing no amount of workarounds would help with but maybe there's something possible.

So before adding a badge, we need some effort to get coverage to work correctly in this repository. Definitely worth doing, just pointing out we can't just add a badge right now.

alolita commented 3 years ago

Hi @anuraaga thanks for sharing more details on the existing test coverage. Looks like there is work to be done on the test coverage itself. That said, I'd like to figure out how we can add some indicator for test coverage since that will be additional detail helpful for the project to move towards incubation.