squakez commented on code in PR #3152: URL: https://github.com/apache/camel-k/pull/3152#discussion_r842514510
########## examples/traits/prometheus/README.md: ########## @@ -0,0 +1,27 @@ +# Camel K Prometheus Trait + +In this section you will find examples about fine tuning your `Integration` using **Prometheus** `trait` capability. + +Run the integration via: + + $ kamel run -t prometheus.enabled=true Hello.java + +A Prometheus-compatible endpoint is configured with the Prometheus trait. When utilising the Prometheus operator, it also generates a PodMonitor resource, which allows the endpoint to be scraped automatically. + + +To get statistics about the number of events successfully handled by the `Integration`,execute the `MyIntegration.java` route individually via: + + $ kamel run -t prometheus.enabled=true MyIntegration.java + +You should be able to see the new integration running after a while via: + + $ kamel get + +The metrics can be retrieved by port-forwarding this service, e.g.: + + $ kubectl port-forward svc/metrics-prometheus 8080:8080 + + $ curl http://localhost:8080/metrics + +Similarly other use cases can be to retrieve information on unprocessed events, number of retries made to process an event, etc. For more information on Integration monitoring refer to the [Camel K Integration Monitoring](https://camel.apache.org/camel-k/1.8.x/observability/monitoring/integration.html) documentation. Review Comment: Better to provide `next` version link: https://camel.apache.org/camel-k/next/observability/monitoring/integration.html -- 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]
