Skip to content

add metrics + per-runtime layer variants - #4

Open
mmosarafO2 wants to merge 1 commit into
mainfrom
feature/metrics-and-multi-runtime
Open

add metrics + per-runtime layer variants#4
mmosarafO2 wants to merge 1 commit into
mainfrom
feature/metrics-and-multi-runtime

Conversation

@mmosarafO2

Copy link
Copy Markdown
Contributor
  • Metrics: OTLP receiver now handles /v1/metrics alongside /v1/traces; new src/enhanced_metrics.rs synthesizes aws.lambda.enhanced.{duration, billed_duration, init_duration, restore_duration, memory_size, max_memory_used, memory_utilization, invocations, errors, timeouts, out_of_memory, cold_starts} from Telemetry API platform.report events. Datadog Lambda Enhanced Metrics parity, all runtimes, no code change.
  • Optional O2_EMIT_BASE_ALIASES=true also emits aws.lambda.{duration, errors, invocations} so Datadog-shaped dashboards render without a separate CloudWatch Metric Streams ingest.
  • gzip outbound bodies (logs + OTLP) via new src/compress.rs.
  • Preserve OTLP Content-Type end-to-end (protobuf pass-through).
  • otel-instrument: runtime-aware; detects nodejs / python / java from AWS_EXECUTION_ENV and wires the corresponding SDK loader. Lambda-tuned defaults: OTEL_METRICS_EXPORTER=otlp, OTLP protocol http/protobuf, OTEL_METRIC_EXPORT_INTERVAL=1000, OTEL_BSP_SCHEDULE_DELAY=500.
  • build.sh: per-runtime (node/python/java/core) x per-arch (x86_64/arm64) variants. Backward-compat alias o2-lambda-extension-.zip -> node bundle. New `./build.sh repackage` skips the Rust rebuild.
  • deploy.sh rewritten: publishes openobserve-extension--
    per variant with correct compatible-runtimes; DEPLOY_LEGACY_ALIAS=1 keeps publishing the pre-variant name for backward compatibility.
  • Bugfixes: log-flush errors no longer block span/metric flush in either sync or async path; request_id fallback to record.requestId for platform.report; async flush wrapper timeout raised 500ms -> 3s; HTTP client timeout now honors O2_REQUEST_TIMEOUT_MS everywhere.
  • README overhauled: signals table, per-runtime variants, enhanced metrics reference, ESM caveat, Datadog coverage comparison, testing tiers.

- Metrics: OTLP receiver now handles /v1/metrics alongside /v1/traces;
  new src/enhanced_metrics.rs synthesizes aws.lambda.enhanced.{duration,
  billed_duration, init_duration, restore_duration, memory_size,
  max_memory_used, memory_utilization, invocations, errors, timeouts,
  out_of_memory, cold_starts} from Telemetry API platform.report events.
  Datadog Lambda Enhanced Metrics parity, all runtimes, no code change.
- Optional O2_EMIT_BASE_ALIASES=true also emits aws.lambda.{duration,
  errors, invocations} so Datadog-shaped dashboards render without a
  separate CloudWatch Metric Streams ingest.
- gzip outbound bodies (logs + OTLP) via new src/compress.rs.
- Preserve OTLP Content-Type end-to-end (protobuf pass-through).
- otel-instrument: runtime-aware; detects nodejs / python / java from
  AWS_EXECUTION_ENV and wires the corresponding SDK loader. Lambda-tuned
  defaults: OTEL_METRICS_EXPORTER=otlp, OTLP protocol http/protobuf,
  OTEL_METRIC_EXPORT_INTERVAL=1000, OTEL_BSP_SCHEDULE_DELAY=500.
- build.sh: per-runtime (node/python/java/core) x per-arch
  (x86_64/arm64) variants. Backward-compat alias
  o2-lambda-extension-<arch>.zip -> node bundle. New \`./build.sh
  repackage\` skips the Rust rebuild.
- deploy.sh rewritten: publishes openobserve-extension-<runtime>-<arch>
  per variant with correct compatible-runtimes; DEPLOY_LEGACY_ALIAS=1
  keeps publishing the pre-variant name for backward compatibility.
- Bugfixes: log-flush errors no longer block span/metric flush in
  either sync or async path; request_id fallback to record.requestId
  for platform.report; async flush wrapper timeout raised 500ms -> 3s;
  HTTP client timeout now honors O2_REQUEST_TIMEOUT_MS everywhere.
- README overhauled: signals table, per-runtime variants, enhanced
  metrics reference, ESM caveat, Datadog coverage comparison, testing
  tiers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant