3_view_spring_boot.sql 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. drop view if exists otel.otel_traces_flat_spring_boot on cluster default sync;
  2. create view if not exists otel.otel_traces_flat_spring_boot on cluster default as
  3. select toUnixTimestamp64Nano(Timestamp) as Timestamp,
  4. ot1.Timestamp as DateTime,
  5. TraceId,
  6. SpanId,
  7. ParentSpanId,
  8. TraceState,
  9. SpanName,
  10. SpanKind,
  11. ScopeName,
  12. ServiceName,
  13. srcIP as ServiceIP,
  14. Duration,
  15. ContainerId,
  16. srcIP as SrcIP,
  17. CAST(srcPort as String) as SrcPort,
  18. targetIP as TargetIP,
  19. CAST(targetPort as String) as TargetPort,
  20. RPCType,
  21. RPCName,
  22. RPCRequest,
  23. RPCResult,
  24. FuncNameSpace,
  25. FuncName,
  26. FuncLineNO,
  27. FuncResult,
  28. StatusCode as Status,
  29. StatusMessage,
  30. arrayStringConcat(Exceptions.message, ';') as Exceptions
  31. from otel.traces as ot1;