---
title: Internal Metrics
slug: telemetry-pipeline/internal-metrics
docTags: 
createdAt: 2025-04-21T00:45:47.553Z
---

# Internal Metrics Source

Access and process metrics produced by worker itself within the same worker pipeline.

This source exposes worker's internal operational metrics, enabling you to collect, transform, and route them like any other metrics signal. It is commonly used for self-observability, health monitoring, and pipeline performance analysis.

## Key Characteristics

**Status:** Stable
&#x20;**Roles:** Aggregator, Daemon, Sidecar
&#x20;**Delivery:** At-least-once
&#x20;**Acknowledgements:** Not supported
&#x20;**Egress Mode:** Batch
&#x20;**State:** Stateless
&#x20;**Outputs:** Metrics

## Ingestion Model

- Worker periodically samples its own internal state&#x20;
- Metrics are generated in-memory&#x20;
- Collected metrics are emitted into the pipeline as standard metric events&#x20;
- Metrics can be filtered, enriched, aggregated, or exported using normal worker components&#x20;

This source enables self-monitoring without requiring an external scraper.

## Source Configuration Parameters

## sources.\<id>.type

**required**
&#x20;**string**

Specifies the source type.

- Must be set to internal\_metrics&#x20;

## sources.\<id>.namespace

**optional**
&#x20;**string**

Overrides the default namespace applied to emitted metrics.

- Useful for avoiding naming collisions&#x20;
- Enables alignment with organizational metric naming standards&#x20;



## sources.\<id>.scrape\_interval\_secs

**optional**
&#x20;**float**

Interval, in seconds, at which worker collects and emits its internal metrics.

- Lower values increase metric resolution&#x20;
- Higher values reduce overhead&#x20;

This setting directly impacts:

- Metric freshness&#x20;
- CPU and memory overhead&#x20;

**Default**

:::BlockQuote
1.0
:::

## Tag Configuration

Controls automatic tag enrichment for emitted metrics.

## sources.\<id>.tags

**optional**
&#x20;**object**

Defines tag-related behavior for the internal metrics source.

### sources.\<id>.tags.host\_key

**optional**
&#x20;**string**

Overrides the tag name used to attach the peer host address to each metric.

- The value contains the peer address including port (e.g. 1.2.3.4:9000)&#x20;
- By default, the global log\_schema.host\_key is used&#x20;

Special behavior:

- Set to an empty string ("") to suppress this tag entirely&#x20;

### sources.\<id>.tags.pid\_key

**optional**
&#x20;**string**

Defines the tag name used to attach the current process ID (PID) to each metric.

- Useful for debugging multi-process or sidecar deployments&#x20;
- Not enabled by default&#x20;

If unset, the PID tag is not added.

## Metric Categories

The internal metrics source emits metrics covering:

- Pipeline throughput and latency&#x20;
- Component-level event counts&#x20;
- Error and drop counters&#x20;
- Buffer usage&#x20;
- Backpressure indicators&#x20;
- Resource utilization related to worker internals&#x20;

These metrics reflect worker real-time operational health.

## Reliability Characteristics

- Metrics are generated locally&#x20;
- No external dependencies&#x20;
- Stateless emission model&#x20;
- Batch-oriented export&#x20;
- No acknowledgement semantics&#x20;

This design prioritizes low overhead and continuous visibility.

## Deployment Patterns

The internal metrics source can be used in:

- Central aggregators&#x20;
- Per-node daemons&#x20;
- Sidecar deployments&#x20;
- Edge collectors&#x20;

It adapts automatically to the deployment role.

## Common Use Cases

- Monitoring worker pipeline health&#x20;
- Detecting backpressure and bottlenecks&#x20;
- Observing ingestion and delivery rates&#x20;
- Exporting worker metrics to Prometheus, OTLP, or other backends&#x20;
- Building dashboards for telemetry infrastructure itself&#x20;
