GithubHelp home page GithubHelp logo

Comments (7)

crenshaw-dev avatar crenshaw-dev commented on June 21, 2024 1

I'd be very excited to see this PR.

from argo-cd.

crenshaw-dev avatar crenshaw-dev commented on June 21, 2024 1

We should probably consider switching to JSON by default in 3.0. But the option is already available today.

from argo-cd.

andrii-korotkov-verkada avatar andrii-korotkov-verkada commented on June 21, 2024

Turns out the problem is more complicated than I thought. While some logs in appcontroller don't have info about the application, a lot of them include it in the structured data, including the example I've shown. However, when viewing the logs in the Datadog, application's fully qualified name is not available in the parsed event attributes and also not added to the log line (as it probably shouldn't). There's also been an example of logs where fields are added to the log message but in a way that indicate some broken parsing.

So the source of the issue lies in ArgoCD not using JSON format recommended by Datadog for integration, and the custom Grok parser for the ArgoCD logs we have seems to not cover some edge cases (probably / in the unquoted value of the field).

I'd open a discussion about potentially switching to JSON log format or finding other ways to have parsing working better.

from argo-cd.

andrii-korotkov-verkada avatar andrii-korotkov-verkada commented on June 21, 2024

Oh, my search for potential usage of JSONFormatter was too naive. After your pointer, I've traced that to util/log/logrus.go.

from argo-cd.

andrii-korotkov-verkada avatar andrii-korotkov-verkada commented on June 21, 2024

I'd just run the controller with the corresponding option, though still plan to submit the PR for some logging improvements.

from argo-cd.

andrii-korotkov-verkada avatar andrii-korotkov-verkada commented on June 21, 2024

The PR is ready and passes CI. I'm not 100% sure though whether to log an app fully qualified name, or log a regular name and namespace separately. There's no consistency now - audit logger and couple of places choose the later, while multiple other places choose the former. In my PR I gave preference to the qualified name, but didn't go as far as editing audit logger. What do you think?

from argo-cd.

andrii-korotkov-verkada avatar andrii-korotkov-verkada commented on June 21, 2024

Thinking more about this, I'll probably switch to using a regular app name and have namespace as a separate parameter, as well as separate field for a qualified name. It's going to be reasonable when querying structured data via Datadog and also supporting just using grep on raw logs.

from argo-cd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.