Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add warning for otlp over grpc #15495

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,22 @@ spec:
EOF
{{< /text >}}

{{< warning >}}
To actually receive traces, you need to [explicitly set the protocol](/docs/ops/configuration/traffic-management/protocol-selection/#explicit-protocol-selection). Ensure that the gRPC port for your OpenTelemetry Collector service has either the `appProtocol` set to `grpc` or that its name starts with the `grpc-` prefix. The following example demonstrates both configurations:

{{< text syntax=yaml >}}
spec:
ports:
- name: grpc-otlp
port: 4317
protocol: TCP
targetPort: 4317
appProtocol: grpc
{{< /text >}}

Otherwise the traces may not be reported.
verysonglaa marked this conversation as resolved.
Show resolved Hide resolved
{{< /warning >}}

### Exporting via HTTP

In this example, traces will be exported via OTLP/HTTP to the OpenTelemetry Collector.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@
source "content/en/boilerplates/snips/start-otel-collector-service.sh"
source "content/en/boilerplates/snips/trace-generation.sh"

! IFS=$'\n' read -r -d '' snip_exporting_via_grpc_2 <<\ENDSNIP
spec:
ports:
- name: grpc-otlp
port: 4317
protocol: TCP
targetPort: 4317
appProtocol: grpc
ENDSNIP

snip_install_otlp_http() {
cat <<EOF | istioctl install --set values.pilot.env.PILOT_ENABLE_CONFIG_DISTRIBUTION_TRACKING=true -y -f -
apiVersion: install.istio.io/v1alpha1
Expand Down