Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

ペパボOpenTelemetry革命

 ペパボOpenTelemetry革命

社内のイベントでお話しました

Kazuhiko Yamashita

May 09, 2024
Tweet

More Decks by Kazuhiko Yamashita

Other Decks in Programming

Transcript

  1. MackerelͱPrometheus Mackerel Prometheus ຊ൪αʔόͷVM Managed Service Kubernetes Control Plane ࣾ಺αʔϏεͷVM

    Kubernetes Node Monitor Servers OpenTelemetryਪਐલ ֎ܗ؂ࢹ ϓϥΠϕʔτΫϥ΢υͷHW
  2. MackerelͱPrometheus Mackerel Prometheus ຊ൪αʔόͷVM Managed Service Kubernetes Control Plane ࣾ಺αʔϏεͷVM

    Kubernetes Node Monitor Servers Otel CollecotrΛ͍ΕΔͳΒɺ͜͏ͨ͠΄͏͕ແବ͕ͳ͍ ֎ܗ؂ࢹ ϓϥΠϕʔτΫϥ΢υͷHW ຊ൪αʔόͷVM
  3. ίϯϙʔωϯτ VM k8s Metrics ̋ ̋ Trace ̋ ̋ Log

    ˚ ˚ OpenTelemetryಋೖঢ়گ ̋ϓϩμΫγϣϯͰಋೖࡁΈ ˚લճ.FFUVQͰ࿩ͨ͠ͱ͖ΑΓਐḿ
  4. Metrics ϗετͷϦιʔε͸hostmetricsͰऔಘ ɹVM͸ͦΕͧΕotel collectorΛΠϯετʔϧ ɹk8s͸DaemonSetͰ/Λmount receivers: hostmetrics: collection_interval: 1m scrapers:

    cpu: metrics: system.cpu.utilization: enabled: true load: metrics: system.cpu.load_average.1m: enabled: true system.cpu.load_average.5m: enabled: true system.cpu.load_average.15m: ...
  5. Metrics 4%,Λར༻ͯ͠ϝτϦΫεΛܭ૷͍ͯ͠Δ https://ten-snapon.com/archives/2983 if req.Method == http.MethodPost && strings.Contains(req.RequestURI, “cartin")){

    if err == nil && res.StatusCode >= 200 && res.StatusCode < 300 { r.successCounter.Add(context.Background(), metric.WithAttributes(semconv.HostName(requestURL.Host))) } else { r.failCounter.Add(context.Background(), 1, metric.WithAttributes(semconv.HostName(requestURL.Host))) } }
  6. Log