# Source: https://docs.datadoghq.com/tracing/trace_collection/custom_instrumentation/otel_instrumentation.md

---
title: Custom Instrumentation with the OpenTelemetry API
description: >-
  Sending spans from custom instrumentation through the OpenTelemetry API to the
  Datadog tracing libraries.
breadcrumbs: >-
  Docs > APM > Application Instrumentation > Code-Based Custom Instrumentation >
  Custom Instrumentation with the OpenTelemetry API
---

# Custom Instrumentation with the OpenTelemetry API

## Overview{% #overview %}

Datadog tracing libraries provide an implementation of the [OpenTelemetry API](https://opentelemetry.io/docs/reference/specification/trace/api) for instrumenting your code. This means you can maintain vendor-neutral instrumentation of all your services, while still taking advantage of Datadog's native implementation, features, and products. You can configure it to generate Datadog-style spans and traces to be processed by the Datadog tracing library for your language, and send those to Datadog.

By instrumenting your code with OpenTelemetry API:

- Your code remains free of vendor-specific API calls.
- Your code does not depend on Datadog tracing libraries at compile time (only runtime).

Replace the OpenTelemetry SDK with the Datadog tracing library in the instrumented application, and the traces produced by your running code can be processed, analyzed, and monitored alongside Datadog traces and in Datadog proprietary products.

The Datadog tracing library, when configured as described here, accepts the spans and traces generated by OpenTelemetry-instrumented code, processes the telemetry, and sends it to Datadog. You can use this approach, for example, if your code has already been instrumented with the OpenTelemetry API, or if you want to instrument using the OpenTelemetry API, and you want to gain the benefits of using the Datadog tracing libraries without changing your code.

If you're looking for a way to instrument your code with OpenTelemetry and then send span data to Datadog *without going through the Datadog tracing library*, see [OpenTelemetry in Datadog](https://docs.datadoghq.com/opentelemetry/).

- [Java](java)
- [Python](python)
- [Ruby](ruby)
- [go](go)
- [Node.js](nodejs)
- [PHP](php)
- [.Net](dotnet)

## Further Reading{% #further-reading %}

- [OpenTelemetry in Datadog](https://docs.datadoghq.com/opentelemetry/)
- [Understand APM terminology](https://docs.datadoghq.com/tracing/glossary/)
- [Interoperability of OpenTelemetry API and Datadog instrumented traces](https://docs.datadoghq.com/opentelemetry/guide/otel_api_tracing_interoperability)
- [Learn More about Datadog and the OpenTelemetry initiative](https://www.datadoghq.com/blog/opentelemetry-instrumentation/)