Visual presentation and Resource Detection for eks
lifeofmoo opened this issue · 4 comments
Describe the bug
This is more of a question of functionality rather then a potential bug.
My issue is similar to a previously reported bug.
Is it possible to expose and present infra metadata in x-ray?
At the moment the resources appear in x-ray but states my pods are coming from the origin: AWS::EC2::Instance.
I was hoping this would be a bit more specific and say that rather being an EC2 instance (while strictly true) it belongs to the eks cluster (eksstg).
I've configure the following for this app:
- name: AWS_REGION
value: eu-west-1
- name: LISTEN_ADDRESS
value: 0.0.0.0:8080
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: http://my-collector-xray-collector.otel:4317
- name: OTEL_RESOURCE_ATTRIBUTES
value: service.namespace=content,service.name=archive-web,k8s.cluster.name=eksstg
- name: OTEL_SERVICE_NAME
value: archive-web
- name: OTEL_TRACES_EXPORTER
value: otlp
- name: OTEL_METRICS_EXPORTER
value: none
The collector config
Version: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: my-collector-xray
spec:
mode: deployment
resources:
requests:
cpu: "1"
limits:
cpu: "1"
serviceAccount: adot-collector
config: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
batch/traces:
timeout: 1s
send_batch_size: 50
resourcedetection/eks:
detectors: [env, eks]
timeout: 2s
override: false
#taken from here
# https://opentelemetry.io/docs/collector/configuration/#processors
resource:
attributes:
- key: cloud.zone
value: "zone-1"
action: upsert
- key: k8s.cluster.name
from_attribute: k8s-cluster
action: insert
- key: redundant-attribute
action: delete
exporters:
awsxray:
region: eu-west-1
logging:
loglevel: debug
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch/traces]
exporters: [awsxray,logging]
telemetry:
logs:
level: debug
my setup
- eks v1.22
- aws otel agent (Release v1.21.1)
- latest Adot operator installed via Deployment mode (v0.66.0-eksbuild.1)
The suggestions from the bug above goes on to say I should enable Resource Detection.
Firstly could someone confirm if the correct implementation of the Detector should be (as per the original bug suggestion:
processors:
resourcedetection/env:
detectors: [env]
timeout: 2s
override: false
or
processors:
resourcedetection/eks:
detectors: [env, eks]
timeout: 2s
override: false
Regards,
Ben
Your resourcedetection/env
processor config looks good for detecting EKS platform, but you missed it in your pipelines/traces
configuration section.
pipelines:
traces:
receivers: [otlp]
processors: [resourcedetection/env, batch/traces]
exporters: [awsxray,logging]
Thanks for spotting that.
I've added the below but it's not change anything visually - any other suggestions are very welcome.
processors: [resourcedetection/eks, batch/traces]
This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled
This issue was closed because it has been marked as stale for 30 days with no activity.