# `LangChain.OpenTelemetry.Config`
[🔗](https://github.com/brainlid/langchain/blob/v0.9.3/lib/open_telemetry/config.ex#L1)

Configuration for the LangChain OpenTelemetry integration.

## Options

  * `:capture_input_messages` - When `true`, records `gen_ai.input.messages` as a
    span attribute containing the serialized input messages. Defaults to `false`.

  * `:capture_output_messages` - When `true`, records `gen_ai.output.messages` as a
    span attribute containing the serialized output messages. Defaults to `false`.

  * `:capture_tool_arguments` - When `true`, records `gen_ai.tool.call.arguments` as a
    span attribute. Defaults to `false`.

  * `:capture_tool_results` - When `true`, records `gen_ai.tool.call.result` as a
    span attribute. Defaults to `false`.

  * `:enable_metrics` - When `true`, attaches the metrics handler, which re-emits
    LangChain telemetry as intermediary `[:langchain, :otel, …]` metric events for a
    consumer (`Telemetry.Metrics`, PromEx, …) to record. It does **not** record OTel
    histograms directly. Defaults to `true`. See `LangChain.OpenTelemetry.MetricsHandler`.

# `t`
[🔗](https://github.com/brainlid/langchain/blob/v0.9.3/lib/open_telemetry/config.ex#L25)

```elixir
@type t() :: %LangChain.OpenTelemetry.Config{
  capture_input_messages: boolean(),
  capture_output_messages: boolean(),
  capture_tool_arguments: boolean(),
  capture_tool_results: boolean(),
  enable_metrics: boolean()
}
```

# `new`
[🔗](https://github.com/brainlid/langchain/blob/v0.9.3/lib/open_telemetry/config.ex#L48)

```elixir
@spec new(keyword()) :: t()
```

Creates a new config from the given options.

## Examples

    iex> LangChain.OpenTelemetry.Config.new(capture_input_messages: true)
    %LangChain.OpenTelemetry.Config{capture_input_messages: true}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
