Skip to content

Commit 663f010

Browse files
Merge pull request #3678 from jdegendt/main
[tempo-distributed] Add OTEL gRPC support for the Tempo gateway
2 parents 32c82c0 + 7efb1a9 commit 663f010

File tree

6 files changed

+86
-2
lines changed

6 files changed

+86
-2
lines changed

charts/tempo-distributed/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: tempo-distributed
33
description: Grafana Tempo in MicroService mode
44
type: application
5-
version: 1.43.0
5+
version: 1.44.0
66
appVersion: 2.8.1
77
engine: gotpl
88
home: https://grafana.com/docs/tempo/latest/

charts/tempo-distributed/README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# tempo-distributed
22

3-
![Version: 1.43.0](https://img.shields.io/badge/Version-1.43.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.1](https://img.shields.io/badge/AppVersion-2.8.1-informational?style=flat-square)
3+
![Version: 1.44.0](https://img.shields.io/badge/Version-1.44.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.1](https://img.shields.io/badge/AppVersion-2.8.1-informational?style=flat-square)
44

55
Grafana Tempo in MicroService mode
66

@@ -993,6 +993,7 @@ The memcached default args are removed and should be provided manually. The sett
993993
| traces.opencensus.enabled | bool | `false` | Enable Tempo to ingest Open Census traces |
994994
| traces.opencensus.receiverConfig | object | `{}` | Open Census receiver config |
995995
| traces.otlp.grpc.enabled | bool | `false` | Enable Tempo to ingest Open Telemetry GRPC traces |
996+
| traces.otlp.grpc.port | int | `4317` | Default OTLP gRPC port |
996997
| traces.otlp.grpc.receiverConfig | object | `{}` | GRPC receiver advanced config |
997998
| traces.otlp.http.enabled | bool | `false` | Enable Tempo to ingest Open Telemetry HTTP traces |
998999
| traces.otlp.http.receiverConfig | object | `{}` | HTTP receiver advanced config |
@@ -1134,3 +1135,26 @@ config: |
11341135
service: memcached-client
11351136
timeout: 500ms
11361137
```
1138+
1139+
### Enabling gRPC Open Telemetry
1140+
1141+
gRPC for Open Telemetry is disabled by default, simply flip the bool in the `traces` block to turn it on.
1142+
1143+
If you have enabled the gateway as well, this will let you push traces using the default Open Telemetry API path (`/opentelemetry.proto.collector.trace.v1.TraceService/Export`), on the 4317 port. This port can be overwriten as well in the values.
1144+
1145+
```yaml
1146+
traces:
1147+
otlp:
1148+
http:
1149+
# -- Enable Tempo to ingest Open Telemetry HTTP traces
1150+
enabled: false
1151+
# -- HTTP receiver advanced config
1152+
receiverConfig: {}
1153+
grpc:
1154+
# -- Enable Tempo to ingest Open Telemetry GRPC traces
1155+
enabled: true
1156+
# -- GRPC receiver advanced config
1157+
receiverConfig: {}
1158+
# -- Default OTLP gRPC port
1159+
port: 4317
1160+
```

charts/tempo-distributed/README.md.gotmpl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,3 +391,26 @@ config: |
391391
service: memcached-client
392392
timeout: 500ms
393393
```
394+
395+
### Enabling gRPC Open Telemetry
396+
397+
gRPC for Open Telemetry is disabled by default, simply flip the bool in the `traces` block to turn it on.
398+
399+
If you have enabled the gateway as well, this will let you push traces using the default Open Telemetry API path (`/opentelemetry.proto.collector.trace.v1.TraceService/Export`), on the 4317 port. This port can be overwriten as well in the values.
400+
401+
```yaml
402+
traces:
403+
otlp:
404+
http:
405+
# -- Enable Tempo to ingest Open Telemetry HTTP traces
406+
enabled: false
407+
# -- HTTP receiver advanced config
408+
receiverConfig: {}
409+
grpc:
410+
# -- Enable Tempo to ingest Open Telemetry GRPC traces
411+
enabled: true
412+
# -- GRPC receiver advanced config
413+
receiverConfig: {}
414+
# -- Default OTLP gRPC port
415+
port: 4317
416+
```

charts/tempo-distributed/templates/gateway/deployment-gateway.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ spec:
6262
- name: http-metrics
6363
containerPort: 8080
6464
protocol: TCP
65+
{{- if .Values.traces.otlp.grpc.enabled }}
66+
- name: grpc-otlp
67+
containerPort: {{ .Values.traces.otlp.grpc.port }}
68+
protocol: TCP
69+
{{- end }}
6570
{{- if or .Values.global.extraEnv .Values.gateway.extraEnv }}
6671
env:
6772
{{- with .Values.global.extraEnv }}

charts/tempo-distributed/templates/gateway/service-gateway.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ spec:
2929
nodePort: {{ .Values.gateway.service.nodePort }}
3030
{{- end }}
3131
protocol: TCP
32+
{{- if .Values.traces.otlp.grpc.enabled }}
33+
- name: grpc-otlp
34+
port: {{ .Values.traces.otlp.grpc.port }}
35+
targetPort: grpc-otlp
36+
protocol: TCP
37+
{{- end }}
3238
{{ range .Values.gateway.service.additionalPorts }}
3339
- name: {{ .name }}
3440
port: {{ .port }}

charts/tempo-distributed/values.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,8 @@ traces:
12111211
enabled: false
12121212
# -- GRPC receiver advanced config
12131213
receiverConfig: {}
1214+
# -- Default OTLP gRPC port
1215+
port: 4317
12141216
opencensus:
12151217
# -- Enable Tempo to ingest Open Census traces
12161218
enabled: false
@@ -2193,6 +2195,30 @@ gateway:
21932195
{{ . | nindent 4 }}
21942196
{{- end }}
21952197
}
2198+
2199+
{{- if .Values.traces.otlp.grpc.enabled }}
2200+
# OTLP gRPC
2201+
server {
2202+
listen {{ .Values.traces.otlp.grpc.port }} http2;
2203+
2204+
{{- if .Values.gateway.basicAuth.enabled }}
2205+
auth_basic "Tempo";
2206+
auth_basic_user_file /etc/nginx/secrets/.htpasswd;
2207+
{{- end }}
2208+
2209+
location = /opentelemetry.proto.collector.trace.v1.TraceService/Export {
2210+
grpc_pass grpc://{{ include "tempo.resourceName" (dict "ctx" . "component" "distributor") }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.traces.otlp.grpc.port }};
2211+
}
2212+
2213+
location ~ /opentelemetry {
2214+
grpc_pass grpc://{{ include "tempo.resourceName" (dict "ctx" . "component" "distributor") }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}:{{ .Values.traces.otlp.grpc.port }};
2215+
}
2216+
2217+
{{- with .Values.gateway.nginxConfig.serverSnippet }}
2218+
{{ . | nindent 4 }}
2219+
{{- end }}
2220+
}
2221+
{{- end }}
21962222
}
21972223
21982224
ingress:

0 commit comments

Comments
 (0)