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

# Socket

> Ingest logs from a local Unix domain socket.

The **Socket source** allows Tangent to consume logs from a local Unix domain socket (UDS).\
This is the simplest way to connect local producers (e.g. agents, sidecars, or log forwarders) directly to Tangent.

***

## Schema

<ParamField path="socket_path" type="string" required>
  Path to the Unix domain socket used for ingestion.\
  Defaults to `/tmp/sidecar.sock`.
</ParamField>

***

## Example

```yaml tangent.yaml icon=plug theme={null}
sources:
  socket_main:
    type: socket
    socket_path: "/tmp/sidecar.sock"
    decoding:
      format: ndjson
      compression: auto
```

***

## Behavior

* Tangent listens on the provided socket path and accepts connections from any local producer process.
* Producers can write NDJSON or JSON payloads to the socket — Tangent decodes them according to the configured `decoding` section.
* When the source closes, Tangent flushes any buffered messages before shutdown.

***

## Common Use Cases

| Use Case                 | Example                                                               |
| ------------------------ | --------------------------------------------------------------------- |
| Local log forwarder      | An app writes logs to `/tmp/sidecar.sock` instead of stdout           |
| Sidecar integration      | Send structured logs from a container to Tangent                      |
| Testing and benchmarking | Use the Tangent CLI to `bench` or `run` against a local socket source |

***

## See also

* [Decoding](/configuration/sources/decoding)
* [MSK Source](/configuration/sources/msk)
* [SQS Source](/configuration/sources/sqs)
* [DAG configuration](/configuration/dag)
