# Oodle AI

### Supported Telemetry Types

| Telemetry Type | Supported |
| -------------- | --------- |
| Traces         | ✓         |
| Metrics        | ✓         |
| Logs           | ✓         |

### Prerequisites

Before configuring the Oodle AI destination, ensure you have:

* A running Oodle AI instance
* Your Oodle AI instance name
* An Oodle AI API key for authentication
* Network connectivity from your Bindplane agent to the Oodle AI instance
* At least one telemetry type selected (logs, metrics, or traces)

For help with Oodle AI setup, see the [Oodle AI documentation](https://docs.oodle.ai/).

### Configuration

#### Basic Configuration

The minimum configuration requires the Oodle AI instance name and API key. You can select which telemetry types to export.

**Parameters:**

| Parameter              | Type     | Default                     | Description                                        | Required |
| ---------------------- | -------- | --------------------------- | -------------------------------------------------- | -------- |
| Choose Telemetry Type  | Selector | `Logs`, `Metrics`, `Traces` | Select which types of telemetry to export          | Yes      |
| Oodle AI Instance Name | String   | -                           | Oodle AI instance name to send telemetry to        | Yes      |
| API Token              | String   | -                           | API Token for authenticating with the Oodle AI API | Yes      |

***

### Advanced Configuration

#### General Settings

Settings for controlling log processing and timeout behavior.

| Parameter     | Type    | Default | Description                                                         | Required |
| ------------- | ------- | ------- | ------------------------------------------------------------------- | -------- |
| Drop Raw Copy | Boolean | `true`  | Drop the raw copy of the log record stored in `log.record.original` | No       |
| Timeout       | Integer | `30`    | Timeout in seconds for sending batches to Oodle AI                  | Yes      |

#### Retry and Queuing

This destination supports the [retry settings](https://docs.bindplane.com/configuration/bindplane-otel-collector/retry-on-failure), the [sending queue settings](https://docs.bindplane.com/configuration/bindplane-otel-collector/sending-queue), and the [persistent queue settings.](https://docs.bindplane.com/configuration/bindplane-otel-collector/persistent-queue)

| Sending Queue | Persistent Queue | Retry on Failure |
| ------------- | ---------------- | ---------------- |
| ✓             | ✓                | ✓                |

### Examples

#### Basic Configuration (All Telemetry Types)

This example configures the destination to send logs, metrics, and traces to Oodle AI.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Destination
metadata:
  id: oodle
  name: Oodle
spec:
  type: oodle
  parameters:
    - name: telemetry_types
      value: ['Logs', 'Metrics', 'Traces']
    - name: oodle_instance_name
      value: 'my-instance'
    - name: api_token
      value: 'your-api-token-here'
```

#### Logs and Metrics Only

This example configures the destination to send only logs and metrics.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Destination
metadata:
  id: oodle-logs-metrics
  name: Oodle (Logs & Metrics)
spec:
  type: oodle
  parameters:
    - name: telemetry_types
      value: ['Logs', 'Metrics']
    - name: oodle_instance_name
      value: 'my-instance'
    - name: api_token
      value: 'your-api-token-here'
    - name: drop_raw_copy
      value: true
    - name: retry_on_failure_enabled
      value: true
    - name: sending_queue_enabled
      value: true
    - name: persistent_queue_enabled
      value: false
```

#### Production Configuration with Persistent Queuing

This example demonstrates a high-reliability configuration for production environments.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Destination
metadata:
  id: oodle-production
  name: Oodle (Production)
spec:
  type: oodle
  parameters:
    - name: telemetry_types
      value: ['Logs', 'Metrics', 'Traces']
    - name: oodle_instance_name
      value: 'my-instance'
    - name: api_token
      value: 'your-api-token-here'
    - name: drop_raw_copy
      value: true
    - name: timeout
      value: 30
    - name: retry_on_failure_enabled
      value: true
    - name: retry_on_failure_initial_interval
      value: 5
    - name: retry_on_failure_max_interval
      value: 30
    - name: retry_on_failure_max_elapsed_time
      value: 300
    - name: sending_queue_enabled
      value: true
    - name: sending_queue_num_consumers
      value: 10
    - name: sending_queue_queue_size
      value: 5000
    - name: persistent_queue_enabled
      value: true
    - name: persistent_queue_storage_extension
      value: 
        type: file_storage_persistent_queue
        parameters:
          - name: persistent_queue_directory
            value: ${OIQ_OTEL_COLLECTOR_HOME}/storage
          - name: timeout
            value: 1
          - name: persistent_queue_fsync
            value: true
```

#### Traces Only

This example configures the destination for distributed tracing only.

```yaml
apiVersion: bindplane.observiq.com/v1
kind: Destination
metadata:
  id: oodle-traces
  name: Oodle (Traces Only)
spec:
  type: oodle
  parameters:
    - name: telemetry_types
      value: ['Traces']
    - name: oodle_instance_name
      value: 'my-instance'
    - name: api_token
      value: 'your-api-token-here'
    - name: retry_on_failure_enabled
      value: true
    - name: sending_queue_enabled
      value: true
    - name: persistent_queue_enabled
      value: true
    - name: persistent_queue_storage_extension
      value: 
        type: file_storage_persistent_queue
        parameters:
          - name: persistent_queue_directory
            value: ${OIQ_OTEL_COLLECTOR_HOME}/storage
          - name: timeout
            value: 1
          - name: persistent_queue_fsync
            value: true
```

### Configuration Tips

#### Telemetry Type Selection

* **All telemetry types** (default): Export logs, metrics, and traces for comprehensive observability
* **Custom selection**: Choose only the telemetry types you need to optimize resource usage
* **Flexible configuration**: Can be changed at any time without redeploying

#### Instance Name and API Token

* Instance name must match your Oodle instance identifier
* API token provides secure authentication
* Keep API token secure; use environment variables or secret management systems
* Store credentials in a secure location and never commit them to version control

#### Raw Copy Handling

* Enable Drop Raw Copy to reduce storage for log telemetry
* Disable only if you need the original raw log record for debugging
* Default behavior (enabled) is recommended for production environments

#### Metrics in Oodle

* Metrics are automatically converted from OTLP to Prometheus format
* Metric names are normalized to meet Prometheus requirements
* Use the Explore Metrics tab in Oodle with PromQL queries for visualization
* Resource attributes are mapped to Prometheus labels for better filtering

#### Security Best Practices

* Store API tokens securely using environment variables or secret management systems
* Regularly rotate API tokens per your security policy
* Use Oodle's principle of least privilege for token permissions
* Monitor token usage for suspicious activity
* Never share API tokens outside your organization

#### Performance Tuning

* Increase Queue Size for high-volume telemetry collection
* Adjust Number of Consumers based on available CPU and network bandwidth
* Enable Persistent Queuing for mission-critical data
* Enable Synchronize Persistent Queue to Disk in critical environments for data durability

#### Multi-Telemetry Considerations

* Each telemetry type is routed to its appropriate Oodle receiver automatically
* Compression is applied automatically to all telemetry types
* Retry and queue settings apply uniformly across all selected types
* Custom resource attributes can be added via resource processors in your configuration

***

### Troubleshooting

#### Connection Refused or Timeout

**Symptoms**: Telemetry is not being sent; connection timeout errors in logs.

**Solutions**:

1. Verify Oodle instance is running and accessible
2. Verify the instance name is correct
3. Test network connectivity to Oodle: `telnet <instance-name>.collector.oodle.ai 443`
4. Verify firewall rules allow outbound HTTPS traffic
5. Check that the API token is valid

#### Authentication Failures

**Symptoms**: "401 Unauthorized" or authentication errors in logs.

**Solutions**:

1. Verify the API token is correct and valid
2. Check that the token hasn't expired
3. Ensure the token has appropriate permissions for your Oodle instance
4. Verify both the instance name and API token are correctly configured
5. Check Oodle logs for authentication errors

#### Telemetry Not Appearing

**Symptoms**: Telemetry is sent but doesn't appear in Oodle UI or queries.

**Solutions**:

1. Verify the telemetry type is included in the configuration
2. Check that sources are generating telemetry
3. Verify proper routing and processing of telemetry data
4. Check Oodle's ingestion logs for errors or rejections
5. Ensure the instance name matches the one used in Oodle

#### High Queue Depth

**Symptoms**: Sending queue is consistently full; telemetry may be dropped if persistent queuing is disabled.

**Solutions**:

1. Verify Oodle instance can handle the telemetry volume
2. Check for network latency or bandwidth issues
3. Increase Queue Size to buffer more telemetry
4. Increase Number of Consumers to process batches faster
5. Enable Persistent Queuing to prevent data loss during outages
6. Consider distributing telemetry across multiple Oodle instances

#### Performance Issues

**Symptoms**: High CPU or memory usage; slow telemetry ingestion.

**Solutions**:

1. Monitor Bindplane agent CPU and memory usage
2. Consider reducing telemetry volume at the source (sampling, filtering)
3. Disable Synchronize Persistent Queue to Disk if enabled (unless data integrity is critical)
4. Verify network connectivity and latency to Oodle
5. Consider batching at the source to reduce telemetry frequency

#### Data Loss

**Symptoms**: Telemetry is dropped after restarts or network outages.

**Solutions**:

1. Enable Persistent Queuing
2. Verify persistent queue directory exists and has write permissions
3. Monitor queue size to ensure it's not overflowing
4. Enable Retry on Failure to handle transient failures
5. Check available disk space for persistent queue storage
6. For critical environments, enable Synchronize Persistent Queue to Disk
7. Review logs for exporter errors or capacity issues

### Related Resources

* [Oodle Documentation](https://docs.oodle.ai/)
* [Oodle OTLP Integration for Logs](https://docs.oodle.ai/integrations/logs/otel)
* [Oodle OTLP Integration for Metrics](https://docs.oodle.ai/integrations/metrics/otel/)
* [Oodle OTLP Integration for Traces](https://docs.oodle.ai/integrations/traces/otel)
* [OpenTelemetry Protocol Specification](https://opentelemetry.io/docs/specs/otel/protocol/)
* [Bindplane Destinations Overview](https://docs.bindplane.com/resources/destinations/)
* [Retry and Queuing Configuration](https://docs.bindplane.com/configuration/bindplane-otel-collector/retry-and-queueing)
