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

# Webhookevent

> OpenTelemetry receiver for Webhookevent

# Webhookevent Receiver

![Status](https://img.shields.io/badge/status-beta-yellow)

**Available in:** `contrib`

**Maintainers:** [@atoulme](https://github.com/atoulme), [@shalper2](https://github.com/shalper2)

**Source:** [opentelemetry-collector-contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/webhookeventreceiver)

## Supported Telemetry

![Logs](https://img.shields.io/badge/logs-beta-blue)

## Overview

## Configuration

> **Note:** This receiver was renamed from `webhookevent` to `webhook_event` to match the snake\_case naming convention.
> The deprecated component type `webhookevent` is still accepted as an alias and will log a deprecation warning.

The following settings are required:

* `endpoint` (no default): The endpoint where you may point your webhook to emit events to

The following settings are optional:

* `path` (default: '/events'): Path where the receiver instance will accept events
* `health_path` (default: '/health\_check'): Path available for checking receiver status
* `read_timeout` (default: '500ms'): Maximum wait time while attempting to read a received event
* `write_timeout` (default: '500ms'): Maximum wait time while attempting to write a response
* `required_header` (optional):
  * `key` (required if `required_header` config option is set): Represents the key portion of the required header.
  * `value` (required if `required_header` config option is set): Represents the value portion of the required header.
* `split_logs_at_newline` (default: false): If true, the receiver will create a separate log record for each line in the request body.
* `split_logs_at_json_boundary` (default: false): If true, the receiver will parse the request body to JSON and send each object as a log. Splitting on new line overrides json boundary so only enable one at a time.
* `convert_headers_to_attributes` (optional): add all request headers (excluding `required_header` if also set) log attributes
* `header_attribute_regex` (optional): add headers matching supplied regex as log attributes. Header attributes will be prefixed with `header.`
* `max_request_body_size` (default comes from [confighttp module](https://github.com/open-telemetry/opentelemetry-collector/blob/7258150320ae4c3b489aa58bd2939ba358b23ae1/config/confighttp/server.go#L31)): Maximum size in bytes for request body. Requests exceeding this limit will be rejected with an error.

### Split logs at newline example

If the setting is unconfigured or set to `false`, the receiver will create a single log record with the entire request body as the "body" of that record.

If the webhook body looks like the following, use `split_logs_at_newline: false`:

```yaml theme={null}
{
"name": "francis",
"city": "newyork"
}
a fifth line
```

A single log record will be created with the multi-line JSON object as the "body" of that record, even the "fifth line" outside the JSON object will be included.

If the body looks like the following, use `split_logs_at_newline: true`:

```yaml theme={null}
{ "name": "francis", "city": "newyork" }
{ "name": "john", "city": "paris" }
a third line
```

Three log records will be created from this example. The first two are JSON body objects and the third is just the string "a third line".

This receiver does not attempt to marshal the body into a structured format as it is received so it cannot make a more intelligent determination about where the split records.

### Split logs at JSON boundary example

If you don't have clear new-line splits between objects, the receiver can use the JSON parser to handle separating the objects.
`split_logs_at_json_boundary: true`

```yaml theme={null}
{ "name": "francis", "city": "newyork", "multiple lines?": "you 
know it!"}
{ "name": "john", "city": "paris" }{ "name": "tim", "city": "london" }
```

This settings works when JSON objects have newlines in the middle of a string or multiple objects on a line.

### Configuration Example

```yaml theme={null}
receivers:
    webhook_event:
        endpoint: localhost:8088
        read_timeout: "500ms"
        path: "eventsource/receiver"
        health_path: "eventreceiver/healthcheck"
        required_header:
            key: "required-header-key"
            value: "required-header-value"
        split_logs_at_newline: false
        max_request_body_size: 1000000000
```

The full list of settings exposed for this receiver are documented in [config.go](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/webhookeventreceiver/config.go) with a detailed sample configuration in [testdata/config.yaml](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/webhookeventreceiver/testdata/config.yaml)

## Configuration

### Example Configuration

```yaml theme={null}
# each webhook will require its own webhook event receiver
webhookevent/valid_config:
  endpoint: localhost:8080
  read_timeout: "500ms"
  write_timeout: "500ms"
  path: "some/path"
  health_path: "health/path"
  required_header:
    key: key-present
    value: value-present
```

***

*Last generated: 2026-07-06*
