Gcp Notes/gcp cloudevents: Difference between revisions

From Federal Burro of Information
Jump to navigationJump to search
(Created page with " You can use gcp cloud funtions to eat gcp logging events. gcp logging -----> gcp eventarc --> gcp cloud functions ( lots of data ) ( filter on _this_ event) ( run _this_ code ) The hardest part for me is how to handle different types of events. the cloud event object has a property called payload, but is that an object ? or a dict? the cloud event object can be treated as a dist, cloudevent['field'] References: https://medium.com/google-cloud...")
 
No edit summary
 
Line 1: Line 1:
== Intro ==


You can use gcp cloud funtions to eat gcp logging events.
You can use gcp cloud funtions to eat gcp logging events.
Line 11: Line 13:
the cloud event object can be treated as a dist, cloudevent['field']  
the cloud event object can be treated as a dist, cloudevent['field']  


References:
== References ==


https://medium.com/google-cloud/using-cloud-events-and-cloud-events-generator-4b71b8a90277
https://medium.com/google-cloud/using-cloud-events-and-cloud-events-generator-4b71b8a90277
; sample code for event log:
: https://cloud.google.com/functions/docs/samples/functions-log-cloudevent

Latest revision as of 00:03, 10 November 2022

Intro

You can use gcp cloud funtions to eat gcp logging events.

gcp logging -----> gcp eventarc              --> gcp cloud functions
( lots of data )   ( filter on _this_ event)     ( run _this_ code )

The hardest part for me is how to handle different types of events.

the cloud event object has a property called payload, but is that an object ? or a dict?

the cloud event object can be treated as a dist, cloudevent['field']

References

https://medium.com/google-cloud/using-cloud-events-and-cloud-events-generator-4b71b8a90277


sample code for event log
https://cloud.google.com/functions/docs/samples/functions-log-cloudevent