-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[receiver/faro] guarantee level is set for faro logs #40701
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/faro] guarantee level is set for faro logs #40701
Conversation
I think the change should be done in
So adding Does it make sense? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! Added a small comment regarding using constants instead of hardcoded strings.
Also changelog entry is needed. The guidance on adding a changelog entry could be found here https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-a-changelog-entry
pkg/translator/faro/keyval.go
Outdated
@@ -77,10 +77,17 @@ func keyValToInterfaceSlice(kv *keyVal) []any { | |||
// logToKeyVal represents a Log object as keyVal | |||
func logToKeyVal(l faroTypes.Log) *keyVal { | |||
kv := newKeyVal() | |||
|
|||
// default to info level, prioritize log level if set | |||
level := "info" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use constant faroTypes.LogLevelInfo
here and appropriate constants below
Could you please run the tests locally? |
@mar4uk can I get an approval for the workflows to run? I fixed tests and I think we are looking good at this point |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…kirk/opentelemetry-collector-contrib into elliot/add-level-to-faro-logs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
…40701) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description this PR makes sure that `level` is set for all logs consumed by the Faro receiver, making sure that the user's settings for logs is maintained. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue N/A <!--Describe what testing was performed and which tests were added.--> #### Testing TBD <!--Describe the documentation added.--> #### Documentation N/A
Description
this PR makes sure that
level
is set for all logs consumed by the Faro receiver, making sure that the user's settings for logs is maintained.Link to tracking issue
N/A
Testing
TBD
Documentation
N/A