Skip to content

Commit 8bb5ff6

Browse files
sallyomclaude
andauthored
Update tracing configs (llm-d-incubation#205)
* add tracing routing-proxy env vars Signed-off-by: sallyom <somalley@redhat.com> * Rename global.tracing to tracing in modelservice chart Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: sallyom <somalley@redhat.com> * feat: default tracing endpoint to otel-collector Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: sallyom <somalley@redhat.com> --------- Signed-off-by: sallyom <somalley@redhat.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8da997f commit 8bb5ff6

19 files changed

Lines changed: 261 additions & 239 deletions

charts/llm-d-modelservice/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: "v0.4.6"
16+
version: "v0.4.7"
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.

charts/llm-d-modelservice/templates/_helpers.tpl

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,19 @@ affinity:
125125
{{- end }}
126126
image: {{ required "routing.proxy.image must be specified" .proxy.image }}
127127
imagePullPolicy: {{ default "Always" .proxy.imagePullPolicy }}
128+
env:
129+
{{- if and .Values.tracing .Values.tracing.enabled }}
130+
- name: OTEL_SERVICE_NAME
131+
value: {{ .Values.tracing.serviceNames.routingProxy | quote }}
132+
- name: OTEL_EXPORTER_OTLP_ENDPOINT
133+
value: {{ .Values.tracing.otlpEndpoint | quote }}
134+
- name: OTEL_TRACES_EXPORTER
135+
value: "otlp"
136+
- name: OTEL_TRACES_SAMPLER
137+
value: {{ .Values.tracing.sampling.sampler | quote }}
138+
- name: OTEL_TRACES_SAMPLER_ARG
139+
value: {{ .Values.tracing.sampling.samplerArg | quote }}
140+
{{- end }}
128141
ports:
129142
- containerPort: {{ default 8000 .servicePort }}
130143
resources: {}
@@ -475,7 +488,7 @@ context is a dict with helm root context plus:
475488
{{- /* Add accelerator-specific environment variables */}}
476489
{{- $acceleratorEnv := include "llm-d-modelservice.acceleratorEnv" . }}
477490
{{- if $acceleratorEnv }}{{ $acceleratorEnv | nindent 2 }}{{- end }}
478-
{{- /* Add tracing environment variables from global config */}}
491+
{{- /* Add tracing environment variables */}}
479492
{{- (include "llm-d-modelservice.tracingEnv" .) | nindent 2 }}
480493
{{- with .container.ports }}
481494
ports:
@@ -569,7 +582,7 @@ args:
569582
{{- end }}
570583
- --served-model-name
571584
- {{ .Values.modelArtifacts.name | quote }}
572-
{{- /* Add tracing args from global config */}}
585+
{{- /* Add tracing args */}}
573586
{{- (include "llm-d-modelservice.vllmTracingArgs" .) | nindent 2 }}
574587
{{- with .container.args }}
575588
{{ toYaml . | nindent 2 }}
@@ -599,7 +612,7 @@ args:
599612
{{- end }}
600613
- --served-model-name
601614
- {{ .Values.modelArtifacts.name | quote }}
602-
{{- /* Add tracing args from global config */}}
615+
{{- /* Add tracing args */}}
603616
{{- (include "llm-d-modelservice.vllmTracingArgs" .) | nindent 2 }}
604617
{{- with .container.args }}
605618
{{ toYaml . | nindent 2 }}
@@ -686,40 +699,40 @@ context is a dict with helm root context plus:
686699

687700
{{/*
688701
OpenTelemetry tracing environment variables for vLLM containers
689-
Requires: .Values.global.tracing, .role ("decode" or "prefill")
702+
Requires: .Values.tracing, .role ("decode" or "prefill")
690703
Returns: YAML list of environment variables if tracing is enabled, empty otherwise
691704
*/}}
692705
{{- define "llm-d-modelservice.tracingEnv" -}}
693-
{{- if and .Values.global.tracing .Values.global.tracing.enabled }}
706+
{{- if and .Values.tracing .Values.tracing.enabled }}
694707
{{- $serviceName := "" }}
695708
{{- if eq .role "decode" }}
696-
{{- $serviceName = .Values.global.tracing.serviceNames.vllmDecode }}
709+
{{- $serviceName = .Values.tracing.serviceNames.vllmDecode }}
697710
{{- else if eq .role "prefill" }}
698-
{{- $serviceName = .Values.global.tracing.serviceNames.vllmPrefill }}
711+
{{- $serviceName = .Values.tracing.serviceNames.vllmPrefill }}
699712
{{- end }}
700713
- name: OTEL_SERVICE_NAME
701714
value: {{ $serviceName | quote }}
702715
- name: OTEL_EXPORTER_OTLP_ENDPOINT
703-
value: {{ .Values.global.tracing.otlpEndpoint | quote }}
716+
value: {{ .Values.tracing.otlpEndpoint | quote }}
704717
- name: OTEL_TRACES_EXPORTER
705718
value: "otlp"
706719
- name: OTEL_TRACES_SAMPLER
707-
value: {{ .Values.global.tracing.sampling.sampler | quote }}
720+
value: {{ .Values.tracing.sampling.sampler | quote }}
708721
- name: OTEL_TRACES_SAMPLER_ARG
709-
value: {{ .Values.global.tracing.sampling.samplerArg | quote }}
722+
value: {{ .Values.tracing.sampling.samplerArg | quote }}
710723
{{- end }}
711724
{{- end }} {{- /* define "llm-d-modelservice.tracingEnv" */}}
712725

713726
{{/*
714727
vLLM tracing command-line arguments
715-
Requires: .Values.global.tracing
728+
Requires: .Values.tracing
716729
Returns: YAML list of vLLM args (--otlp-traces-endpoint, --collect-detailed-traces) if tracing is enabled
717730
*/}}
718731
{{- define "llm-d-modelservice.vllmTracingArgs" -}}
719-
{{- if and .Values.global.tracing .Values.global.tracing.enabled }}
732+
{{- if and .Values.tracing .Values.tracing.enabled }}
720733
- --otlp-traces-endpoint
721-
- {{ .Values.global.tracing.otlpEndpoint | quote }}
734+
- {{ .Values.tracing.otlpEndpoint | quote }}
722735
- --collect-detailed-traces
723-
- {{ .Values.global.tracing.vllm.collectDetailedTraces | quote }}
736+
- {{ .Values.tracing.vllm.collectDetailedTraces | quote }}
724737
{{- end }}
725738
{{- end }} {{- /* define "llm-d-modelservice.vllmTracingArgs" */}}

charts/llm-d-modelservice/templates/decode-deployment.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ spec:
3939
{{- end }}
4040
{{- if or (.Values.decode.initContainers) (eq .Values.routing.proxy.enabled true) }}
4141
initContainers:
42-
{{- with .Values.routing }}
43-
{{- (include "llm-d-modelservice.routingProxy" .) | nindent 8 }}
44-
{{- end }}
42+
{{- (include "llm-d-modelservice.routingProxy" (dict "proxy" .Values.routing.proxy "servicePort" .Values.routing.servicePort "Values" .Values)) | nindent 8 }}
4543
{{- if .Values.decode.initContainers }}
4644
{{- toYaml .Values.decode.initContainers | nindent 8 }}
4745
{{- end }}

charts/llm-d-modelservice/templates/decode-lws.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ spec:
5757
{{- end }}
5858
{{- if or (.Values.decode.initContainers) (eq .Values.routing.proxy.enabled true) }}
5959
initContainers:
60-
{{- with .Values.routing }}
61-
{{- (include "llm-d-modelservice.routingProxy" .) | nindent 8 }}
62-
{{- end }}
60+
{{- (include "llm-d-modelservice.routingProxy" (dict "proxy" .Values.routing.proxy "servicePort" .Values.routing.servicePort "Values" .Values)) | nindent 8 }}
6361
{{- if .Values.decode.initContainers }}
6462
{{- toYaml .Values.decode.initContainers | nindent 10 }}
6563
{{- end }}

charts/llm-d-modelservice/templates/decode-requester-replicaset.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ spec:
2424
spec:
2525
{{- if or (.Values.decode.initContainers) (eq .Values.routing.proxy.enabled true) }}
2626
initContainers:
27-
{{- with .Values.routing }}
28-
{{- (include "llm-d-modelservice.routingProxy" .) | nindent 12 }}
29-
{{- end }}
27+
{{- (include "llm-d-modelservice.routingProxy" (dict "proxy" .Values.routing.proxy "servicePort" .Values.routing.servicePort "Values" .Values)) | nindent 12 }}
3028
{{- if .Values.decode.initContainers }}
3129
{{- toYaml .Values.decode.initContainers | nindent 12 }}
3230
{{- end }}

charts/llm-d-modelservice/values.schema.json

Lines changed: 83 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,86 +1983,10 @@
19831983
"title": "fullnameOverride"
19841984
},
19851985
"global": {
1986-
"additionalProperties": false,
1987-
"description": "Name of the scheduler to use for scheduling model pods schedulerName: default-scheduler Global configuration that can be referenced by subcharts and components",
1988-
"properties": {
1989-
"tracing": {
1990-
"additionalProperties": false,
1991-
"description": " When enabled, vLLM containers will export traces to the OTLP endpoint",
1992-
"properties": {
1993-
"enabled": {
1994-
"default": "false",
1995-
"description": "Enable distributed tracing for vLLM containers",
1996-
"required": [],
1997-
"title": "enabled"
1998-
},
1999-
"otlpEndpoint": {
2000-
"default": "http://opentelemetry-collector.monitoring.svc.cluster.local:4317",
2001-
"description": "OTLP gRPC endpoint for trace export (e.g., OpenTelemetry Collector) Override via: export OTEL_COLLECTOR_ENDPOINT=\"http://your-collector:4317\"",
2002-
"required": [],
2003-
"title": "otlpEndpoint"
2004-
},
2005-
"sampling": {
2006-
"additionalProperties": false,
2007-
"description": "Trace sampling configuration",
2008-
"properties": {
2009-
"sampler": {
2010-
"default": "parentbased_traceidratio",
2011-
"description": "OpenTelemetry sampler type (e.g., \"parentbased_traceidratio\", \"always_on\", \"always_off\")",
2012-
"required": [],
2013-
"title": "sampler"
2014-
},
2015-
"samplerArg": {
2016-
"default": "1.0",
2017-
"description": "Sampling ratio (0.0 to 1.0). Use 1.0 for 100% sampling (demo/debug), 0.1 for 10% (production)",
2018-
"required": [],
2019-
"title": "samplerArg"
2020-
}
2021-
},
2022-
"required": [],
2023-
"title": "sampling"
2024-
},
2025-
"serviceNames": {
2026-
"additionalProperties": false,
2027-
"description": "Service name overrides for different components",
2028-
"properties": {
2029-
"vllmDecode": {
2030-
"default": "vllm-decode",
2031-
"description": "Service name for vLLM decode instances",
2032-
"required": [],
2033-
"title": "vllmDecode"
2034-
},
2035-
"vllmPrefill": {
2036-
"default": "vllm-prefill",
2037-
"description": "Service name for vLLM prefill instances",
2038-
"required": [],
2039-
"title": "vllmPrefill"
2040-
}
2041-
},
2042-
"required": [],
2043-
"title": "serviceNames"
2044-
},
2045-
"vllm": {
2046-
"additionalProperties": false,
2047-
"description": "vLLM-specific tracing options",
2048-
"properties": {
2049-
"collectDetailedTraces": {
2050-
"default": "all",
2051-
"description": "Level of trace detail collection (e.g., \"all\", \"model\", \"scheduler\")",
2052-
"required": [],
2053-
"title": "collectDetailedTraces"
2054-
}
2055-
},
2056-
"required": [],
2057-
"title": "vllm"
2058-
}
2059-
},
2060-
"required": [],
2061-
"title": "tracing"
2062-
}
2063-
},
1986+
"description": "Global values are values that can be accessed from any chart or subchart by exactly the same name.",
20641987
"required": [],
2065-
"title": "global"
1988+
"title": "global",
1989+
"type": "object"
20661990
},
20671991
"modelArtifacts": {
20681992
"additionalProperties": false,
@@ -3847,6 +3771,86 @@
38473771
"description": "Override to default pod serviceAccountName",
38483772
"required": [],
38493773
"title": "serviceAccountOverride"
3774+
},
3775+
"tracing": {
3776+
"additionalProperties": false,
3777+
"description": "Name of the scheduler to use for scheduling model pods schedulerName: default-scheduler OpenTelemetry distributed tracing configuration When enabled, vLLM and routing-proxy containers will export traces to the OTLP endpoint",
3778+
"properties": {
3779+
"enabled": {
3780+
"default": "false",
3781+
"description": "Enable distributed tracing",
3782+
"required": [],
3783+
"title": "enabled"
3784+
},
3785+
"otlpEndpoint": {
3786+
"default": "http://otel-collector:4317",
3787+
"description": "OTLP gRPC endpoint for trace export (OTel Collector in the same namespace)",
3788+
"required": [],
3789+
"title": "otlpEndpoint"
3790+
},
3791+
"sampling": {
3792+
"additionalProperties": false,
3793+
"description": "Trace sampling configuration",
3794+
"properties": {
3795+
"sampler": {
3796+
"default": "parentbased_traceidratio",
3797+
"description": "OpenTelemetry sampler type (e.g., \"parentbased_traceidratio\", \"always_on\", \"always_off\")",
3798+
"required": [],
3799+
"title": "sampler"
3800+
},
3801+
"samplerArg": {
3802+
"default": "1.0",
3803+
"description": "Sampling ratio (0.0 to 1.0). Use 1.0 for 100% sampling (demo/debug), 0.1 for 10% (production)",
3804+
"required": [],
3805+
"title": "samplerArg"
3806+
}
3807+
},
3808+
"required": [],
3809+
"title": "sampling"
3810+
},
3811+
"serviceNames": {
3812+
"additionalProperties": false,
3813+
"description": "Service name overrides for different components",
3814+
"properties": {
3815+
"routingProxy": {
3816+
"default": "routing-proxy",
3817+
"description": "Service name for routing proxy sidecar",
3818+
"required": [],
3819+
"title": "routingProxy"
3820+
},
3821+
"vllmDecode": {
3822+
"default": "vllm-decode",
3823+
"description": "Service name for vLLM decode instances",
3824+
"required": [],
3825+
"title": "vllmDecode"
3826+
},
3827+
"vllmPrefill": {
3828+
"default": "vllm-prefill",
3829+
"description": "Service name for vLLM prefill instances",
3830+
"required": [],
3831+
"title": "vllmPrefill"
3832+
}
3833+
},
3834+
"required": [],
3835+
"title": "serviceNames"
3836+
},
3837+
"vllm": {
3838+
"additionalProperties": false,
3839+
"description": "vLLM-specific tracing options",
3840+
"properties": {
3841+
"collectDetailedTraces": {
3842+
"default": "all",
3843+
"description": "Level of trace detail collection (e.g., \"all\", \"model\", \"scheduler\")",
3844+
"required": [],
3845+
"title": "collectDetailedTraces"
3846+
}
3847+
},
3848+
"required": [],
3849+
"title": "vllm"
3850+
}
3851+
},
3852+
"required": [],
3853+
"title": "tracing"
38503854
}
38513855
},
38523856
"required": [],

0 commit comments

Comments
 (0)