Skip to content

Commit

Permalink
include k8s pod name in otel resource attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
hahn-kev committed Sep 6, 2024
1 parent f957630 commit ee91e9c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion deployment/base/hg-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: K8S_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OTEL_RESOURCE_ATTRIBUTES
value: k8s.node.name=$(K8S_NODE_NAME)
value: k8s.node.name=$(K8S_NODE_NAME),k8s.pod.name=$(K8S_POD_NAME)
- name: OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST
value: ".*"
- name: OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE
Expand Down
6 changes: 5 additions & 1 deletion deployment/base/lexbox-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: K8S_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OTEL_RESOURCE_ATTRIBUTES
value: k8s.node.name=$(K8S_NODE_NAME)
value: k8s.node.name=$(K8S_NODE_NAME),k8s.pod.name=$(K8S_POD_NAME)
- name: OTEL_DOTNET_EXPERIMENTAL_ASPNETCORE_DISABLE_URL_QUERY_REDACTION
value: 'true'
- name: POSTGRES_DB
Expand Down
6 changes: 5 additions & 1 deletion deployment/base/ui-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: K8S_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: OTEL_RESOURCE_ATTRIBUTES
value: k8s.node.name=$(K8S_NODE_NAME)
value: k8s.node.name=$(K8S_NODE_NAME),k8s.pod.name=$(K8S_POD_NAME)
- name: OTEL_ENDPOINT
value: http://lexbox:4318

Expand Down

0 comments on commit ee91e9c

Please sign in to comment.