# 各种编程语言的 API & SDK

> OpenTelemetry 代码插桩支持多种流行的编程语言

---

LLMS index: [llms.txt](/llms.txt)

---

OpenTelemetry 代码[插桩][instrumentation]支持下表[“状态与发布版本”](#status-and-releases)中所列的各种编程语言。
当然你也可以获取[其他语言](/docs/languages/other)的非官方实现版本。你可以在 [Registry（登记表）](/ecosystem/registry/)中找到它们。

对于 Go、.NET、PHP、Python、Java 和 JavaScript，你可以使用[零代码解决方案](/docs/zero-code)将插桩添加到你的应用，无需修改代码。

如果你正在使用 Kubernetes，可以借助 [Kubernetes 的 OpenTelemetry Operator][otel-op] 向你的应用中[注入这些零代码解决方案][zero-code]。

## 状态与发布版本 {#status-and-releases}

OpenTelemetry 主要功能组件的当前状态如下：

<div class="alert alert-warning" role="alert"><div class="h4 alert-heading" role="heading">重要</div>



无论 API/SDK 的状态如何，如果你的插桩依赖于在[语义约定规范][semantic conventions specification]中被标记为[实验性][Experimental]的[语义约定][semantic conventions]，你的数据流可能会发生**破坏性变更**。

[semantic conventions]: /docs/concepts/semantic-conventions/
[Experimental]: /docs/specs/otel/document-status/
[semantic conventions specification]: /docs/specs/semconv/

</div>





Language | Traces | Metrics | Logs | Profiles |
| --- | --- | --- | --- | --- |
| [C++](/docs/languages/cpp/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | - |
| [C#/.NET](/docs/languages/dotnet/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | - |
| [Erlang/Elixir](/docs/languages/erlang/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | - |
| [Go](/docs/languages/go/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Beta](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#beta) | - |
| [Java](/docs/languages/java/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) |
| [JavaScript](/docs/languages/js/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | - |
| [Kotlin](/docs/languages/kotlin/) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | - |
| [PHP](/docs/languages/php/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | - |
| [Python](/docs/languages/python/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | - |
| [Ruby](/docs/languages/ruby/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | - |
| [Rust](/docs/languages/rust/) | [Beta](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#beta) | [Beta](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#beta) | [Beta](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#beta) | - |
| [Swift](/docs/languages/swift/) | [Stable](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#stable) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | [Development](https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/0232-maturity-of-otel.md#development) | - |


## API 参考文档 {#api-references}

各个特别兴趣小组（SIG）以特定语言实现 OpenTelemetry API 和 SDK，他们也会为开发者发布 API 参考文档。
以下是可用的参考文档：


    
      
    
    
    
    
    
    
    
    
    
    
    
- <a href="/zh/docs/languages/cpp/api/" target="_blank" rel="noopener" class="external-link">C++</a>
- <a href="/zh/docs/languages/dotnet/traces-api/" target="_blank" rel="noopener" class="external-link">.NET &mdash; Tracing </a>
- <a href="/zh/docs/languages/dotnet/metrics-api/" target="_blank" rel="noopener" class="external-link">.NET &mdash; Metrics </a>
- <a href="/zh/docs/languages/erlang/api/" target="_blank" rel="noopener" class="external-link">Erlang/Elixir</a>
- <a href="/zh/docs/languages/go/api/" target="_blank" rel="noopener" class="external-link">Go &mdash; API 参考文档</a>
- <a href="/zh/docs/languages/java/api/">Java &mdash; 通过 API 记录遥测数据</a>
- <a href="/zh/docs/languages/js/api/" target="_blank" rel="noopener" class="external-link">JavaScript &mdash; API 参考文档</a>
- <a href="/zh/docs/languages/php/api/" target="_blank" rel="noopener" class="external-link">PHP</a>
- <a href="/zh/docs/languages/python/api/" target="_blank" rel="noopener" class="external-link">Python</a>
- <a href="/zh/docs/languages/ruby/api/" target="_blank" rel="noopener" class="external-link">Ruby</a>
- <a href="/zh/docs/languages/rust/api/" target="_blank" rel="noopener" class="external-link">Rust</a>

<div class="alert alert-primary" role="alert"><div class="h4 alert-heading" role="heading">注意</div>



上述列表是 [`/api`](/api) 的别名。

</div>


[zero-code]: /docs/platforms/kubernetes/operator/automatic/
[instrumentation]: /docs/concepts/instrumentation/
[otel-op]: /docs/platforms/kubernetes/operator/

---

Section pages:

- [SDK Configuration](/zh/docs/languages/sdk-configuration/)
- [Java](/zh/docs/languages/java/): <img width="35" class="img-initial" src="/img/logos/32x32/Java_SDK.svg" alt="Java"> 以 Java 语言实现特定的 OpenTelemetry。
- [JavaScript](/zh/docs/languages/js/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/JS_SDK.svg" alt="JavaScript"> OpenTelemetry 在 JavaScript 中的特定语言实现（适用于 Node.js 和浏览器）。
- [C++](/zh/docs/languages/cpp/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/C++_SDK.svg" alt="C++"> A language-specific implementation of OpenTelemetry in C++.
- [.NET](/zh/docs/languages/dotnet/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/dotnet.svg" alt=".NET"> A language-specific implementation of OpenTelemetry in .NET.
- [Erlang/Elixir](/zh/docs/languages/erlang/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/Erlang_SDK.svg" alt="Erlang/Elixir"> A language-specific implementation of OpenTelemetry in Erlang/Elixir.
- [Go](/zh/docs/languages/go/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/Golang_SDK.svg" alt="Go"> A language-specific implementation of OpenTelemetry in Go.
- [Kotlin](/zh/docs/languages/kotlin/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/SDK.svg" alt="Kotlin"> A language-specific implementation of OpenTelemetry in Kotlin.
- [PHP](/zh/docs/languages/php/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/PHP.svg" alt="PHP"> A language-specific implementation of OpenTelemetry in PHP.
- [Python](/zh/docs/languages/python/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/Python_SDK.svg" alt="Python"> A language-specific implementation of OpenTelemetry in Python.
- [Ruby](/zh/docs/languages/ruby/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/Ruby_SDK.svg" alt="Ruby"> A language-specific implementation of OpenTelemetry in Ruby.
- [Rust](/zh/docs/languages/rust/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/Rust.svg" alt="Rust"> A language-specific implementation of OpenTelemetry in Rust.
- [Swift](/zh/docs/languages/swift/): <img width="35" class="img-initial otel-icon" src="/img/logos/32x32/Swift.svg" alt="Swift"> A language-specific implementation of OpenTelemetry in Swift.
- [Other languages](/zh/docs/languages/other/): Language-specific implementation of OpenTelemetry for other languages.
