fix
This commit is contained in:
1 parent
8824af8699
commit
8de4a2e010
3 files changed
+22
-3
No files matched your search
@@ -15,7 +15,11 @@ docker build \
|
|||||||
-t matst80/otel-debug:latest .
|
-t matst80/otel-debug:latest .
|
||||||
|
|
||||||
docker push matst80/otel-debug:latest
|
docker push matst80/otel-debug:latest
|
||||||
kubectl apply -f k8s/
|
# Only the app manifests. Not `-f k8s/`: clickhouse.yaml carries a CHANGE_ME
|
||||||
|
# password Secret that would overwrite the live one, and auth-dev.yaml is a
|
||||||
|
# partial AuthServer that must be applied by hand with
|
||||||
|
# `kubectl apply --server-side --field-manager=otel-dev-auth -f k8s/auth-dev.yaml`.
|
||||||
|
kubectl apply -f k8s/deployment.yaml -f k8s/service.yaml -f k8s/ingress.yaml
|
||||||
kubectl rollout restart deployment otel-debug-receiver -n monitoring
|
kubectl rollout restart deployment otel-debug-receiver -n monitoring
|
||||||
kubectl rollout status deployment/otel-debug-receiver -n monitoring
|
kubectl rollout status deployment/otel-debug-receiver -n monitoring
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ type event struct {
|
|||||||
ExceptionType string `json:"exceptionType,omitempty"`
|
ExceptionType string `json:"exceptionType,omitempty"`
|
||||||
Message string `json:"messageNormalized,omitempty"`
|
Message string `json:"messageNormalized,omitempty"`
|
||||||
StackSignature string `json:"stackSignature,omitempty"`
|
StackSignature string `json:"stackSignature,omitempty"`
|
||||||
|
SpanKind uint8 `json:"spanKind,omitempty"`
|
||||||
|
PeerIPSource string `json:"peerIpSource,omitempty"`
|
||||||
|
EdgePeerSource string `json:"edgePeerSource,omitempty"`
|
||||||
|
EdgeService string `json:"edgeService,omitempty"`
|
||||||
PatternSignature string `json:"patternSignature"`
|
PatternSignature string `json:"patternSignature"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,6 +171,12 @@ func features(item event) map[string]struct{} {
|
|||||||
add("exception", item.ExceptionType)
|
add("exception", item.ExceptionType)
|
||||||
add("message", item.Message)
|
add("message", item.Message)
|
||||||
add("stack", item.StackSignature)
|
add("stack", item.StackSignature)
|
||||||
|
if item.SpanKind > 0 {
|
||||||
|
add("spanKind", strconv.Itoa(int(item.SpanKind)))
|
||||||
|
}
|
||||||
|
add("peerSource", item.PeerIPSource)
|
||||||
|
add("edgePeerSource", item.EdgePeerSource)
|
||||||
|
add("edgeService", item.EdgeService)
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ type sample struct {
|
|||||||
Message string `json:"messageNormalized,omitempty"`
|
Message string `json:"messageNormalized,omitempty"`
|
||||||
StackSignature string `json:"stackSignature,omitempty"`
|
StackSignature string `json:"stackSignature,omitempty"`
|
||||||
TraceID string `json:"traceId,omitempty"`
|
TraceID string `json:"traceId,omitempty"`
|
||||||
|
SpanKind uint8 `json:"spanKind,omitempty"`
|
||||||
|
PeerIPSource string `json:"peerIpSource,omitempty"`
|
||||||
|
EdgePeerSource string `json:"edgePeerSource,omitempty"`
|
||||||
|
EdgeService string `json:"edgeService,omitempty"`
|
||||||
IssueFingerprint string `json:"issueFingerprint,omitempty"`
|
IssueFingerprint string `json:"issueFingerprint,omitempty"`
|
||||||
IsRetry uint8 `json:"isRetry"`
|
IsRetry uint8 `json:"isRetry"`
|
||||||
IsTimeout uint8 `json:"isTimeout"`
|
IsTimeout uint8 `json:"isTimeout"`
|
||||||
@@ -90,7 +94,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
query := fmt.Sprintf(`SELECT event_id, timestamp, service, release, kind, source, is_error, status_class, status_code, duration_ms,
|
query := fmt.Sprintf(`SELECT event_id, timestamp, service, release, kind, source, is_error, status_class, status_code, duration_ms,
|
||||||
route, span_name, metric_name, metric_type, metric_value, metric_count, metric_sum, metric_min, metric_max,
|
route, span_name, metric_name, metric_type, metric_value, metric_count, metric_sum, metric_min, metric_max,
|
||||||
exception_type, message_normalized, stack_signature, trace_id, issue_fingerprint, is_retry, is_timeout, is_cancellation, exact_signature, pattern_signature
|
exception_type, message_normalized, stack_signature, trace_id,
|
||||||
|
span_kind, peer_ip_source, edge_peer_source, edge_service, issue_fingerprint, is_retry, is_timeout, is_cancellation, exact_signature, pattern_signature
|
||||||
FROM %s.normalized_events FINAL
|
FROM %s.normalized_events FINAL
|
||||||
WHERE timestamp >= toDateTime64('%s', 9, 'UTC') AND timestamp < toDateTime64('%s', 9, 'UTC')
|
WHERE timestamp >= toDateTime64('%s', 9, 'UTC') AND timestamp < toDateTime64('%s', 9, 'UTC')
|
||||||
ORDER BY pattern_signature, timestamp
|
ORDER BY pattern_signature, timestamp
|
||||||
@@ -105,7 +110,7 @@ func main() {
|
|||||||
count := 0
|
count := 0
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
var item sample
|
var item sample
|
||||||
if err := rows.Scan(&item.EventID, &item.Timestamp, &item.Service, &item.Release, &item.Kind, &item.Source, &item.IsError, &item.StatusClass, &item.StatusCode, &item.DurationMS, &item.Route, &item.SpanName, &item.MetricName, &item.MetricType, &item.MetricValue, &item.MetricCount, &item.MetricSum, &item.MetricMin, &item.MetricMax, &item.ExceptionType, &item.Message, &item.StackSignature, &item.TraceID, &item.IssueFingerprint, &item.IsRetry, &item.IsTimeout, &item.IsCancellation, &item.ExactSignature, &item.PatternSignature); err != nil {
|
if err := rows.Scan(&item.EventID, &item.Timestamp, &item.Service, &item.Release, &item.Kind, &item.Source, &item.IsError, &item.StatusClass, &item.StatusCode, &item.DurationMS, &item.Route, &item.SpanName, &item.MetricName, &item.MetricType, &item.MetricValue, &item.MetricCount, &item.MetricSum, &item.MetricMin, &item.MetricMax, &item.ExceptionType, &item.Message, &item.StackSignature, &item.TraceID, &item.SpanKind, &item.PeerIPSource, &item.EdgePeerSource, &item.EdgeService, &item.IssueFingerprint, &item.IsRetry, &item.IsTimeout, &item.IsCancellation, &item.ExactSignature, &item.PatternSignature); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
if err := encoder.Encode(item); err != nil {
|
if err := encoder.Encode(item); err != nil {
|
||||||
|
|||||||
Reference in new issue
Block a user