Repository: quarkusio/quarkus
Issue: smallrye-metrics creates counter for private method but does not increase its value

**Describe the bug**
(Describe the problem clearly and concisely.)

If you run a simple project with the following resource, you see the metric `application_build_message_total 0.0` (related to the private method down) being created as soon as the server starts.
However its value does not increase unless the `buildMessage` method is made public.

```java
@Path("/hello")
public class GreetingResource {

    @Counted(name = "counter", absolute = true)
    @Timed(name = "timer", absolute = true)
    @GET
    @Produces(MediaType.TEXT_PLAIN)
    public Message hello() {
        final Message message = buildMessage();
        return message;
    }

    @Counted(name = "build.message", absolute = true)
    private Message buildMessage() {
        final Message message = new Message();
        message.setText(UUID.randomUUID().toString());
        return message;
    }
}
```

**Expected behavior**
(Describe the expected behavior clearly and concisely.)

The way I see it, 2 options:
1. Do NOT ALLOW interception of private methods -> No metric should be created at all, and it would be nice to get a warning/error message during compilation.
2. Allow interception of private methods -> Metric should be created, and updated accordingly.

**Actual behavior**
(Describe the actual behavior clearly and concisely.)

_See description at the beginning._

**To Reproduce**
Steps to reproduce the behavior:
1. Create Maven project as described in https://quarkus.io/guides/getting-started#bootstrapping-the-project
2. Replace generated resource with class above.
3. Run in any mod, for example, use `mvn quarkus:dev` to quickly change between private & public method.

**Configuration**
_Not applicable._

**Screenshots**
_Not applicable._

**Environment (please complete the following information):**
 - Output of `uname -a` or `ver`: 
Linux man-pc 5.6.10-3-MANJARO #1 SMP PREEMPT Sun May 3 11:03:28 UTC 2020 x86_64 GNU/Linux
 - Output of `java -version`: 
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02)
OpenJDK 64-Bit Server VM GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02, mixed mode, sharing)
 - GraalVM version (if different from Java): 
same as Java above
 - Quarkus version or git rev: 
1.4.2.Final
 - Build tool (ie. output of `mvnw --version` or `gradlew --version`): 
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/---/.sdkman/candidates/maven/current
Java version: 11.0.6, vendor: Oracle Corporation, runtime: /home/--/.sdkman/candidates/java/20.0.0.r11-grl
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.6.10-3-manjaro", arch: "amd64", family: "unix"
**Additional context**
(Add any other context about the problem here.)

Started conversation in mailinglinst: https://groups.google.com/forum/#!msg/quarkus-dev/48xmspijNwk/pLx_xpRDCQAJ

Changed files:
extensions/smallrye-metrics/deployment/src/main/java/io/quarkus/smallrye/metrics/deployment/SmallRyeMetricsProcessor.java

diff --git a/extensions/smallrye-metrics/deployment/src/main/java/io/quarkus/smallrye/metrics/deployment/SmallRyeMetricsProcessor.java b/extensions/smallrye-metrics/deployment/src/main/java/io/quarkus/smallrye/metrics/deployment/SmallRyeMetricsProcessor.java
index e8eb82b4660..5a4f5262244 100644
--- a/extensions/smallrye-metrics/deployment/src/main/java/io/quarkus/smallrye/metrics/deployment/SmallRyeMetricsProcessor.java
+++ b/extensions/smallrye-metrics/deployment/src/main/java/io/quarkus/smallrye/metrics/deployment/SmallRyeMetricsProcessor.java
@@ -344,7 +344,14 @@ void registerMetricsFromAnnotatedMethods(SmallRyeMetricsRecorder metrics,
                     case METHOD:
                         MethodInfo method = metricAnnotationTarget.asMethod();
                         if (!method.declaringClass().name().toString().startsWith("io.smallrye.metrics")) {
-                            collectedMetricsMethods.add(method);
+                            if (!Modifier.isPrivate(method.flags())) {
+                                collectedMetricsMethods.add(method);
+                            } else {
+                                LOGGER.warn("Private method is annotated with a metric: " + method +
+                                        " in class " + method.declaringClass().name() + ". Metrics " +
+                                        "are not collected for private methods. To enable metrics for this method, make " +
+                                        "it at least package-private.");
+                            }
                         }
                         break;
                     case CLASS: