https://signoz.io logo
#support
Title
# support
j

Jay Ghiya

11/17/2022, 1:30 PM
{ "timestamp": 1668691216184028000, "id": "2HewGLjtvvcHCJRaRnQp0GFFuPv", "trace_id": "", "span_id": "", "trace_flags": 0, "severity_text": "", "severity_number": 0, "body": "{\"timestamp\":\"2022-11-17T132016.183Z\",\"sequence\":81,\"loggerClassName\":\"org.jboss.logging.Logger\",\"loggerName\":\"org.acme.GreetingResource\",\"level\":\"INFO\",\"message\":\"name is jay\",\"threadName\":\"vert.x-eventloop-thread-0\",\"threadId\":21,\"mdc\":{\"spanId\":\"05f09f0c09979c5e\",\"traceId\":\"3c445f9997896b73d2de06e12e8927d0\",\"sampled\":\"true\"},\"ndc\":\"\",\"hostName\":\"microservice-rest-kafka-7b4c9459df-4g9mc\",\"processName\":\"quarkus-run.jar\",\"processId\":1}\n", "resources_string": { "k8s_container_name": "microservice-rest-kafka", "k8s_container_restart_count": "0", "k8s_namespace_name": "services", "k8s_pod_name": "microservice-rest-kafka-7b4c9459df-4g9mc", "k8s_pod_uid": "76458fc3-0759-43d6-a898-19ac81eb925b" }, "attributes_string": { "log_file_path": "/var/log/pods/services_microservice-rest-kafka-7b4c9459df-4g9mc_76458fc3-0759-43d6-a898-19ac81eb925b/microservice-rest-kafka/0.log", "log_iostream": "stdout", "time": "2022-11-17T132016.184027859Z" }, "attributes_int": {}, "attributes_float": {} }
attaching the screenshot for the issue
these are opentelemetry related properties
%prod.quarkus.opentelemetry.enabled=true
%prod.quarkus.opentelemetry.tracer.exporter.otlp.endpoint=${KUBERNETES_OTLP_ENDPOINT:<http://my-release-signoz-otel-collector.platform.svc.cluster.local:4317>}
%prod.quarkus.opentelemetry.tracer.resource-attributes=${QUARKUS_OPENTELEMETRY_TRACER_RESOURCE_ATTRIBUTES:service.name=quarkus-http-redpanda}
%prod.quarkus.log.console.format=%d{HH:mm:ss} %-5p traceId=%X{traceId}, parentId=%X{parentId}, spanId=%X{spanId}, sampled=%X{sampled} [%c{2.}] (%t) %s%e%n
tracing it is showing trace and spans properly
This is what i would want to achieve : figure out trace id from traces functionality for which rest api was slow. then use the same tracing id inside logs to get logs regarding that
n

nitya-signoz

11/17/2022, 4:08 PM
Okay you will need to use parser to extract out the traceId and spanId. You will have to use the trace_parser operator present here https://signoz.io/docs/userguide/logs/#operators-for-parsing-and-manipulating-logs
j

Jay Ghiya

11/17/2022, 5:04 PM
okay my bad thanks @nitya-signoz went through your log video on youtube. leme see 🙂
i am using oltp sdk inside quarkus app to export logs directly. looks like there is no support for operators in that. what is the easiest way to add this attributes from the app itself ? or in signoz do i have to use some other receiver
the doc suggests logprocessor any libs in java to do ? @nitya-signoz
j

Jay Ghiya

11/19/2022, 2:37 AM
@nitya-signoz ?
n

nitya-signoz

11/21/2022, 4:22 AM
Hi, you can use the log transform processor to apply the operators. https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/logstransformprocessor And and in the service you can apply the transform processor like this
j

Jay Ghiya

11/21/2022, 4:23 AM
Sure leme go through thanks a lot 😄
6 Views