# Native support for OTEL Traces

#### Native Support for OTEL Traces HTTP Request via OTLP HTTP Exporter

**Overview**

[OpenTelemetry](https://opentelemetry.io/) is becoming the standard for observability. OpenTelemetry is vendor-agnostic, and the 2nd most active community on GitHub after Kubernetes.

Support for OTEL traces is added under the `/v1/json_batch` endpoint as `/v1/json_batch/otlptraces`.

**Example OTEL Collector Configuration**

```yaml
codeexporters:
  otlphttp:
    traces_endpoint: https://apicainstance.url/v1/json_batch/otlptraces
    encoding: json
    compression: gzip
    headers:
      Authorization: "Bearer bearer_token_string"
    tls:
      insecure: false
      insecure_skip_verify: true
```

**Mandatory Fields**

* **traces\_endpoint**: The endpoint to which traces are sent.
* **encoding**: Must be set to `json`.

**Optional Fields**

* **compression**: Can be set to `gzip` for trace compression.
* **headers**: Headers for the HTTP request. It is recommended that this be used in production setups.
* **tls**: TLS configuration. It is recommended to enable TLS in production setups.

**Authentication**

Authentication is supported via bearer token authentication. Both TLS and non-TLS modes are supported.

**Handling of Namespaces/Application**

Namespaces and applications default to `tracing/default_app`. These values cannot be changed.

This documentation provides the setup and configuration of native support for OTEL traces using the OTLP HTTP exporter. Ensure that mandatory fields are correctly configured, and consider enabling optional fields for enhanced security and performance in production environments.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apica.io/observe/overview/native-support-for-otel-traces.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
