Skip to content

Commit 5db74ea

Browse files
chalintiffany76
andauthored
[i18n] Separate prose out of Convert docs/exporter/intro.md, and other improvements (open-telemetry#6583)
Co-authored-by: Tiffany Hrabusa <[email protected]>
1 parent 8fc5481 commit 5db74ea

File tree

15 files changed

+192
-117
lines changed

15 files changed

+192
-117
lines changed

Diff for: .prettierignore

+2-5
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@
44
/themes
55

66
/layouts/*
7-
!/layouts/shortcodes
8-
/layouts/shortcodes/*
9-
!/layouts/shortcodes/docs
10-
!/layouts/shortcodes/es
11-
!/layouts/shortcodes/pt
127

138
/content/en/blog/2019
149
/content/en/blog/202[23]
10+
# TEMPORARY until the PR introducing this file is merged:
11+
/content/en/docs/_includes/exporters/intro.md
1512

1613
/content/ja
1714
/content/zh

Diff for: content/en/docs/_includes/exporters/intro.md

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
Send telemetry to the
2+
[OpenTelemetry Collector](/docs/collector/) to make sure it's exported
3+
correctly. Using the Collector in production environments is a best practice. To
4+
visualize your telemetry, export it to a backend such as
5+
[Jaeger](https://jaegertracing.io/), [Zipkin](https://zipkin.io/),
6+
[Prometheus](https://prometheus.io/), or a
7+
[vendor-specific](/ecosystem/vendors/) backend.
8+
9+
{{ if $name }}
10+
11+
## Available exporters
12+
13+
The registry contains a [list of exporters for {{ $name }}][reg].
14+
15+
{{ end }}
16+
{{ if not $name }}
17+
18+
The registry contains the [list of language specific exporters][reg].
19+
20+
{{ end }}
21+
22+
Among exporters, [OpenTelemetry Protocol (OTLP)][OTLP] exporters are designed
23+
with the OpenTelemetry data model in mind, emitting OTel data without any loss
24+
of information. Furthermore, many tools that operate on telemetry data support
25+
OTLP (such as [Prometheus], [Jaeger], and most [vendors]), providing you with a
26+
high degree of flexibility when you need it. To learn more about OTLP, see [OTLP
27+
Specification][OTLP].
28+
29+
[Jaeger]: /blog/2022/jaeger-native-otlp/
30+
[OTLP]: /docs/specs/otlp/
31+
[Prometheus]:
32+
https://prometheus.io/docs/prometheus/2.55/feature_flags/#otlp-receiver
33+
[reg]: </ecosystem/registry/?component=exporter&language={{ $lang }}>
34+
[vendors]: /ecosystem/vendors/
35+
36+
{{ if $name }}
37+
38+
This page covers the main OpenTelemetry {{ $name }} exporters and how to set
39+
them up.
40+
41+
{{ end }}
42+
43+
{{ if $zeroConfigPageExists }}
44+
45+
<div class="alert alert-info" role="alert"><h4 class="alert-heading">Note</h4>
46+
47+
If you use [zero-code instrumentation](</docs/zero-code/{{ $langIdAsPath }}>), you can learn
48+
how to set up exporters by following the [Configuration
49+
Guide](</docs/zero-code/{{ $langIdAsPath }}/configuration/>).
50+
51+
</div>
52+
53+
{{ end }}
54+
55+
{{ if $supportsOTLP }}
56+
57+
## OTLP
58+
59+
### Collector Setup
60+
61+
<div class="alert alert-info" role="alert"><h4 class="alert-heading">Note</h4>
62+
63+
If you have a OTLP collector or backend already set up, you can skip this
64+
section and [setup the OTLP exporter dependencies](#otlp-dependencies) for your
65+
application.
66+
67+
</div>
68+
69+
To try out and verify your OTLP exporters, you can run the collector in a docker
70+
container that writes telemetry directly to the console.
71+
72+
In an empty directory, create a file called `collector-config.yaml` with the
73+
following content:
74+
75+
```yaml
76+
receivers:
77+
otlp:
78+
protocols:
79+
grpc:
80+
endpoint: 0.0.0.0:4317
81+
http:
82+
endpoint: 0.0.0.0:4318
83+
exporters:
84+
debug:
85+
verbosity: detailed
86+
service:
87+
pipelines:
88+
traces:
89+
receivers: [otlp]
90+
exporters: [debug]
91+
metrics:
92+
receivers: [otlp]
93+
exporters: [debug]
94+
logs:
95+
receivers: [otlp]
96+
exporters: [debug]
97+
```
98+
99+
Now run the collector in a docker container:
100+
101+
```shell
102+
docker run -p 4317:4317 -p 4318:4318 --rm -v $(pwd)/collector-config.yaml:/etc/otelcol/config.yaml otel/opentelemetry-collector
103+
```
104+
105+
This collector is now able to accept telemetry via OTLP. Later you may want to
106+
[configure the collector](/docs/collector/configuration) to send your telemetry
107+
to your observability backend.
108+
109+
{{ end }}

Diff for: content/en/docs/languages/cpp/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cSpell:ignore: DWITH
66

77
<!-- markdownlint-disable no-duplicate-heading -->
88

9-
{{% docs/languages/exporters/intro cpp %}}
9+
{{% docs/languages/exporters/intro %}}
1010

1111
### Dependencies {#otlp-dependencies}
1212

Diff for: content/en/docs/languages/erlang/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ weight: 50
44
cSpell:ignore: rebar relx
55
---
66

7-
{{% docs/languages/exporters/intro erlang %}}
7+
{{% docs/languages/exporters/intro %}}
88

99
## Exporting to the OpenTelemetry Collector
1010

Diff for: content/en/docs/languages/go/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 50
66
cSpell:ignore: otlplog otlploggrpc otlploghttp otlpmetric otlpmetricgrpc otlpmetrichttp otlptrace otlptracegrpc otlptracehttp stdoutlog stdouttrace
77
---
88

9-
{{% docs/languages/exporters/intro go %}}
9+
{{% docs/languages/exporters/intro %}}
1010

1111
## Console
1212

Diff for: content/en/docs/languages/js/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ weight: 50
44
description: Process and export your telemetry data
55
---
66

7-
{{% docs/languages/exporters/intro js %}}
7+
{{% docs/languages/exporters/intro %}}
88

99
### Dependencies {#otlp-dependencies}
1010

Diff for: content/en/docs/languages/net/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Exporters
33
weight: 50
44
---
55

6-
{{% docs/languages/exporters/intro dotnet %}}
6+
{{% docs/languages/exporters/intro %}}
77

88
### Dependencies {#otlp-dependencies}
99

Diff for: content/en/docs/languages/php/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ weight: 50
44
cSpell:ignore: fastcgi pecl
55
---
66

7-
{{% docs/languages/exporters/intro php %}}
7+
{{% docs/languages/exporters/intro %}}
88

99
{{% alert title="Note" color="info" %}}
1010

Diff for: content/en/docs/languages/python/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cSpell:ignore: LOWMEMORY
77

88
<!-- markdownlint-disable no-duplicate-heading -->
99

10-
{{% docs/languages/exporters/intro python %}}
10+
{{% docs/languages/exporters/intro %}}
1111

1212
### Dependencies {#otlp-dependencies}
1313

Diff for: content/en/docs/languages/ruby/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Exporters
33
weight: 50
44
---
55

6-
{{% docs/languages/exporters/intro ruby %}}
6+
{{% docs/languages/exporters/intro %}}
77

88
## OTLP endpoint
99

Diff for: content/en/docs/languages/rust/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Exporters
33
weight: 50
44
---
55

6-
{{% docs/languages/exporters/intro rust %}}
6+
{{% docs/languages/exporters/intro %}}
77

88
## OTLP endpoint
99

Diff for: content/pt/docs/languages/python/exporters.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cSpell:ignore: LOWMEMORY
88

99
<!-- markdownlint-disable no-duplicate-heading -->
1010

11-
{{% docs/languages/exporters/intro python %}}
11+
{{% docs/languages/exporters/intro %}}
1212

1313
### Dependências {#otlp-dependencies}
1414

Diff for: layouts/partials/include.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,18 @@ include functionality:
1919
{{ range $_k, $v := $args -}}
2020
{{ $k := string $_k -}}
2121
{{ if not (hasPrefix $k "_") -}}
22-
{{ $regex := printf "\\{\\{\\s*\\$%s\\s*\\}\\}" $k -}}
22+
{{ $regex := printf `\{\{\s*\$%s\s*\}\}` $k -}}
2323
{{ $content = replaceRE $regex $v $content -}}
24+
{{ $_regex := `(?ms)^\{\{\s*if%s\s+\$%s\s*\}\}(.+?)^\{\{\s*end\s*\}\}` -}}
25+
{{ $regexIf := printf $_regex "" $k -}}
26+
{{ $regexIfNot := printf $_regex " not" $k -}}
27+
{{ if $v -}}
28+
{{ $content = replaceRE $regexIf "$1" $content -}}
29+
{{ $content = replaceRE $regexIfNot "" $content -}}
30+
{{ else -}}
31+
{{ $content = replaceRE $regexIf "" $content -}}
32+
{{ $content = replaceRE $regexIfNot "$1" $content -}}
33+
{{ end -}}
2434
{{ end -}}
2535
{{ end -}}
2636
{{ $content -}}

0 commit comments

Comments
 (0)