Skip to content

Commit

Permalink
feat: Instrument feature store to get the system level metrics
Browse files Browse the repository at this point in the history
Signed-off-by: Twinkll Sisodia <tsisodia@redhat.com>
  • Loading branch information
tsisodia10 committed Jun 18, 2024
1 parent fbf92da commit a75c6f2
Show file tree
Hide file tree
Showing 6 changed files with 397 additions and 11 deletions.
12 changes: 9 additions & 3 deletions infra/charts/feast-feature-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: {{ include "feast-feature-server.fullname" . }}
labels:
{{- include "feast-feature-server.labels" . | nindent 4 }}
{{- include "feast-feature-server.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
Expand All @@ -13,7 +13,7 @@ spec:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "feast-feature-server.selectorLabels" . | nindent 8 }}
Expand Down Expand Up @@ -53,6 +53,12 @@ spec:
- "-h"
- "0.0.0.0"
{{- end }}
value: {{ .Values.feature_store_yaml_base64 }}
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://otel-collector.feast-test.svc.cluster.local:4317/v1/metrics"
- name: OTEL_EXPORTER_OTLP_INSECURE
value: "true"
command: ["feast", "serve", "-h", "0.0.0.0"]
ports:
- name: {{ .Values.feast_mode }}
{{- if eq .Values.feast_mode "offline" }}
Expand All @@ -76,7 +82,7 @@ spec:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
8 changes: 8 additions & 0 deletions infra/charts/feast-feature-server/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,13 @@ spec:
targetPort: {{ .Values.feast_mode }}
protocol: TCP
name: http
- port: 4317
targetPort: 4317
protocol: TCP
name: otel-grpc
- port: 4318
targetPort: 4318
protocol: TCP
name: otel-http
selector:
{{- include "feast-feature-server.selectorLabels" . | nindent 4 }}
3 changes: 2 additions & 1 deletion sdk/python/feast/feature_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def get_app(
store: "feast.FeatureStore",
registry_ttl_sec: int = DEFAULT_FEATURE_SERVER_REGISTRY_TTL,
):
"""Start the Feast server with metrics"""

proto_json.patch()
# Asynchronously refresh registry, notifying shutdown and canceling the active timer if the app is shutting down
registry_proto = None
Expand Down Expand Up @@ -217,7 +219,6 @@ def load_config(self):
def load(self):
return self._app


def start_server(
store: "feast.FeatureStore",
host: str,
Expand Down
Loading

0 comments on commit a75c6f2

Please sign in to comment.