การเฝ้าติดตามที่ขับเคลื่อนด้วยคำอธิบายประกอบ — คำอธิบายประกอบเดียว หลายส่วนประกอบ
ตัวอย่างfeatures: ต่อfeatures.annotations ของ Manifest เป็นการcore/prometheus-exporter บน
นี่
รูปทรง
- เจตนา
ของ นัก พัฒนา (Developer) ( aggregate.yaml) ประกาศเพียง ส่วน ประกอบ example/compute/serviceหกรายการ ได้แก่ gatewayและapi/worker/ledger/etl/reconcileไม่มีส่วน ประกอบ ใดมี บล็อก features:สำหรับการ เฝ้า ติดตาม - Manifest (
manifest.yaml) ผูกคำ อธิบาย ประกอบ กับ Feature: features:type:core/prometheus-exporter: helm/prometheus-exporter:1.0.0 # the FeatureRecipe version bindingannotations:feature.aggrega.ai/monitoring:feature: core/prometheus-exportermaps:infra: [interval, port, path] # structured-value subkeys → the feature's infra - Release (
release.yaml) ตั้งคำ อธิบาย ประกอบ หนึ่ง ครั้ง บน แนว เขต platformและปรับ แต่ง ต่อ ซับทรี: platform:annotations:feature.aggrega.ai/monitoring: {interval: 30s, port: metrics, path: /metrics} # gateway inherits thisboundaries:payments:annotations:feature.aggrega.ai/monitoring: {interval: 15s} # api/worker/ledgerbatch:annotations:feature.aggrega.ai/monitoring: {interval: 120s} # etl/reconcile
core/prometheus-exporter และ FeatureRecipe ของ ServiceMonitor ในmonitoring.coreos.com/v1 หนึ่งinterval/port/path ผ่านinfra ของ Feature (นี่source: + valuesMapping: ที่
ร่างตัวอย่าง
คุณ
เขียน
aggrega draft --example annotation-driven-monitoringจาก
cd annotation-driven-monitoringบิลด์
การ pull หา
aggrega pull --release release.yamlaggrega build --release release.yamlกับผู้ช่วย AI
ผู้
ใช้เครื่องมือของ Aggrega เท่านั้น และอย่าสร้างโฟลเดอร์เอง หากโฟลเดอร์ของพื้นที่ทำงานยังไม่มีโฟลเดอร์ `annotation-driven-monitoring` เรียกเครื่องมือ `draft` หนึ่งครั้งโดยตั้ง `example` เป็น `annotation-driven-monitoring` และไม่ระบุ `dir`: เครื่องมือจะเขียนตัวอย่างลงในโฟลเดอร์ `annotation-driven-monitoring` ใหม่ จากนั้นเรียกเครื่องมือ `build` โดยตั้ง `workspace_root` เป็น `annotation-driven-monitoring` ตั้ง `release` เป็น `release.yaml` ตั้ง `auto_pull` เป็น true และตั้ง `write` เป็น true แล้วบอกฉันว่าบิลด์เขียนไฟล์ใดบ้าง ไฟล์เหล่านั้นอยู่ใต้ `annotation-driven-monitoring/dist/`สิ่งที่เอาต์พุตที่เรนเดอร์พิสูจน์
หาdist/<boundary>/helm/<component>--feature-zdaggrega-zdai-zsmonitoring--<component>-servicemonitor-<component>-scrape.yaml:
aggrega pull --release release.yamlaggrega build --release release.yamlชื่อfeature.aggrega.ai/monitoring จุด-z กับ-zd แทน-zs แทนapi ในpayments บิลด์
dist/payments/helm/api--feature-zdaggrega-zdai-zsmonitoring--api-servicemonitor-api-scrape.yamlการ
ตัวอย่างcore/prometheus-exporter และ FeatureRecipe ของ ServiceMonitor (พร้อมhelm) จาก ไลบรารีexample/compute/service และ Recipe ของexample/ ควบคู่.aggrega-config.yaml ของhub.aggrega.ai เป็น--catalog
| Component | แนว | interval | port | path |
|---|---|---|---|---|
gateway | platform | 30s (ค่า | metrics | /metrics |
api / worker / ledger | payments | 15s (ค่าที่ | metrics | /metrics |
etl / reconcile | batch | 120s (ค่าที่ | metrics | /metrics |
ตาราง
- ขับ
เคลื่อน Aggregate ไม่มีด้วย คำ อธิบาย ประกอบ ไม่ใช่ ประกาศ โดย ผู้ เขียน features:สำหรับการ เพียง เพราะเฝ้า ติดตาม ที่ ใด เลย แต่ ServiceMonitor หก รายการ เรนเดอร์ ออก มา ServiceMonitor เหล่า นั้น มี อยู่ คำ อธิบาย ประกอบ ขยาย core/prometheus-exporterไปบน แต่ละ ส่วน ประกอบ ( originของการ แนบ ใน กราฟ บิลด์ คือ annotationไม่ใช่explicit) - การ
ผสาน แบบ ลึก ต่อ คีย์ ย่อย paymentsและbatchตั้งเพียง intervalแต่ ServiceMonitor ของทั้ง สอง มี port: metricsและpath: /metricsซึ่งสืบทอด จาก ค่าที่ มี โครงสร้าง ของ คำ อธิบาย ประกอบ platform ที่ ผสาน ต่อ คีย์ ย่อย ซับทรี แทนที่ หนึ่ง ฟิลด์ ขณะ สืบทอด ฟิลด์ ที่ อยู่ ระดับ เดียวกัน - การ
กระจาย เฝ้าออก ติดตาม เพียงส่วน ประกอบ หก รายการ จาก คำ อธิบาย ประกอบ platform รายการ บวกเดียว การ สองแทนที่ แบบ บรรทัด เดียว รายการ โดยไม่มี บล็อก features:ซ้ำต่อ ส่วน ประกอบ
ServiceMonitor scrape พอร์ต ที่metrics ของ Service (Service ที่metrics: 9090) ดังport: metrics ของ
ขณะคอมไพล์เทียบกับขณะรัน
นี่dist/ port ของ ServiceMonitor อ้างอิง
บิลด์