Skip to content

Commit 78ee36a

Browse files
authored
Merge branch 'open-telemetry:main' into main
2 parents 18c2749 + 6c5b363 commit 78ee36a

32 files changed

+870
-34
lines changed

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
# Upload the results to GitHub's code scanning dashboard (optional).
4343
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4444
- name: 'Upload to code-scanning'
45-
uses: github/codeql-action/upload-sarif@39edc492dbe16b1465b0cafca41432d857bdb31a # v3.29.1
45+
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
4646
with:
4747
sarif_file: results.sarif

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
[submodule "content-modules/semantic-conventions"]
2121
path = content-modules/semantic-conventions
2222
url = https://github.com/open-telemetry/semantic-conventions
23-
semconv-pin = v1.34.0
23+
semconv-pin = v1.35.0
2424
[submodule "content-modules/opamp-spec"]
2525
path = content-modules/opamp-spec
2626
url = https://github.com/open-telemetry/opamp-spec

content-modules/semantic-conventions

content/en/docs/collector/internal-telemetry.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,25 @@ service:
7171
port: 8888
7272
```
7373

74+
If you want to add additional labels to the Prometheus metrics, you can add them
75+
with `prometheus::with_resource_constant_labels`:
76+
77+
```yaml
78+
prometheus:
79+
host: '0.0.0.0'
80+
port: 8888
81+
with_resource_constant_labels:
82+
included:
83+
- label_key
84+
```
85+
86+
And then reference the labels in `service::telemetry::resource`:
87+
88+
```yaml
89+
resource:
90+
label_key: label_value
91+
```
92+
7493
{{% alert title="Internal telemetry configuration changes" %}}
7594

7695
As of Collector [v0.123.0], the `service::telemetry::metrics::address` setting
@@ -110,6 +129,29 @@ service:
110129
level: detailed
111130
```
112131

132+
You can further configure how metrics from the Collector are emitted by using
133+
[`views`](/docs/specs/otel/metrics/sdk/#view). For example, the following
134+
configuration updates the metric named `otelcol_process_uptime` to emit a new
135+
name `process_uptime` and description:
136+
137+
```yaml
138+
service:
139+
telemetry:
140+
metrics:
141+
views:
142+
- selector:
143+
instrument_name: otelcol_process_uptime
144+
instrument_type:
145+
stream:
146+
name: process_uptime
147+
description: The amount of time the Collector has been up
148+
```
149+
150+
You can also use `views` to update the resulting aggregation, attributes, and
151+
cardinality limits. For the full list of options, see the examples in the
152+
OpenTelemetry Configuration schema
153+
[repository](https://github.com/open-telemetry/opentelemetry-configuration/blob/f4e9046682d4386ea533ef7ba6ad30a5ce4451b4/examples/kitchen-sink.yaml#L440).
154+
113155
### Configure internal logs
114156

115157
Log output is found in `stderr`. You can configure logs in the config

content/en/docs/languages/python/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ weight: 22
1111

1212
## Version support
1313

14-
OpenTelemetry-Python supports Python 3.8 and higher.
14+
OpenTelemetry-Python supports Python 3.9 and higher.
1515

1616
## Installation
1717

content/en/docs/platforms/faas/lambda-auto-instrument.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ OTEL_INSTRUMENTATION_AWS_SDK_ENABLED=true
7070

7171
{{% /tab %}} {{% tab JavaScript %}}
7272

73-
The Lambda layer supports Node.js v14+ Lambda runtimes. For more information
73+
The Lambda layer supports Node.js v18+ Lambda runtimes. For more information
7474
about supported JavaScript and Node.js versions, see the
7575
[OpenTelemetry JavaScript documentation](https://github.com/open-telemetry/opentelemetry-js).
7676

7777
{{% /tab %}} {{% tab Python %}}
7878

79-
The Lambda layer supports Python 3.8 and Python 3.9 Lambda runtimes. For more
80-
information about supported Python versions, see the
79+
The Lambda layer supports Python 3.9+ Lambda runtimes. For more information
80+
about supported Python versions, see the
8181
[OpenTelemetry Python documentation](https://github.com/open-telemetry/opentelemetry-python/blob/main/README.md#supported-runtimes)
8282
and the package on [PyPi](https://pypi.org/project/opentelemetry-api/).
8383

@@ -93,9 +93,9 @@ and the package on [RubyGem](https://rubygems.org/search?query=opentelemetry).
9393
### Configure `AWS_LAMBDA_EXEC_WRAPPER`
9494

9595
Change the entry point of your application by setting
96-
`AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler` for Node.js, Java, or Ruby, and
97-
`AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-instrument` for Python. These wrapper scripts
98-
will invoke your Lambda application with the automatic instrumentation applied.
96+
`AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler` for Node.js, Java, Ruby, or Python.
97+
This wrapper script invokes your Lambda application with the automatic
98+
instrumentation applied.
9999

100100
### Add the ARN of Instrumentation Lambda Layer
101101

content/en/docs/zero-code/js/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ To see the full range of configuration options, see
5656

5757
A number of popular Node.js libraries are auto-instrumented. For the full list,
5858
see
59-
[supported instrumentation](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/metapackages/auto-instrumentations-node#supported-instrumentations).
59+
[supported instrumentation](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/auto-instrumentations-node#supported-instrumentations).
6060

6161
## Troubleshooting
6262

content/en/docs/zero-code/js/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ prefix.
6262
For example, to enable only
6363
[@opentelemetry/instrumentation-http](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http)
6464
and
65-
[@opentelemetry/instrumentation-express](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-express)
65+
[@opentelemetry/instrumentation-express](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-express)
6666
instrumentations:
6767

6868
```shell
@@ -77,7 +77,7 @@ comma-separated list of the instrumentation library names without the
7777
`@opentelemetry/instrumentation-` prefix.
7878

7979
For example, to disable only
80-
[@opentelemetry/instrumentation-fs](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/instrumentation-fs)
80+
[@opentelemetry/instrumentation-fs](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/instrumentation-fs)
8181
and
8282
[@opentelemetry/instrumentation-grpc](https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-grpc)
8383
instrumentations:
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
default_lang_commit: 8a5b880c16d49257a147c2c3ec4a6ef6fcee8e20
3+
---
4+
5+
将遥测数据发送到 [OpenTelemetry Collector](/docs/collector/),以确保其被正确导出。
6+
在生产环境中使用 Collector 是最佳实践。若要可视化你的遥测数据,可将其导出到后端系统,例如
7+
[Jaeger](https://jaegertracing.io/)[Zipkin](https://zipkin.io/)
8+
[Prometheus](https://prometheus.io/),或某个[特定厂商的](/ecosystem/vendors/)后端。
9+
10+
{{ if $name }}
11+
12+
## 可用的导出器 {#available-exporters}
13+
14+
镜像仓库中包含一份 [{{ $name }} 可用导出器的列表][reg]
15+
16+
{{ end }}
17+
18+
{{ if not $name }}
19+
20+
镜像仓库中包含[按语言分类的导出器列表][reg]
21+
22+
{{ end }}
23+
24+
在所有导出器中,[OpenTelemetry 协议 (OTLP)][OTLP] 导出器是以 OpenTelemetry 数据模型为基础设计的,
25+
能够无信息丢失地输出 OTel 数据。此外,许多处理遥测数据的工具都支持 OTLP
26+
(例如 [Prometheus][Jaeger] 和大多数[厂商][vendors]),在你需要时为你提供高度的灵活性。
27+
若要了解更多关于 OTLP 的信息,请参阅 [OTLP 规范][OTLP]
28+
29+
[Jaeger]: /blog/2022/jaeger-native-otlp/
30+
[OTLP]: /docs/specs/otlp/
31+
[Prometheus]: https://prometheus.io/docs/prometheus/2.55/feature_flags/#otlp-receiver
32+
[reg]: </ecosystem/registry/?component=exporter&language={{ $lang }}>
33+
[vendors]: /ecosystem/vendors/
34+
35+
{{ if $name }}
36+
37+
本页面介绍了主要的 OpenTelemetry {{ $name }} 导出器以及如何进行配置。
38+
39+
{{ end }}
40+
41+
{{ if $zeroConfigPageExists }}
42+
43+
{{% alert title=注意 %}}
44+
45+
如果你使用了[零代码自动插桩](</docs/zero-code/{{ $langIdAsPath }}>)
46+
你可以参考[配置指南](</docs/zero-code/{{ $langIdAsPath }}/configuration/>)来了解如何设置导出器。
47+
48+
{{% /alert %}}
49+
50+
{{ end }}
51+
52+
{{ if $supportsOTLP }}
53+
54+
## OTLP
55+
56+
### Collector 设置 {#collector-setup}
57+
58+
{{% alert title=注意 %}}
59+
60+
如果你已经配置好 OTLP Collector 或后端,可以跳过此部分,
61+
直接[设置应用的 OTLP 导出器依赖](#otlp-dependencies)
62+
63+
{{% /alert %}}
64+
65+
为测试和验证你的 OTLP 导出器,你可以运行一个 Docker 容器形式的 Collector,将遥测数据直接输出到控制台。
66+
67+
在一个空目录下创建名为 `collector-config.yaml` 的文件,并添加以下内容:
68+
69+
```yaml
70+
receivers:
71+
otlp:
72+
protocols:
73+
grpc:
74+
endpoint: 0.0.0.0:4317
75+
http:
76+
endpoint: 0.0.0.0:4318
77+
exporters:
78+
debug:
79+
verbosity: detailed
80+
service:
81+
pipelines:
82+
traces:
83+
receivers: [otlp]
84+
exporters: [debug]
85+
metrics:
86+
receivers: [otlp]
87+
exporters: [debug]
88+
logs:
89+
receivers: [otlp]
90+
exporters: [debug]
91+
```
92+
93+
然后运行以下命令,在 Docker 容器中启动 Collector:
94+
95+
```shell
96+
docker run -p 4317:4317 -p 4318:4318 --rm -v $(pwd)/collector-config.yaml:/etc/otelcol/config.yaml otel/opentelemetry-collector
97+
```
98+
99+
现在,这个 Collector 已能通过 OTLP 接收遥测数据。
100+
之后你可能需要配置 Collector,将遥测数据发送到你的可观测性后端。
101+
102+
{{ end }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
params:
3+
aResource: 进程
4+
default_lang_commit: 8a5b880c16d49257a147c2c3ec4a6ef6fcee8e20
5+
---
6+
7+
[资源]({{ $resourceHRef }})以资源属性的形式表示产生遥测数据的实体。例如,
8+
{{ $aResource }} 产生的遥测数据运行在 Kubernetes 的容器中,那么它会具有
9+
{{ $aResource }} 的名称、Pod 名称、命名空间,可能还有部署名称。这四个属性都可以包含在资源中。
10+
11+
在你的可观测性后端中,你可以使用资源信息来更好地调查异常行为。例如,
12+
如果你的追踪或指标数据表明系统中存在延迟,你可以将问题定位到特定的容器、Pod 或 Kubernetes 部署上。

0 commit comments

Comments
 (0)