gnodet-bot commented on code in PR #29240:
URL: https://github.com/apache/camel/pull/29240#discussion_r4480462793
##########
components/camel-opentelemetry-metrics/src/main/docs/opentelemetry-metrics-component.adoc:
##########
@@ -90,6 +90,11 @@ from("direct:in")
will update a counter with name `new.name` (instead of `name.not.used`) using
the attribute `dynamic-key` with value `dynamic-value` in addition to the
attribute `key` with value `value`.
+The attributes from the `CamelMetricsAttributes` header are used as given:
unlike the `attributes` URI parameters,
+their keys and values are not evaluated as `Simple` expressions. An attribute
from the header overrides an attribute
+from the URI with the same key. To add an attribute with a value from the
message, use an `attributes` URI parameter
+such as `attributes.customer=${header.customerId}`, or compute the value in
the route before setting the header.
+
All Metrics specific headers are removed from the message once the
OpenTelemetry endpoint finishes processing the exchange. While processing the
exchange
the OpenTelemetry endpoint will catch all exceptions and write log entry using
level `warn`.
Review Comment:
The micrometer doc was updated to say that an exception propagates to the
route error handler (via `exchange.setException(e)`), but this two-line
sentence still describes the old behavior of swallowing exceptions. The actual
`AbstractOpenTelemetryProducer` code does the same as micrometer —
`exchange.setException(e)` — so the description should match.
```suggestion
All Metrics specific headers are removed from the message once the
OpenTelemetry endpoint finishes processing of exchange.
If the OpenTelemetry endpoint cannot update the meter, then the exchange
fails with the exception, which the
error handler of the route handles as any other failure.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]