otel_logs.gen.go 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package models
  5. import (
  6. "time"
  7. )
  8. const TableNameTraceLog = "otel_logs"
  9. // Trace mapped from table <otel_traces>
  10. //TODO: 未修改
  11. type TraceLog struct {
  12. Timestamp time.Time `gorm:"column:Timestamp;not null" json:"timestamp"`
  13. TraceID string `gorm:"column:TraceId;not null" json:"trace_id"`
  14. SpanID string `gorm:"column:SpanId;not null" json:"span_id"`
  15. ParentSpanID string `gorm:"column:ParentSpanId;not null" json:"parent_span_id"`
  16. TraceState string `gorm:"column:TraceState;not null" json:"trace_state"`
  17. SpanName string `gorm:"column:SpanName;not null" json:"span_name"`
  18. SpanKind string `gorm:"column:SpanKind;not null" json:"span_kind"`
  19. ServiceName string `gorm:"column:ServiceName;not null" json:"service_name"`
  20. ResourceAttribute map[string]string `gorm:"column:ResourceAttributes;not null" json:"resource_attributes"`
  21. SpanAttribute map[string]string `gorm:"column:SpanAttributes;not null" json:"span_attributes"`
  22. Duration int64 `gorm:"column:Duration;not null" json:"duration"`
  23. StatusCode string `gorm:"column:StatusCode;not null" json:"status_code"`
  24. StatusMessage string `gorm:"column:StatusMessage;not null" json:"status_message"`
  25. EventsTimestamp []time.Time `gorm:"column:Events.Timestamp;not null" json:"events_timestamp"`
  26. EventsName []string `gorm:"column:Events.Name;not null" json:"events_name"`
  27. EventsAttribute []map[string]string `gorm:"column:Events.Attributes;not null" json:"events_attributes"`
  28. LinksTraceID []string `gorm:"column:Links.TraceId;not null" json:"links_trace_id"`
  29. LinksSpanID []string `gorm:"column:Links.SpanId;not null" json:"links_span_id"`
  30. LinksTraceState []string `gorm:"column:Links.TraceState;not null" json:"links_trace_state"`
  31. LinksAttribute []map[string]string `gorm:"column:Links.Attributes;not null" json:"links_attributes"`
  32. HTTPCode int32 `gorm:"column:HttpCode;not null" json:"http_code"`
  33. HTTPMethod string `gorm:"column:HttpMethod;not null" json:"http_method"`
  34. HTTPURL string `gorm:"column:HttpURL;not null" json:"http_url"`
  35. ContainerID string `gorm:"column:ContainerId;not null" json:"container_id"`
  36. SrcIP string `gorm:"column:srcIP;not null" json:"src_ip"`
  37. SrcPort int32 `gorm:"column:srcPort;not null" json:"src_port"`
  38. TargetIP string `gorm:"column:targetIP;not null" json:"target_ip"`
  39. TargetPort int32 `gorm:"column:targetPort;not null" json:"target_port"`
  40. RPCMethod string `gorm:"column:rpcMethod;not null" json:"rpc_method"`
  41. DbStatement string `gorm:"column:dbStatement;not null" json:"db_statement"`
  42. DbConnectionString string `gorm:"column:dbConnectionString;not null" json:"db_connection_string"`
  43. AppAlias string `gorm:"column:AppAlias;not null" json:"app_alias"`
  44. }
  45. // TableName Trace's table name
  46. func (*TraceLog) TableName() string {
  47. return TableNameTraceLog
  48. }