Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/mongodbatlas] Fix log parsing for v4.2 clusters #14088

Merged
merged 7 commits into from
Sep 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix comments in log model
  • Loading branch information
BinaryFissionGames committed Sep 12, 2022
commit 588b2fd5f8a3e45ae63bcb0cfb475e6de6678aaa
7 changes: 5 additions & 2 deletions receiver/mongodbatlasreceiver/internal/model/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ package model // import "github.com/open-telemetry/opentelemetry-collector-contr

import (
"encoding/json"
) // LogEntry represents a MongoDB Atlas JSON log entry
)

// LogEntry represents a MongoDB Atlas JSON log entry
type LogEntry struct {
Timestamp LogTimestamp `json:"t"`
Severity string `json:"s"`
Expand All @@ -25,7 +27,8 @@ type LogEntry struct {
Context string `json:"ctx"`
Message string `json:"msg"`
Attributes map[string]interface{} `json:"attr"`
Raw *string `json:"-"`
// Raw, if it is present, is the original log line. It is not a part of the payload, but transient data added during decoding.
Raw *string `json:"-"`
}

// RawLog returns a raw representation of the log entry.
Expand Down