我们有内部部署的k8s群集,其中所有内容都使用Datadog进行监控,此时我们正面临着麻烦。在Datadog APM控制面板中,我们看到了有关请求和总体信息的信息,但跟踪为空。我找到了有关Java跟踪的article,执行了相同操作,但从pod中得到错误
[dd.trace 2023-01-26 07:40:33:818 +0000] [dd-trace-processor] WARN datadog.trace.agent.common.writer.ddagent.DDAgentApi - Error while sending 1 (size=2KB) traces. Total: 1, Received: 1, Sent: 0, Failed: 1. java.net.ConnectException: Failed to connect to /X.X.X.X:8126 (Will not log errors for 5 minutes)
[dd.trace 2023-01-26 07:41:23:838 +0000] [OkHttp http://X.X.X.X:8126/...] WARN com.datadog.profiling.uploader.ProfileUploader - Failed to upload profile to http://X.X.X.X:8126/profiling/v1/input java.net.ConnectException: Failed to connect to /X.X.X.X:8126 (Will not log errors for 5 minutes)
X.X.X.X是工作节点IP地址
这里是数据狗 Helm Chart
这是测试java应用程序
apiVersion: v1
kind: Pod
metadata:
name: java
annotations:
admission.datadoghq.com/java-lib.version: "v1.5.0"
admission.datadoghq.com/js-lib.version: "latest"
admission.datadoghq.com/python-lib.version: "latest"
labels:
app: java
tags.datadoghq.com/env: "dev"
tags.datadoghq.com/service: "java"
tags.datadoghq.com/version: "1.11.1"
admission.datadoghq.com/enabled: "true"
spec:
containers:
- name: java
image: nilushancosta/datadog-java-apm-demo
ports:
- name: java
containerPort: 8080
env:
- name: DD_LOGS_INJECTION
value: "true"
- name: DD_ENV
valueFrom:
fieldRef:
fieldPath: metadata.labels['tags.datadoghq.com/env']
- name: DD_SERVICE
valueFrom:
fieldRef:
fieldPath: metadata.labels['tags.datadoghq.com/service']
- name: DD_VERSION
valueFrom:
fieldRef:
fieldPath: metadata.labels['tags.datadoghq.com/version']
- name: DD_SERVICE_NAME
valueFrom:
fieldRef:
fieldPath: metadata.labels['tags.datadoghq.com/service']
- name: DD_PROFILING_ENABLED
value: "true"
- name: DD_TRACE_ANALYTICS_ENABLED
value: "true"
- name: DD_LOGS_INJECTION
value: "true"
- name: DD_TRACE_ENABLED
value: "true"
- name: DD_INSTRUMENTATION_TELEMETRY_ENABLED
value: "true"
---
apiVersion: v1
kind: Service
metadata:
labels:
app: java
name: java
namespace: default
spec:
selector:
app: java
ports:
- name: java
port: 80
targetPort: 8080```
1条答案
按热度按时间guykilcj1#
你能找到这个问题的解决方案吗?我也面临着类似的问题(开始使用Datadog),我对此感到困惑。
此外,关于此注解“admission.datadoghq.com/java-lib.version:“v1.5.0”,使用v1.5.0的原因是什么?应用程序是java版本还是因为任何其他原因?
谢谢!很抱歉不能帮助你,虽然如果我找到了解决方案,我会很快张贴在这里:)