Find

Discussion (0)1
Log in or sign up to continue
Question
· 7 hr ago

SQL - TOP/LIMIT/FETCH cause query to hang

Why do these clauses affect SQL performance?

select ID from some_table where row_status in ('I','U') order by ID limit 5 - makes the query infinite
select top 10 ID from some_table where row_status in ('I','U') order by ID - the same
select ID from some_table where row_status in ('I','U') order by ID - is fast

Actually there are no rows in the table having row_status 'I' or 'U'.

I asked Gemini and it recommended me rewrite the query as

11 new Comments
Discussion (11)3
Log in or sign up to continue
Article
· 7 hr ago 5m read

Observability for InterSystems IRIS with OpenTelemetry: Prometheus, Loki, Jaeger, and Tempo/Grafana

Modern platforms usually treat observability as three core signals:

  • Metrics
  • Logs
  • Traces

OpenTelemetry (OTel) is the standard way to produce and ship all three signals. This article explains a practical setup for InterSystems IRIS running in Docker Compose, with a full local observability stack:

  • Prometheus (metrics)
  • Loki (logs)
  • Tempo (traces, for Grafana Traces Drilldown)
  • Jaeger (optional, alternate trace viewer)
  • Grafana (unified UI)
  • OpenTelemetry Collector

What you’ll build

  • IRIS emits OTLP/HTTP telemetry to the OpenTelemetry Collector
  • Collector routes:
    • traces -> Tempo (for Grafana)/Jaeger (alternate trace UI)
    • metrics -> Prometheus
    • logs -> Loki
  • Grafana reads from Prometheus + Tempo + Jaeger + Loki and shows everything in one place

You can download the full working Docker Compose example here: https://github.com/isc-jyin/iris-otel-example

Prerequisites

  • Docker

Step-by-Step Guide

1. Create a folder structure

otel-minimal-config/
  iris/
    cpf-merge.cpf
  configs/
    otel-collector-config.yaml
    prometheus.yaml
    tempo.yaml
    grafana/
      provisioning/
        datasources/
          datasources.yaml
  docker-compose.yaml
  README.md
  README.pdf

2. Configure the OpenTelemetry Collector

The Collector is the router that receives OTLP from IRIS, then exports to each backend in the correct format. 

Create otel-collector-config.yaml:

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318
exporters:
  # export Metrics to Prometheus for viewing
  prometheus:
    endpoint: "0.0.0.0:8889"
  # export traces to Jaeger for viewing
  otlp/jaeger:
    endpoint: jaeger:4317
    tls:
      insecure: true
  otlphttp/loki:
    endpoint: "http://loki:3100/otlp"
    tls:
      insecure: true
  otlp/tempo:
    endpoint: tempo:4317
    tls:
      insecure: true
  debug:
    verbosity: detailed
processors:
  batch:
service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [prometheus]
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/loki, debug]
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp/jaeger, otlp/tempo, debug]

3. Configure Prometheus scraping

Prometheus scrapes metrics from an HTTP endpoint exposed by the Collector. It also stores metrics generated by Tempo.

Create prometheus.yaml:

scrape_configs:
  - job_name: 'otel-collector'
    scrape_interval: 10s
    static_configs:
      - targets: ['otel-collector:8889']
      - targets: ['otel-collector:8888']

4. Configure Tempo

Tempo is the trace backend that Grafana's Traces Drilldown needs. We also enable Tempo's metrics generator so Grafana can build metrics (rate/errors/duration) from traces. 

Create tempo.yaml:

server:
  http_listen_port: 3200
distributor:
  receivers:
    otlp:
      protocols:
        grpc:
          endpoint: "tempo:4317"
storage:
  trace:
    backend: local
    local:
      path: /tmp/tempo/traces
    wal:
      path: /tmp/tempo/wal
metrics_generator:
  registry:
    external_labels:
      source: tempo
      cluster: docker-compose
  storage:
    path: /var/tempo/generator/wal
    remote_write:
      - url: http://prometheus:9090/api/v1/write
        send_exemplars: true
  traces_storage:
    path: /var/tempo/generator/traces
overrides:
  defaults:
    metrics_generator:
      processors: [service-graphs, span-metrics, local-blocks] # enables metrics generator
      generate_native_histograms: both

5. Configure Grafana datasources

Grafana reads from Prometheus + Tempo + Jaeger + Loki and shows everything in one place

Create datasources.yaml:

apiVersion: 1
datasources:
- name: Loki
  type: loki
  access: proxy
  url: http://loki:3100
- name: Prometheus
  type: prometheus
  access: proxy
  url: http://prometheus:9090
  isDefault: true
- name: Jaeger
  type: jaeger
  access: proxy
  url: http://jaeger:16686
- name: Tempo
  type: tempo
  access: proxy
  url: http://tempo:3200

6. Enable OTel metrics and logs in IRIS

Create iris.cpf

[Monitor]
OTELMetrics=1
OTELLogs=1
OTELLogLevel=INFO

7. Create docker-compose.yaml

Compose starts everything consistently under the same network, so DNS names like tempo, loki, otel-collector work.

services:
  iris:
    image: containers.intersystems.com/intersystems/iris-community:2025.3
    environment:
    - ISC_CPF_MERGE_FILE=/iris/cpf-merge.cpf
    - OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
    - OTEL_EXPORTER_OTLP_TIMEOUT=500
    - OTEL_SERVICE_NAME=iris
    depends_on:
    - otel-collector
    volumes:
      - ./iris:/iris
  otel-collector:
    image: otel/opentelemetry-collector-contrib:0.143.0
    command: ["--config=/etc/otel-collector-config.yaml"]
    volumes:
      - ./configs/otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
  tempo:
    image: grafana/tempo:latest
    command: ["-config.file=/etc/tempo.yaml"]
    volumes:
      - ./configs/tempo.yaml:/etc/tempo.yaml:ro
    ports:
      - 3200
      - 4317
  loki:
    image: grafana/loki:latest
    ports:
      - 3100
  prometheus:
    image: prom/prometheus:v3.9.1
    volumes:
     - ./configs/prometheus.yaml:/etc/prometheus/prometheus.yml:ro
    ports:
      - "9090:9090"
  # Jaeger
  jaeger:
    image: jaegertracing/all-in-one:1.76.0
    ports:
      - "16686:16686"
      - 4317
    environment:
      - LOG_LEVEL=debug
  grafana:
    image: grafana/grafana:12.3.1
    environment:
      - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
      - GF_AUTH_ANONYMOUS_ENABLED=true
      - GF_AUTH_BASIC_ENABLED=false
      - GF_FEATURE_TOGGLES_ENABLE=traceqlEditor
    volumes:
      - ./configs/grafana/provisioning:/etc/grafana/provisioning:ro
    ports:
      - 3000:3000/tcp
    depends_on:
      - prometheus
      - loki
      - jaeger
  

8. Start the stack

Start the environment

docker compose up -d

Open a terminal session in the IRIS container:

docker compose exec iris iris session IRIS

Then run the built-in trace demo:

Do ##class(%Trace.Tracer).Test()

9. Viewing Results

Grafana - Traces + Metrics + Logs

Open http://localhost:3000/drilldown

Metrics:

Logs:

Traces:

Jaeger - Traces

Open http://localhost:16686

Prometheus - Metrics

Open http://localhost:9090

Discussion (0)1
Log in or sign up to continue
Question
· 8 hr ago

What is the way to see the latest executed SQL query?

Hi folks!

Is there any way to know the text of the SQL queries executed against the IRIS server?

My case: I have an SQL class query with a few parameters and and some combination of values causes unexpected results.

It'd be great if I could just copy the query from some log of queries done vs my IRIS the server. Cannot find it easily, though. Any advice?

5 new Comments
Discussion (5)2
Log in or sign up to continue
Question
· 8 hr ago

Challenges Facing Home-Based Care in Modern Healthcare

Home-based care has become a vital part of modern healthcare systems. As aging populations grow and healthcare costs rise, more individuals prefer receiving care in the comfort of their own homes rather than in hospitals or long-term care facilities. Home-based care supports independence, improves patient satisfaction, and reduces strain on institutional healthcare settings.

Despite its many advantages, home-based care faces several challenges that must be addressed to ensure quality, sustainability, and accessibility. Understanding these challenges is essential for healthcare providers, caregivers, policymakers, and support foundations working to strengthen home-based care services.

Workforce Shortages and Caregiver Burnout

One of the most significant challenges in home-based care is the shortage of qualified caregivers. The demand for home care aides continues to rise, yet recruitment and retention remain difficult.

Caregivers often face long hours, emotional stress, and physically demanding tasks. Without adequate support, training, and fair compensation, burnout becomes common. High turnover disrupts continuity of care and negatively affects patient outcomes.

Addressing workforce shortages requires investment in caregiver education, mental health support, and career development opportunities.

Limited Access to Training and Certification

Quality home-based care depends on skilled and knowledgeable caregivers. However, many caregivers lack access to affordable training programs and certification pathways.

Without proper education, caregivers may struggle to manage chronic conditions, mobility issues, or cognitive decline effectively. This gap in training can compromise care quality and patient safety.

Expanding education funding, certification programs, and caregiver scholarships is essential to strengthen the home-based care workforce.

Financial Barriers and Funding Gaps

Home-based care can be cost-effective in the long term, but financial barriers still limit access for many families. Insurance coverage, reimbursement policies, and out-of-pocket costs vary widely.

Caregivers may also face financial strain due to low wages, unpaid caregiving responsibilities, or lack of benefits. These financial challenges affect both caregivers and care recipients.

Sustainable funding models and financial assistance programs are needed to ensure equitable access to home-based care.

Coordination and Communication Challenges

Home-based care often involves multiple stakeholders, including caregivers, healthcare providers, family members, and social service organizations. Poor coordination and communication can lead to fragmented care.

Without clear care plans and information sharing, patients may experience gaps in treatment, medication errors, or inconsistent support.

Improving care coordination through digital tools, standardized protocols, and collaborative care models can enhance efficiency and outcomes.

Technology and Digital Divide

Technology plays an increasing role in home-based care, from remote monitoring to telehealth services. However, not all patients or caregivers have access to or familiarity with digital tools.

Older adults may struggle with technology use, while caregivers may lack training in digital health systems. Limited internet access in some regions further widens the gap.

Bridging the digital divide requires user-friendly solutions, training programs, and infrastructure investment.

Emotional and Social Isolation

While home-based care allows individuals to remain in familiar environments, it can also lead to social isolation. Reduced social interaction affects both patients and caregivers.

Caregivers working alone may feel disconnected from peers, while older adults may experience loneliness without regular engagement.

Caregiver communities, peer support networks, and community-based programs play a crucial role in addressing emotional well-being.


Regulatory and Policy Challenges

Home-based care operates within complex regulatory frameworks that vary by region. Inconsistent policies, licensing requirements, and reimbursement rules can create barriers for providers and caregivers.

Clear, supportive policies are needed to promote quality standards, protect caregivers, and expand access to home-based care services.

The Path Forward for Home-Based Care

Overcoming these challenges requires collaboration across healthcare systems, nonprofit organizations, and policymakers. Investing in caregiver education, mental health support, fair compensation, and community networks is critical.

By addressing workforce, financial, technological, and emotional challenges, home-based care can continue to grow as a sustainable and compassionate healthcare solution.

Frequently Asked Questions (FAQs)

1. Why is home-based care becoming more important in modern healthcare?
Home-based care supports aging populations, reduces hospital overcrowding, and allows individuals to receive care in familiar environments.

2. What are the biggest challenges facing home-based care today?
Workforce shortages, limited training, financial barriers, care coordination issues, and caregiver burnout are major challenges.

3. How does caregiver burnout affect home-based care quality?
Burnout leads to high turnover, reduced care consistency, and lower quality outcomes for patients.

4. Can technology improve home-based care?
Yes, but only if caregivers and patients have access, training, and user-friendly digital tools.

5. How can organizations support sustainable home-based care?
By investing in caregiver education, mental health support, fair wages, and strong community support networks.

Discussion (0)1
Log in or sign up to continue