agentsclimarketplace

Error state tracking across microservices

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v1/skills/error-state-tracking-across-microservices

Use when building or maintaining a system that fetches metadata from multiple independent external web services and needs to diagnose why annotation runs fail or slow down. Use it specifically when you need to distinguish between service-level failures (e.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill error-state-tracking-across-microservices

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

8.4 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

error-state-tracking-across-microservices

Summary

Monitor the availability, error state, and latency of multiple external web services (CIR, CTS, PubChem, IDSM, BridgeDb) used during asynchronous annotation runs in MSMetaEnhancer by implementing a centralized Monitor class that aggregates per-service health metrics and produces timestamped JSON reports.

When to use

Apply this skill when building or maintaining a system that fetches metadata from multiple independent external web services and needs to diagnose why annotation runs fail or slow down. Use it specifically when you need to distinguish between service-level failures (e.g., one converter is down) versus client-side or logic errors, or when you want to audit the availability and performance of dependent services over time.

When NOT to use

  • Input is a single, monolithic converter or local library (not a distributed set of external web services).
  • Real-time response is required but asynchronous health-check latency is unacceptable.
  • The external services do not expose HTTP endpoints or status codes (e.g., file-based or in-process converters).

Inputs

  • web service endpoint URLs for CIR, CTS, PubChem, IDSM, and BridgeDb
  • HTTP request/response logs from WebConverter instances during annotation runs
  • health-check probe configuration (interval, timeout thresholds)

Outputs

  • JSON status report with timestamp, per-service metrics (availability %, total errors, mean latency), and overall health state
  • structured error logs routed from WebConverter to Monitor
  • per-service state tracker objects (uptime, error counts, latency records)

How to apply

Design a Monitor class that registers all five web services (CIR, CTS, PubChem, IDSM, BridgeDb) and initializes per-service state trackers recording uptime, error counts, and latency. Implement asynchronous health-check methods that probe each web converter's endpoint and record HTTP status codes and response times at configurable intervals. Attach error-logging callbacks to the WebConverter base class to capture failed requests (timeouts, invalid responses, API errors) and route them to the Monitor for aggregation. At each reporting interval, compute per-service metrics including availability percentage (uptime / total checks), total error count, and mean latency. Serialize the aggregated status to a JSON report file with timestamp, per-service summary (e.g., availability %, errors, mean latency in ms), and overall health state (pass/fail). The rationale is that asynchronous annotation relies on multiple external dependencies; without centralized error tracking, individual converter failures remain invisible until annotation completion, making debugging difficult.

Related tools

Examples

monitor = Monitor(services=['CIR', 'CTS', 'PubChem', 'IDSM', 'BridgeDb']); monitor.register_error_callback(web_converter); asyncio.run(monitor.health_check(interval=60)); monitor.aggregate_metrics(); monitor.export_report('service_status.json')

Evaluation signals

  • Verify that the JSON report file contains all five registered services (CIR, CTS, PubChem, IDSM, BridgeDb) in the per-service summary.
  • Confirm that availability percentage is between 0 and 100 and that total error count and mean latency are non-negative integers or floats.
  • Check that the report timestamp is present and that health-check probes have been executed at the expected interval.
  • Validate that error counts logged to Monitor from WebConverter callbacks match the errors recorded in per-service state trackers.
  • Confirm that a service marked as unavailable (e.g., 0% availability) has zero successful responses in its latency record.

Limitations

  • Monitor health checks depend on network connectivity; transient network partitions or DNS failures may incorrectly report service unavailability.
  • Per-service metrics (availability %, latency) are aggregated at fixed intervals and do not capture real-time fluctuations or per-request granularity.
  • The health-check mechanism does not validate the semantic correctness of converter responses; a service may return a 200 status code but invalid or malformed data.
  • Availability percentage is computed from health-check probes, not from actual annotation requests; probe failures may not correlate with annotation job failures.

Evidence

  • [other] MSMetaEnhancer fetches metadata from five external web services: CIR, CTS, PubChem, IDSM, and BridgeDb, using an asynchronous implementation for the annotation process.: "MSMetaEnhancer fetches metadata from five external web services: CIR, CTS, PubChem, IDSM, and BridgeDb, using an asynchronous implementation for the annotation process."
  • [other] Implement asynchronous service health-check methods that probe each web converter's endpoint and record HTTP status codes and response times.: "Implement asynchronous service health-check methods that probe each web converter's endpoint and record HTTP status codes and response times."
  • [other] Add error-logging callbacks to the WebConverter base class to capture failed requests (timeouts, invalid responses, API errors) and route them to Monitor for aggregation.: "Add error-logging callbacks to the WebConverter base class to capture failed requests (timeouts, invalid responses, API errors) and route them to Monitor for aggregation."
  • [other] Create a status-aggregation method that computes per-service metrics (availability percentage, total errors, mean latency) at configurable intervals.: "Create a status-aggregation method that computes per-service metrics (availability percentage, total errors, mean latency) at configurable intervals."
  • [other] Serialize the aggregated status to a JSON report file with timestamp, per-service summary, and overall health state.: "Serialize the aggregated status to a JSON report file with timestamp, per-service summary, and overall health state."
  • [readme] The app uses asynchronous implementation of annotation process allowing for optimal fetching speed.: "The app uses asynchronous implementation of annotation process allowing for optimal fetching speed."

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.