diff --git a/docs/send-data/kubernetes/troubleshoot-collection.md b/docs/send-data/kubernetes/troubleshoot-collection.md index 92549662b8..898272fe34 100644 --- a/docs/send-data/kubernetes/troubleshoot-collection.md +++ b/docs/send-data/kubernetes/troubleshoot-collection.md @@ -696,6 +696,31 @@ Then, look at the Sumo Logic Mock logs: 2024-02-13T14:19:56.412Z DEBUG [sumologic_mock::router::otlp] Span => name: ancestor-7, span_id: 34b7b7f27d6a9d86, parent_span_id: 2ef9759def53f709, trace_id: f7563cc4ef721e1d14974eea71e20b55 ``` +## Collecting traces + +The environment variables that java autoinstrumentation injects a pod with look like below + +```yaml +Environment: + OTEL_NODE_IP: (v1:status.hostIP) + OTEL_POD_IP: (v1:status.podIP) + OTEL_METRICS_EXPORTER: otlp + OTEL_TRACES_EXPORTER: otlp + OTEL_EXPORTER_OTLP_PROTOCOL: http/protobuf + OTEL_EXPORTER_OTLP_ENDPOINT: http://sumo-sumologic-otelagent.observability:4318 + JAVA_TOOL_OPTIONS: -javaagent:/otel-auto-instrumentation-java/javaagent.jar + OTEL_APPLICATION_NAMESPACE_NAME: default + OTEL_SERVICE_NAME: java-app + OTEL_RESOURCE_ATTRIBUTES_POD_NAME: java-app-58cdff4f7b-2zv5q (v1:metadata.name) + OTEL_RESOURCE_ATTRIBUTES_NODE_NAME: (v1:spec.nodeName) + OTEL_PROPAGATORS: tracecontext,baggage + OTEL_RESOURCE_ATTRIBUTES: application=default,k8s.container.name=javaapp,k8s.deployment.name=java-app,k8s.namespace.name=default,k8s.node.name=$(OTEL_RESOURCE_ATTRIBUTES_NODE_NAME),k8s.pod.name=$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME),k8s.replicaset.name=java-app-58cdff4f7b,service.instance.id=default.$(OTEL_RESOURCE_ATTRIBUTES_POD_NAME).javaapp,service.version=main +``` + +:::note +Please ensure that the OTEL_EXPORTER_OTLP_ENDPOINT is set tohttp://sumo-sumologic-otelagent.observability:4318 to send traces. +::: + ## Collecting events ### Check events body