You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/03/31 07:53:24 UTC

[GitHub] [camel-k] squakez commented on pull request #3152: Example to show usage of prometheus trait

squakez commented on pull request #3152:
URL: https://github.com/apache/camel-k/pull/3152#issuecomment-1084223887


   Hello. Let me try to clarify what was my idea of the example. The route definition is the first part. After that, my idea was to figure out some use case and show how you can get some stats. As an example, once the build is over, you can describe how to get certain information from the API server: http://localhost:8080/api/v1/namespaces/default/pods/sample-7c66669766-4j89h/proxy/q/metrics (in a minikube environment, before that you must run `kubectl proxy --port=8080`):
   
   ```
   # TYPE application_camel_context_exchanges_completed_total counter
   application_camel_context_exchanges_completed_total{camelContext="camel-1"} 31.0
   ```
   Here for instance, you can let the people understand how you can get stats on the number of exchanges performed by the Integration. This is some basic example, you can figure out any other one with more complex routes. Ideally you need to play a bit and figure it out some useful things to show. As an example, you can refer to one of the E2E test we have to cover the prometheus trait: https://github.com/apache/camel-k/blob/main/e2e/common/traits/prometheus_test.go#L44
   
   Hope that helps.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org