[
https://issues.apache.org/jira/browse/CAMEL-27955?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-27955:
--------------------------------
Description:
Found while improving the option descriptions of camel-micrometer for
CAMEL-23832 (commit
https://github.com/apache/camel/commit/b03d1ed7628336a767e986b3dc2fb603a72b0b5c,
pull request https://github.com/apache/camel/pull/31196).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. decrement does nothing on Prometheus and other monotonic counters
{{CounterProducer.doProcess}} applies decrement (option or
CamelMetricsCounterDecrement header) as counter.increment(-x). Micrometer
counters only go up: PrometheusCounter.increment(double) in
micrometer-registry-prometheus 1.18.0 ignores amounts <= 0, so the decrement is
dropped silently. It only works on cumulative registries such as
SimpleMeterRegistry. The description now says so.
Proposed change: deprecate decrement (pointing to a gauge), or log a WARN once
when a decrement is applied.
h4. 2. Smaller issues
The doc page "Usage of producers" and the Headers example still show the
comma-separated tags=k=v syntax, which MicrometerComponent.createEndpoint
accepts but logs as deprecated (tags.key=value is the current syntax). The
hand-written header tables of the doc page still say "Override ... value in
URI". AbstractMicrometerProducer.simple() parses the Simple expressions of the
name, description, tags and values on every exchange.
_Claude Code on behalf of davsclaus_
was:
Found while improving the option descriptions of camel-micrometer for
CAMEL-23832 (pull request https://github.com/apache/camel/pull/31196).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. decrement does nothing on Prometheus and other monotonic counters
{{CounterProducer.doProcess}} applies decrement (option or
CamelMetricsCounterDecrement header) as counter.increment(-x). Micrometer
counters only go up: PrometheusCounter.increment(double) in
micrometer-registry-prometheus 1.18.0 ignores amounts <= 0, so the decrement is
dropped silently. It only works on cumulative registries such as
SimpleMeterRegistry. The description now says so.
Proposed change: deprecate decrement (pointing to a gauge), or log a WARN once
when a decrement is applied.
h4. 2. Smaller issues
The doc page "Usage of producers" and the Headers example still show the
comma-separated tags=k=v syntax, which MicrometerComponent.createEndpoint
accepts but logs as deprecated (tags.key=value is the current syntax). The
hand-written header tables of the doc page still say "Override ... value in
URI". AbstractMicrometerProducer.simple() parses the Simple expressions of the
name, description, tags and values on every exchange.
_Claude Code on behalf of davsclaus_
> camel-micrometer: decrement does nothing on Prometheus counters
> ---------------------------------------------------------------
>
> Key: CAMEL-27955
> URL: https://issues.apache.org/jira/browse/CAMEL-27955
> Project: Camel
> Issue Type: Bug
> Components: camel-micrometer
> Reporter: Claus Ibsen
> Priority: Minor
> Fix For: 4.25.0
>
>
> Found while improving the option descriptions of camel-micrometer for
> CAMEL-23832 (commit
> https://github.com/apache/camel/commit/b03d1ed7628336a767e986b3dc2fb603a72b0b5c,
> pull request https://github.com/apache/camel/pull/31196).
> These are separate problems of the component; the descriptions change only
> documents the current behavior.
> h4. 1. decrement does nothing on Prometheus and other monotonic counters
> {{CounterProducer.doProcess}} applies decrement (option or
> CamelMetricsCounterDecrement header) as counter.increment(-x). Micrometer
> counters only go up: PrometheusCounter.increment(double) in
> micrometer-registry-prometheus 1.18.0 ignores amounts <= 0, so the decrement
> is dropped silently. It only works on cumulative registries such as
> SimpleMeterRegistry. The description now says so.
> Proposed change: deprecate decrement (pointing to a gauge), or log a WARN
> once when a decrement is applied.
> h4. 2. Smaller issues
> The doc page "Usage of producers" and the Headers example still show the
> comma-separated tags=k=v syntax, which MicrometerComponent.createEndpoint
> accepts but logs as deprecated (tags.key=value is the current syntax). The
> hand-written header tables of the doc page still say "Override ... value in
> URI". AbstractMicrometerProducer.simple() parses the Simple expressions of
> the name, description, tags and values on every exchange.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)