Skip to content

Commit

Permalink
chore: Support connecting to uptrace in kubernetes cluster. (#3796)
Browse files Browse the repository at this point in the history
Configure it like
```yaml
otel:
  enabled: true

uptrace:
  enabled: true
  service: "up2-uptrace.uptrace2"
  token: "project2_secret_token"
```
  • Loading branch information
siyuan0322 authored May 14, 2024
1 parent 27c951c commit 2e29445
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 9 deletions.
18 changes: 17 additions & 1 deletion charts/graphscope-store/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,28 @@ data:
export GROOT_CONF_FILE=/etc/groot/groot.config
export OTEL_SDK_DISABLED={{ not .Values.otel.enabled }}
{{- if .Values.otel.enabled }}
export OTEL_SERVICE_NAME="compiler"
export OTEL_TRACES_SAMPLER={{ .Values.otel.traces.sampler.name }}
export OTEL_TRACES_SAMPLER_ARG={{ .Values.otel.traces.sampler.arg }}
export OTEL_SERVICE_NAME=groot
export OTEL_RESOURCE_ATTRIBUTES=service.name=groot,service.version=1.0.0
export OTEL_TRACES_EXPORTER=otlp
export OTEL_METRICS_EXPORTER=otlp
export OTEL_LOGS_EXPORTER=otlp
export OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE=DELTA
export OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=BASE2_EXPONENTIAL_BUCKET_HISTOGRAM
export OTEL_EXPORTER_OTLP_COMPRESSION=gzip
{{- end }}
{{- if .Values.uptrace.enabled }}
export OTEL_EXPORTER_OTLP_ENDPOINT=http://{{ .Values.uptrace.service }}:14317
export OTEL_EXPORTER_OTLP_HEADERS=uptrace-dsn=http://{{ .Values.uptrace.token }}@${{ .Values.uptrace.service }}:14318?grpc=14317
{{- end }}
# For core and heap profiling
# ulimit -c unlimited
# sudo mkdir -p /apsara/cloud/data/corefile/ && sudo chown -R graphscope:graphscope /apsara/cloud/data/corefile/
Expand Down
8 changes: 8 additions & 0 deletions charts/graphscope-store/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -520,5 +520,13 @@ otel:
name: "traceidratio"
arg: "0.1"

uptrace:
enabled: false
# uptrace service endpoint, could be DNS name of uptrace service
# for example: "service-name.namespace", "my-uptrace.uptrace"
service: "uptrace"
# token is set within uptrace config
token: "project2_secret_token"

distributed:
enabled: false
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ nohash-hasher = "0.2.0"
ahash = "0.7.2"
dot = "0.1.4"
dyn-clonable = "0.9.0"
opentelemetry = { version = "0.22.0", features = ["trace"] }
opentelemetry = { version = "0.22.0", features = ["trace", "metrics"] }

[features]
mem = ["pegasus_memory/mem"]
Expand Down
7 changes: 3 additions & 4 deletions interactive_engine/executor/engine/pegasus/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ serde = { version = "1.0", features = ["derive"] }
hyper = "0.14"
futures = { version = "0.3", default-features = false }
libloading = "0.7"
opentelemetry = { version = "0.22.0", features = ["trace"] }
opentelemetry_sdk = { version = "0.22.0", features = ["async-std", "rt-tokio"] }
opentelemetry-otlp = { version = "0.15.0", features = ["default", "metrics"] }

opentelemetry = { version = "0.22.0", features = ["trace", "metrics"] }
opentelemetry_sdk = { version = "0.22.0", features = ["trace", "metrics", "async-std", "rt-tokio"] }
opentelemetry-otlp = { version = "0.15.0", features = ["trace", "metrics", "grpc-tonic", "gzip-tonic"] }

[dev-dependencies]
#libloading = "0.7"
Expand Down
3 changes: 0 additions & 3 deletions k8s/dockerfiles/graphscope-store.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ RUN if [ "${ENABLE_COORDINATOR}" = "true" ]; then \
USER graphscope
WORKDIR /home/graphscope

ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar /home/graphscope/
RUN sudo chown $(id -u):$(id -g) /home/graphscope/opentelemetry-javaagent.jar

ENV PATH=${PATH}:/home/graphscope/.local/bin
ENV SOLUTION=GRAPHSCOPE_INSIGHT

Expand Down

0 comments on commit 2e29445

Please sign in to comment.