newrelic / kafka-connect-newrelic

Apache License 2.0
5 stars 17 forks source link

Check for metric type names #37

Open ericmittelhammer opened 2 years ago

ericmittelhammer commented 2 years ago

If a metric event is submitted that contains a value of type that is invalid (other than count, gauge, or summary), the conditional will result in throwing this error, which is rather nonspecific: https://github.com/newrelic/kafka-connect-newrelic/blob/35e774c911754a1bedb0a29524e57e077c242444/newrelic-kafka-connector/src/main/java/com/newrelic/telemetry/metrics/MetricConverter.java#L188

Better flow would be to explicitly guard for the correct value in count, gauge, or metric, and reject/warn specifically.