> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Recap When to Use What

> Overview of OpenTelemetry Collector diagnostic endpoints and when to use metrics, health checks, zPages, and pprof for operational visibility and performance troubleshooting

Quickly review the diagnostic endpoints built into the OpenTelemetry Collector and when to use each. These tools help with operational visibility, orchestration readiness, live component inspection, and deep runtime profiling.

We have four main endpoints for troubleshooting the Collector:

* Metrics: operational visibility and ingestion verification.
* Health check: simple heartbeat for orchestration Liveness/Readiness checks.
* zPages: live, in-browser component views for interactive debugging.
* pprof: advanced Go runtime profiles (CPU, memory, contention).

Metrics validate that data is being received and delivered to backends. They reveal ingestion/delivery patterns and surface internal resource usage trends inside the Collector.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/BBtH5GyNI0zR7M4h/images/Prep-Course-OpenTelemetry-Certified-Associate-OTCA-Certification/OpenTelemetry-Collector-Debugging-Operations-and-Scaling/Recap-When-to-Use-What/metrics-tools-ingestion-comparison-diagram.jpg?fit=max&auto=format&n=BBtH5GyNI0zR7M4h&q=85&s=e41a065c5f7c93292f3a443a0d64448f" alt="The image compares different metrics and tools for tracking and ingestion, like &#x22;Metrics,&#x22; &#x22;Health Check,&#x22; &#x22;zPages,&#x22; and &#x22;pprof,&#x22; with numbers beside each. There are options related to &#x22;Enable and track ingestion,&#x22; &#x22;Delivery,&#x22; and &#x22;Resource Usage.&#x22;" width="1920" height="1080" data-path="images/Prep-Course-OpenTelemetry-Certified-Associate-OTCA-Certification/OpenTelemetry-Collector-Debugging-Operations-and-Scaling/Recap-When-to-Use-What/metrics-tools-ingestion-comparison-diagram.jpg" />
</Frame>

Health check endpoints are primarily for orchestration systems (Kubernetes, Nomad, etc.). Use them during rollouts, restarts, or whenever the orchestrator needs a simple OK/Not-OK probe to manage lifecycle operations.

zPages provides quick, live, in-browser views of what Collector components are doing. Use zPages for hands-on troubleshooting when you want to inspect component internals without attaching debuggers or altering configuration.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/BBtH5GyNI0zR7M4h/images/Prep-Course-OpenTelemetry-Certified-Associate-OTCA-Certification/OpenTelemetry-Collector-Debugging-Operations-and-Scaling/Recap-When-to-Use-What/metrics-health-check-zpages-pprof-screenshot.jpg?fit=max&auto=format&n=BBtH5GyNI0zR7M4h&q=85&s=a48b80444954c0efa32486f44affc4cb" alt="The image is a screenshot showing different components with associated ports, specifically &#x22;Metrics (8888),&#x22; &#x22;Health Check (13133),&#x22; &#x22;zPages (55679),&#x22; and &#x22;pprof (1777).&#x22; The &#x22;zPages&#x22; component is highlighted, with a note about live, in-browser component views." width="1920" height="1080" data-path="images/Prep-Course-OpenTelemetry-Certified-Associate-OTCA-Certification/OpenTelemetry-Collector-Debugging-Operations-and-Scaling/Recap-When-to-Use-What/metrics-health-check-zpages-pprof-screenshot.jpg" />
</Frame>

pprof is for advanced investigations: capture CPU profiles, inspect heap allocations, and analyze mutex contention. Use pprof when you suspect performance bottlenecks or need to profile under realistic load.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/BBtH5GyNI0zR7M4h/images/Prep-Course-OpenTelemetry-Certified-Associate-OTCA-Certification/OpenTelemetry-Collector-Debugging-Operations-and-Scaling/Recap-When-to-Use-What/pprof-when-to-use-diagram.jpg?fit=max&auto=format&n=BBtH5GyNI0zR7M4h&q=85&s=2ee9200b33126199a5c5715086b8ac9e" alt="The image is a diagram titled &#x22;pprof — When to Use,&#x22; showing four sections: Metrics, Health Check, zPages, and pprof, each with a port number. Below pprof, there are options for CPU, Memory, and Contention analysis." width="1920" height="1080" data-path="images/Prep-Course-OpenTelemetry-Certified-Associate-OTCA-Certification/OpenTelemetry-Collector-Debugging-Operations-and-Scaling/Recap-When-to-Use-What/pprof-when-to-use-diagram.jpg" />
</Frame>

Below is a concise example Collector configuration showing where to enable these diagnostic extensions and how to expose the Collector’s own Prometheus metrics for scraping. Note that metrics are configured under `service.telemetry.metrics`, while health check, pprof, and zPages are configured as extensions and then referenced under `service.extensions`.

```yaml theme={null}
extensions:
  health_check:
    endpoint: "0.0.0.0:13133"    # GET http://localhost:13133/ -> 200 OK when healthy
  pprof:
    endpoint: "0.0.0.0:1777"     # http://localhost:1777/debug/pprof/
  zpages:
    endpoint: "0.0.0.0:55679"    # http://localhost:55679/debug/servicez/

receivers:
  otlp:
    protocols:
      http:
        endpoint: "0.0.0.0:4318"  # matches your load generator defaults

processors:
  batch: {}

exporters:
  debug:
    verbosity: detailed          # if this errors in your build, use: debug: {}

service:
  telemetry:
    metrics:
      # optional level: basic | normal | detailed
      level: normal
    readers:
      - pull:
          exporter:
            prometheus:
              host: "0.0.0.0"
              port: 8888               # Prometheus scrape at http://localhost:8888/metrics

extensions: [health_check, pprof, zpages]

pipelines:
  traces:
    receivers: [otlp]
    processors: [batch]
    exporters: [debug]
```

<Callout icon="lightbulb" color="#1CB2FE">
  pprof is powerful but advanced. Use it when you need CPU or memory profiles to diagnose performance bottlenecks. For day-to-day checks, rely on metrics, health checks, and zPages.
</Callout>

Below is a quick reference table for these endpoints and when to use them:

|     Endpoint |   Port  | Purpose                                        | Typical Use                                                      |
| -----------: | :-----: | ---------------------------------------------- | ---------------------------------------------------------------- |
|      Metrics |  `8888` | Prometheus-compatible operational metrics      | Validate ingestion and delivery patterns; monitor resource usage |
| Health check | `13133` | Liveness/readiness heartbeat                   | Orchestration probes during rollouts and restarts                |
|       zPages | `55679` | In-browser component insights                  | Live troubleshooting of component internals without a debugger   |
|        pprof |  `1777` | Go runtime profiling (CPU, memory, contention) | Deep performance analysis under load                             |

Links and references:

* OpenTelemetry Collector diagnostics overview (conceptual)
* Advanced Golang profiling: [https://learn.kodekloud.com/user/courses/advanced-golang](https://learn.kodekloud.com/user/courses/advanced-golang)
* Prometheus basics and scraping: [https://learn.kodekloud.com/user/courses/prep-course-prometheus-certified-associate-pca-certification](https://learn.kodekloud.com/user/courses/prep-course-prometheus-certified-associate-pca-certification)

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/BBtH5GyNI0zR7M4h/images/Prep-Course-OpenTelemetry-Certified-Associate-OTCA-Certification/OpenTelemetry-Collector-Debugging-Operations-and-Scaling/Recap-When-to-Use-What/wrap-up-slide-metrics-health-zpages-pprof.jpg?fit=max&auto=format&n=BBtH5GyNI0zR7M4h&q=85&s=f0ed138b7ee03cd634f7aa15b8a682b3" alt="The image shows a &#x22;Wrap Up&#x22; slide with four sections: Metrics 8888, Health 13133, zPages 55679, and pprof 1777, each with related features like built-in metrics, heartbeat signal, in-browser view, and live debug." width="1920" height="1080" data-path="images/Prep-Course-OpenTelemetry-Certified-Associate-OTCA-Certification/OpenTelemetry-Collector-Debugging-Operations-and-Scaling/Recap-When-to-Use-What/wrap-up-slide-metrics-health-zpages-pprof.jpg" />
</Frame>

That wraps up this topic.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/prep-course-opentelemetry-certified-associate-certification-otca/module/9c72c1a7-4e0b-4541-8811-755843e69659/lesson/1aa0f7c7-0925-4936-bccc-608de6aa3a8d" />
</CardGroup>
