Skip to content

Commit

Permalink
Replace or add loopback address in Collector OTLP examples (#3847)
Browse files Browse the repository at this point in the history
  • Loading branch information
theletterf authored Jan 31, 2024
1 parent e9b5253 commit 018acd8
Show file tree
Hide file tree
Showing 14 changed files with 57 additions and 9 deletions.
2 changes: 2 additions & 0 deletions content/en/docs/collector/building/authenticator-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ receivers:
otlp/auth:
protocols:
grpc:
endpoint: 0.0.0.0:4317
auth:
authenticator: oidc
Expand Down Expand Up @@ -107,6 +108,7 @@ receivers:
otlp/auth:
protocols:
grpc:
endpoint: 0.0.0.0:4317
auth:
authenticator: oidc/some-provider
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/collector/building/connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: localhost:4317
endpoint: 0.0.0.0:4317
http:
endpoint: localhost:4318
endpoint: 0.0.0.0:4318

exporters:
# NOTE: Prior to v0.86.0 use the `logging` instead of `debug`.
Expand Down
2 changes: 2 additions & 0 deletions content/en/docs/collector/building/receiver.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317

processors:
batch:
Expand Down Expand Up @@ -1035,6 +1036,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
tailtracer: # this line represents the ID of your receiver
interval: 1m
number_of_traces: 1
Expand Down
33 changes: 28 additions & 5 deletions content/en/docs/collector/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,31 @@ which provide capabilities that can be added to the Collector, such as
diagnostic tools. Extensions don't require direct access to telemetry data and
are enabled through the [service](#service) section.

The following is an example of Collector configuration with a receiver, a
processor, an exporter, and three extensions:
<a id="endpoint-0.0.0.0-warning"></a> The following is an example of Collector
configuration with a receiver, a processor, an exporter, and three extensions.

{{% alert title="Important" color="warning" %}}

While it is generally preferable to bind endpoints to `localhost` when all
clients are local, our example configurations use the "unspecified" address
`0.0.0.0` as a convenience. The Collector currently defaults to `0.0.0.0`, but
the default will be changed to `localhost` in the near future. For details
concerning either of these choices as endpoint configuration value, see
[Safeguards against denial of service attacks].

[Safeguards against denial of service attacks]:
https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks

{{% /alert %}}

```yaml
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:

endpoint: 0.0.0.0:4318
processors:
batch:

Expand Down Expand Up @@ -87,7 +102,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
otlp/2:
protocols:
grpc:
Expand Down Expand Up @@ -137,6 +154,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters: ${file:exporters.yaml}
Expand All @@ -163,6 +181,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
exporters:
otlp:
Expand Down Expand Up @@ -217,6 +236,7 @@ receivers:
jaeger:
protocols:
grpc:
endpoint: 0.0.0.0:4317
thrift_binary:
thrift_compact:
thrift_http:
Expand All @@ -232,7 +252,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
# Data sources: metrics
prometheus:
Expand Down Expand Up @@ -392,7 +414,7 @@ exporters:

# Data sources: metrics
prometheus:
endpoint: localhost:8889
endpoint: 0.0.0.0:8889
namespace: default

# Data sources: metrics
Expand Down Expand Up @@ -723,6 +745,7 @@ receivers:
otlp/auth:
protocols:
grpc:
endpoint: 0.0.0.0:4317
auth:
authenticator: oidc
Expand Down Expand Up @@ -758,7 +781,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: localhost:4317
endpoint: 0.0.0.0:4317

processors:

Expand Down
3 changes: 3 additions & 0 deletions content/en/docs/collector/deployment/agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ receivers:
otlp: # the OTLP receiver the app is sending traces to
protocols:
grpc:
endpoint: 0.0.0.0:4317

processors:
batch:
Expand All @@ -66,6 +67,7 @@ receivers:
otlp: # the OTLP receiver the app is sending metrics to
protocols:
grpc:
endpoint: 0.0.0.0:4317

processors:
batch:
Expand All @@ -89,6 +91,7 @@ receivers:
otlp: # the OTLP receiver the app is sending logs to
protocols:
grpc:
endpoint: 0.0.0.0:4317

processors:
batch:
Expand Down
3 changes: 3 additions & 0 deletions content/en/docs/collector/deployment/gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317

exporters:
loadbalancing:
Expand Down Expand Up @@ -146,6 +147,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317

exporters:
loadbalancing:
Expand All @@ -171,6 +173,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317

exporters:
loadbalancing:
Expand Down
2 changes: 2 additions & 0 deletions content/en/docs/collector/scaling.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ spec:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
processors:
exporters:
Expand Down Expand Up @@ -360,6 +361,7 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
processors:
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/faas/lambda-collector.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 'localhost:4317'
endpoint: '0.0.0.0:4317'
http:
endpoint: 'localhost:4318'
endpoint: '0.0.0.0:4318'

exporters:
# NOTE: Prior to v0.86.0 use `logging` instead of `debug`.
Expand Down
2 changes: 2 additions & 0 deletions content/en/docs/kubernetes/operator/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ spec:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:

exporters:
Expand Down
2 changes: 2 additions & 0 deletions content/en/docs/kubernetes/operator/automatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ spec:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
Expand Down
2 changes: 2 additions & 0 deletions content/en/docs/languages/js/exporters.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
debug:
verbosity: detailed
Expand Down
2 changes: 2 additions & 0 deletions content/en/docs/languages/python/distro.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
# NOTE: Prior to v0.86.0 use `logging` instead of `debug`.
debug:
Expand Down
2 changes: 2 additions & 0 deletions content/en/docs/languages/python/exporters.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
debug:
verbosity: detailed
Expand Down
3 changes: 3 additions & 0 deletions content/en/docs/languages/python/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
exporters:
# NOTE: Prior to v0.86.0 use `logging` instead of `debug`.
debug:
Expand Down

0 comments on commit 018acd8

Please sign in to comment.