yingjie@memoir
Skip to content

2026-05-28

Morning Plan

  • [ ] MoonBit Competition
    • [x] Compare MoonBit's OTel library with the official OTel implementation to see current progress
      • [x] Reasonix (DeepSeek V4 Flash MAX) says it already has the basic capability to build an industrial-grade observability SDK
    • [ ] Think about which instrumentation libraries MoonBit needs most
      • [ ] Agent observability?
    • [ ] Ask the maintainer responsible for observability at MoonBit which libraries they urgently need
  • [ ] Ask senior professionals in the observability field for good ways to get involved in the domain

Data Rescue

This morning, my computer threw an error during startup.

S.M.A.R.T Test Warning
... S.M.A.R.T Status is Bad. Place Backuop and Replace the device.

First, rescue the data: removed the hard drive, put it into an external enclosure, and copied out the important data.

Later, I tested it with a hard drive diagnostic tool, which reported serious issues.

This hard drive is a Kingston KC2500, bought in 2021—almost 5 years old. Many of my hard drives at home are around the same age, which reminded me that the lifespan of other drives might be nearing its end. I need to back up data ASAP.

While copying data, I ran into permission issues and fixed them using the takedown command. If there are too many files, the permission change takes a long time, so I only changed it for important data storage locations.

Loong: Enabling HTTPS for Loong Observability & OTel Collector

  1. Updated documentation, scripts, and configuration files
  2. Added custom client to support specifying a root CA

Adding HTTPS was simpler than I expected. Under deploy/observability:

  • generate-certs.sh: script to generate the root CA key pair and server key pair
  • certs/: stores the CA key pair and server key pair
  • docker-compose.yml: mounts for the OTel Collector
yaml
services:
  otel-collector:
    image: otel/opentelemetry-collector-contrib:latest
    volumes:
      - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
      # TLS certs (generated by generate-certs.sh)
      - ./certs/server.crt:/etc/certs/server.crt
      - ./certs/server.key:/etc/certs/server.key
  • otel-collector.yml: specifies the key pair files for the OTel Collector
yaml
receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318
        tls:
          cert_file: /etc/certs/server.crt
          key_file: /etc/certs/server.key
      grpc:
        endpoint: 0.0.0.0:4317

Before starting Loong, run the command export OTEL_CA_CERT_FILE=$(pwd)/certs/ca.pem in this directory to import the CA root certificate into the custom client.