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 2021/04/08 14:09:21 UTC

[GitHub] [camel-kamelets] claudio4j opened a new pull request #123: Add AWS CloudWatch Kamelet

claudio4j opened a new pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123


   #116 
   When regenerating the doc, it updated the aws s3 doc.


-- 
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.

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



[GitHub] [camel-kamelets] claudio4j commented on pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
claudio4j commented on pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#issuecomment-852172254


   > What is the status of this @claudio4j ?
   
   I had other priorities and put this work on hold. But I am back into it today and expect to push the changes soon.


-- 
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.

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



[GitHub] [camel-kamelets] oscerd commented on pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#issuecomment-815860910


   Lgtm cc @nicolaferraro 


-- 
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.

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



[GitHub] [camel-kamelets] nicolaferraro commented on a change in pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on a change in pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#discussion_r614731536



##########
File path: aws-cloudwatch-sink.kamelet.yaml
##########
@@ -0,0 +1,86 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: aws-cloudwatch-sink
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIwN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MS4wMjZsLTg4LjQ0NSA2LjAyNkwxMjggMTY2Ljc3NWw5Mi4wMzktMTEuMDgzIiBmaWxsPSIjQjdDQTlEIi8+PHBhdGggZD0iTTEwMC41NjggMjE5LjkwNmwyNy40MiA4LjIyNi43ODktLjg0OS0uMDIzLTYxLjg0OS0uNzg5LS43NTgtMjcuMzk3LTIuOTU4djU4LjE4OCIgZmlsbD0iIzRCNjEyQyIvPjxwYXRoIGQ9Ik0yMjAuMDM5IDE1NS42OTJsLTkyLjA3NCA4Ljk4LjAyMyA2My40NiA5Mi4wNTEtMjcuNzExdi00NC43MjkiIGZpbGw9IiM3NTlDM0UiLz48L3N2Zz4K"
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "AWS CloudWatch Metrics Sink"
+    description: |-
+      Send messages to AWS CloudWatch metrics.
+
+      You can set the Dimensions in the header, by using CamelAwsCwMetricDimensionName for the dimension name 
+      and CamelAwsCwMetricDimensionValue for the dimension value.
+
+      Most of the property values can be defined in headers, overwriting any parameter previously defined:
+      - CamelAwsCwMetricNamespace
+      - CamelAwsCwMetricName
+      - CamelAwsCwMetricValue
+      - CamelAwsCwMetricUnit
+      - CamelAwsCwMetricTimestamp
+      - CamelAwsCwMetricDimensionName
+      - CamelAwsCwMetricDimensionValue

Review comment:
       Yes, we may use more user-friendly names for the properties by remapping them in `set-property` steps, as other kamelets are doing.
   
   There are many possibilities about the body, we can keep it empty. Or we can expect the body to contain the `metric-value` header if that is missing. Or, we can detect if the body is a simple value or a structured JSON, in which case we can unmarshal it and use `set-header` with `simple` or `jsonpath` to get camel headers from the structured body.
   Anyway, it's also ok to rely on headers for a first release, then add a different logic in the future. Sounds like it's better to improve the component to optionally accept a structured body rather than adding it here.
   
   The timestamp conversion may be possible with simple. But looking here https://camel.apache.org/components/latest/languages/simple-language.html, I see only methods for formatting. I think e.g. "number of milliseconds since epoch" as java.lang.Long can be automatically converted by Camel to java.util.Date, so we may use that format here for simplicity.




-- 
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.

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



[GitHub] [camel-kamelets] oscerd merged pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
oscerd merged pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123


   


-- 
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.

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



[GitHub] [camel-kamelets] oscerd commented on pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#issuecomment-849333971


   What is the status of this @claudio4j ?


-- 
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.

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



[GitHub] [camel-kamelets] oscerd commented on a change in pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
oscerd commented on a change in pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#discussion_r614888688



##########
File path: aws-cloudwatch-sink.kamelet.yaml
##########
@@ -0,0 +1,86 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: aws-cloudwatch-sink
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIwNyIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI5MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTI1NiAxOTkuMzA1bC0xMjcuOTU3LTE4Ljc5N0wwIDE5OS4zMjlsMTI4LjAxIDQ3LjQzOUwyNTYgMTk5LjMwNSIgZml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1NS42OTJsLTkyLjA3NCA4Ljk4LjAyMyA2My40NiA5Mi4wNTEtMjcuNzExdi00NC43MjkiIGZpbGw9IiM3NTlDM0UiLz48L3N2Zz4K"
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "AWS CloudWatch Metrics Sink"
+    description: |-
+      Send messages to AWS CloudWatch metrics.
+
+      You can set the Dimensions in the header, by using CamelAwsCwMetricDimensionName for the dimension name 
+      and CamelAwsCwMetricDimensionValue for the dimension value.
+
+      Most of the property values can be defined in headers, overwriting any parameter previously defined:
+      - CamelAwsCwMetricNamespace
+      - CamelAwsCwMetricName
+      - CamelAwsCwMetricValue
+      - CamelAwsCwMetricUnit
+      - CamelAwsCwMetricTimestamp
+      - CamelAwsCwMetricDimensionName
+      - CamelAwsCwMetricDimensionValue
+    required:
+      - cw_namespace
+      - accessKey
+      - secretKey
+      - region
+      - metricName
+      - metricValue
+    properties:
+      cw_namespace:
+        title: Cloud Watch Namespace
+        description: The cloud watch metric namespace.
+        type: string
+      accessKey:
+        title: Access Key
+        description: The access key obtained from AWS.
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      secretKey:
+        title: Secret Key
+        description: The secret key obtained from AWS.
+        type: string
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+      region:
+        title: AWS Region
+        description: The AWS region to connect to.
+        type: string
+        example: eu-west-1
+      metricName:

Review comment:
       All of these options on the endpoint can be set as headers first. Headers have precedence over the endpoint option. https://github.com/apache/camel/blob/master/components/camel-aws/camel-aws2-cw/src/main/java/org/apache/camel/component/aws2/cw/Cw2Producer.java#L124
   
   So it would be better to set all of this as property or header, like here:
   https://github.com/apache/camel-kamelets/blob/master/azure-eventhubs-sink.kamelet.yaml#L57
   
   Especially the metric value would never be constant, so it doesn't make really sense to set it as an endpoint option. 
   
   I suggest to set all the dynamic fields as header or property following the example I reported above.




-- 
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.

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



[GitHub] [camel-kamelets] claudio4j commented on pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
claudio4j commented on pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#issuecomment-861452830


   > Thanks, can you check the conflicts?
   
   Done. Thanks.


-- 
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.

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



[GitHub] [camel-kamelets] claudio4j commented on a change in pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
claudio4j commented on a change in pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#discussion_r612880110



##########
File path: aws-cloudwatch-sink.kamelet.yaml
##########
@@ -0,0 +1,86 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: aws-cloudwatch-sink
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIwNyIgaGVpZ2h0PSIyNTAwIiB2aWV3Qm94PSIwIDAgMjU2IDI5MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZD0iTTI1NiAxOTkuMzA1bC0xMjcuOTU3LTE4Ljc5N0wwIDE5OS4zMjlsMTI4LjAxIDQ3LjQzOUwyNTYgMTk5LjMwNSIgZmlsbD0iI0I3Q0E5RCIvPjxwYXRoIGQ9Ik0yNS42MjEgMTk3LjExM2wyMS42MyA2Ljc2MSAxLjk3MS0yLjIzOFY1MC4yODRsLTEuOTcxLTIuNTg1LTIxLjYzIDguMjc0djE0MS4xNCIgZmlsbD0iIzRCNjEyQyIvPjxwYXRoIGQ9Ik0xMjMuODMyIDE5MC40MjNsLTc2LjU4MSAxMy40NTFWNDcuNzAzbDc2LjU4MSAxNy4yMjJ2MTI1LjQ5OCIgZmlsbD0iIzc1OUMzRSIvPjxwYXRoIGQ9Ik04OS42ODYgMjE2Ljg4OWwtMjkuODQ4LTkuMjAxVjE0LjkyOEw4OS42ODYuMDA0bDIuNjEyIDIuODQ1djIxMC44NThsLTIuNjEyIDMuMTgyIiBmaWxsPSIjNEI2MTJDIi8+PHBhdGggZD0iTTE5MS45NjcgMTkyLjg5NEw4OS42ODYgMjE2Ljg4OVYwbDEwMi4yODEgMzkuODY2djE1My4wMjgiIGZpbGw9IiM3NTlDM0UiLz48cGF0aCBkPSJNMTI3Ljk2NSAyNDQuNzE0TDAgMTk5LjMyOXYyNi4zMjRsMTI3Ljk2NSA2My45ODN2LTQ0LjkyMiIgZmlsbD0iIzRCNjEyQyIvPjxwYXRoIGQ9Ik0yNTYgMjI1LjYyMmwtMTI
 4LjAzNSA2NC4wMTR2LTQ0LjkyMkwyNTYgMTk5LjMwNXYyNi4zMTciIGZpbGw9IiM3NTlDM0UiLz48cGF0aCBkPSJNMjIwLjAzOSAxNTUuNjkyaC0zMS4wMjZsLTg4LjQ0NSA2LjAyNkwxMjggMTY2Ljc3NWw5Mi4wMzktMTEuMDgzIiBmaWxsPSIjQjdDQTlEIi8+PHBhdGggZD0iTTEwMC41NjggMjE5LjkwNmwyNy40MiA4LjIyNi43ODktLjg0OS0uMDIzLTYxLjg0OS0uNzg5LS43NTgtMjcuMzk3LTIuOTU4djU4LjE4OCIgZmlsbD0iIzRCNjEyQyIvPjxwYXRoIGQ9Ik0yMjAuMDM5IDE1NS42OTJsLTkyLjA3NCA4Ljk4LjAyMyA2My40NiA5Mi4wNTEtMjcuNzExdi00NC43MjkiIGZpbGw9IiM3NTlDM0UiLz48L3N2Zz4K"
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "AWS CloudWatch Metrics Sink"
+    description: |-
+      Send messages to AWS CloudWatch metrics.
+
+      You can set the Dimensions in the header, by using CamelAwsCwMetricDimensionName for the dimension name 
+      and CamelAwsCwMetricDimensionValue for the dimension value.
+
+      Most of the property values can be defined in headers, overwriting any parameter previously defined:
+      - CamelAwsCwMetricNamespace
+      - CamelAwsCwMetricName
+      - CamelAwsCwMetricValue
+      - CamelAwsCwMetricUnit
+      - CamelAwsCwMetricTimestamp
+      - CamelAwsCwMetricDimensionName
+      - CamelAwsCwMetricDimensionValue

Review comment:
       > As general rule, we don't use Camel* headers in Kamelets,
   
   Kamelets should not expose those camel headers,but can set them in `- set-property` steps ?
   
   The incoming body is empty, the camel-aws2-cw component uses only the values from the header or query parameters. 
   Would the structured body be something like this ?
   ```
   {namespace: "my-aws-ns",
   metric-name: "my-metric",
   metric-value: "1.2",
   ...
   }
   ```
   Then the `to:()` directive would use the body structure like the following ?
   ```
   .to("aws2-cw:${body[namespace]}?name=${body[metric-name]}")
   ```
   About the timestamp conversion, would it be using the `simple("${headerAs(key, type)}")` ?
   




-- 
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.

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



[GitHub] [camel-kamelets] claudio4j commented on pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
claudio4j commented on pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#issuecomment-852326610


   @oscerd I pushed the required changes, can you review ? 


-- 
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.

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



[GitHub] [camel-kamelets] nicolaferraro commented on a change in pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on a change in pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#discussion_r610491652



##########
File path: aws-cloudwatch-sink.kamelet.yaml
##########
@@ -0,0 +1,86 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: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LjkyMkwyNTYgMTk5LjMwNXYyNi4zMTciIGZpbGw9IiM3NTlDM0UiLz48cGF0aCBkPSJNMjIwLjAzOSAxNTUuNjkyaC0zMS4wMjZsLTg4LjQ0NSA2LjAyNkwxMjggMTY2Ljc3NWw5Mi4wMzktMTEuMDgzIiBmaWxsPSIjQjdDQTlEIi8+PHBhdGggZD0iTTEwMC41NjggMjE5LjkwNmwyNy40MiA4LjIyNi43ODktLjg0OS0uMDIzLTYxLjg0OS0uNzg5LS43NTgtMjcuMzk3LTIuOTU4djU4LjE4OCIgZmlsbD0iIzRCNjEyQyIvPjxwYXRoIGQ9Ik0yMjAuMDM5IDE1NS42OTJsLTkyLjA3NCA4Ljk4LjAyMyA2My40NiA5Mi4wNTEtMjcuNzExdi00NC43MjkiIGZpbGw9IiM3NTlDM0UiLz48L3N2Zz4K"
+    camel.apache.org/provider: "Apache Software Foundation"
+  labels:
+    camel.apache.org/kamelet.type: "sink"
+spec:
+  definition:
+    title: "AWS CloudWatch Metrics Sink"
+    description: |-
+      Send messages to AWS CloudWatch metrics.
+
+      You can set the Dimensions in the header, by using CamelAwsCwMetricDimensionName for the dimension name 
+      and CamelAwsCwMetricDimensionValue for the dimension value.
+
+      Most of the property values can be defined in headers, overwriting any parameter previously defined:
+      - CamelAwsCwMetricNamespace
+      - CamelAwsCwMetricName
+      - CamelAwsCwMetricValue
+      - CamelAwsCwMetricUnit
+      - CamelAwsCwMetricTimestamp
+      - CamelAwsCwMetricDimensionName
+      - CamelAwsCwMetricDimensionValue

Review comment:
       As general rule, we don't use Camel* headers in Kamelets, since these are higher level objects that hide their Camel engine. Usually we have a few headers, but here we have many more of them, so the mapping may be verbose, since e.g. we may need to detect both e.g. `metric-namespace` and `ce-metric-namespace` headers.
   
   One reason is that we want to hide camel, the other is that in some contexts, e.g. knative, you are able to only send cloud-event extensions, which are mapped to headers that start with the "ce-" prefix.
   
   A different issue is with the `metric-timestamp` header. Consider that (from the doc) `CamelAwsCwMetricTimestamp` needs to be a `java.util.Date`. When this sink is bound to a Knative channel or a Kafka topic, all headers are textual, so we need to define the format of the header and its conversion from text to date.
   
   Out of curiosity, is the body of the incoming message used? Maybe we should we use a structured body instead of relying on headers.




-- 
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.

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



[GitHub] [camel-kamelets] oscerd commented on pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
oscerd commented on pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#issuecomment-861489186


   Thanks.


-- 
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.

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



[GitHub] [camel-kamelets] nicolaferraro commented on pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
nicolaferraro commented on pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#issuecomment-861271682


   Thanks, can you check the conflicts?


-- 
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.

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



[GitHub] [camel-kamelets] claudio4j commented on pull request #123: Add AWS CloudWatch Kamelet

Posted by GitBox <gi...@apache.org>.
claudio4j commented on pull request #123:
URL: https://github.com/apache/camel-kamelets/pull/123#issuecomment-861035920


   @nicolaferraro can you review this kamelet ?


-- 
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.

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