Skip to content

Commit eaaecef

Browse files
katzchangymotongpoo
authored andcommitted
translate collector/deployment into ja
1 parent 99f0ae5 commit eaaecef

File tree

5 files changed

+462
-0
lines changed

5 files changed

+462
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: デプロイメント
3+
description: OpenTelemetryコレクターをデプロイするために適用できるパターン
4+
weight: 3
5+
---
6+
7+
OpenTelemetryコレクターは、さまざまな方法で、さまざまなユースケースに使用できる単一のバイナリから構成されています。
8+
このセクションでは、デプロイメントパターン、それらのユースケース、および長所と短所、
9+
クロス環境およびマルチバックエンドデプロイメントにおけるコレクター設定のベストプラクティスについて説明します。
10+
デプロイメントのセキュリティに関する考慮事項については、[コレクターホスティングのベストプラクティス][security]をご参照ください。
11+
12+
## リソース {#resources}
13+
14+
- KubeCon NA 2021の[OpenTelemetryコレクターデプロイメントパターン][y-patterns]に関する講演
15+
- 講演に付随する[デプロイメントパターン][gh-patterns]
16+
17+
[security]: /docs/security/hosting-best-practices/
18+
[gh-patterns]:
19+
https://github.com/jpkrohling/opentelemetry-collector-deployment-patterns/
20+
[y-patterns]: https://www.youtube.com/watch?v=WhRrwSHDBFs
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
title: エージェント
3+
description:
4+
コレクターにシグナルを送信し、そこからバックエンドに送信する理由と方法
5+
weight: 2
6+
cSpell:ignore: prometheusremotewrite
7+
---
8+
9+
コレクターのエージェントデプロイメントパターンは、
10+
OpenTelemetry SDKを使用して[計装された][instrumentation]アプリケーション([OpenTelemetryプロトコル(OTLP)][otlp]を使用)や、
11+
他のコレクター(OTLPエクスポーターを使用)が、テレメトリーシグナルを[コレクター][]インスタンスに送信する構成です。
12+
このコレクターインスタンスは、アプリケーションと同じホストまたはアプリケーションの横に配置されたサイドカーやデーモンセットとして動作します。
13+
14+
各クライアント側SDKまたはダウンストリームコレクターは、コレクターの場所を設定します:
15+
16+
![分散型コレクターデプロイメント概念](../../img/otel-agent-sdk.svg)
17+
18+
1. アプリケーションで、SDKがOTLPデータをコレクターに送信するように設定されます。
19+
1. コレクターは、テレメトリーデータを1つ以上のバックエンドに送信するように設定されます。
20+
21+
## 例 {#example}
22+
23+
コレクターのエージェントデプロイメントパターンの具体例は以下のようになります。
24+
たとえば、[Javaアプリケーションを計装してメトリクスをエクスポート][instrument-java-metrics]するためにOpenTelemetry Java SDKを使用します。
25+
アプリケーションのコンテキスト内で、`OTEL_METRICS_EXPORTER``otlp`(デフォルト値)に設定し、
26+
[OTLPエクスポーター][otlp-exporter]をコレクターのアドレスで設定します。たとえば(Bashまたは`zsh`シェル):
27+
28+
```shell
29+
export OTEL_EXPORTER_OTLP_ENDPOINT=http://collector.example.com:4318
30+
```
31+
32+
`collector.example.com:4318` で動作するコレクターは次のように設定されます:
33+
34+
{{< tabpane text=true >}} {{% tab Traces %}}
35+
36+
```yaml
37+
receivers:
38+
otlp: # アプリケーションがトレースを送信するOTLPレシーバー
39+
protocols:
40+
http:
41+
endpoint: 0.0.0.0:4318
42+
43+
processors:
44+
batch:
45+
46+
exporters:
47+
otlp/jaeger: # JaegerはOTLPを直接サポートしています
48+
endpoint: https://jaeger.example.com:4317
49+
50+
service:
51+
pipelines:
52+
traces/dev:
53+
receivers: [otlp]
54+
processors: [batch]
55+
exporters: [otlp/jaeger]
56+
```
57+
58+
{{% /tab %}} {{% tab Metrics %}}
59+
60+
```yaml
61+
receivers:
62+
otlp: # アプリケーションがメトリクスを送信するOTLPレシーバー
63+
protocols:
64+
http:
65+
endpoint: 0.0.0.0:4318
66+
67+
processors:
68+
batch:
69+
70+
exporters:
71+
prometheusremotewrite: # PRWエクスポーター、メトリクスをバックエンドに取り込む
72+
endpoint: https://prw.example.com/v1/api/remote_write
73+
74+
service:
75+
pipelines:
76+
metrics/prod:
77+
receivers: [otlp]
78+
processors: [batch]
79+
exporters: [prometheusremotewrite]
80+
```
81+
82+
{{% /tab %}} {{% tab Logs %}}
83+
84+
```yaml
85+
receivers:
86+
otlp: # アプリケーションがログを送信するOTLPレシーバー
87+
protocols:
88+
http:
89+
endpoint: 0.0.0.0:4318
90+
91+
processors:
92+
batch:
93+
94+
exporters:
95+
file: # ファイルエクスポーター、ログをローカルファイルに取り込む
96+
path: ./app42_example.log
97+
rotation:
98+
99+
service:
100+
pipelines:
101+
logs/dev:
102+
receivers: [otlp]
103+
processors: [batch]
104+
exporters: [file]
105+
```
106+
107+
{{% /tab %}} {{< /tabpane >}}
108+
109+
実際に試してみたい場合は、エンドツーエンドの[Java][java-otlp-example]または[Python][py-otlp-example]の例で確認できます。
110+
111+
## トレードオフ {#tradeoffs}
112+
113+
長所:
114+
115+
- 始めやすい
116+
- アプリケーションとコレクターの間に明確な1:1のマッピング
117+
118+
短所:
119+
120+
- スケーラビリティ(人的および負荷面)
121+
- 柔軟性に欠ける
122+
123+
[instrumentation]: /docs/languages/
124+
[otlp]: /docs/specs/otel/protocol/
125+
[collector]: /docs/collector/
126+
[instrument-java-metrics]: /docs/languages/java/api/#meterprovider
127+
[otlp-exporter]: /docs/specs/otel/protocol/exporter/
128+
[java-otlp-example]:
129+
https://github.com/open-telemetry/opentelemetry-java-docs/tree/main/otlp
130+
[py-otlp-example]:
131+
https://opentelemetry-python.readthedocs.io/en/stable/examples/metrics/instruments/README.html

0 commit comments

Comments
 (0)