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

[FEATURE] Add SEQ log provider #216

Open
guibranco opened this issue Oct 16, 2023 · 7 comments · May be fixed by #578
Open

[FEATURE] Add SEQ log provider #216

guibranco opened this issue Oct 16, 2023 · 7 comments · May be fixed by #578
Labels
enhancement New feature or request gitauto GitAuto label to trigger the app in a issue. good first issue Good for newcomers hacktoberfest Participation in the Hacktoberfest event help wanted Extra attention is needed log .NET Pull requests that update .net code 🛠 WIP Work in progress

Comments

@guibranco
Copy link
Owner

guibranco commented Oct 16, 2023

Description

We need to enhance our logging infrastructure by integrating support for SEQ, a log server that provides structured log management and querying. To achieve this, we will create a new project, CrispyWaffle.Seq, which will include classes for forwarding logs to a SEQ server using HTTP endpoints. This feature will allow us to effectively handle and route logs to SEQ, leveraging its structured logging capabilities.

Problem Statement

  • Current Issue: Our existing logging setup does not support SEQ, limiting our ability to use its advanced log management features. We need a mechanism to forward logs to SEQ efficiently.
  • Impact: Without SEQ integration, we miss out on features like centralized log aggregation, querying, and visualization offered by SEQ.

Proposed Solution

  • Create CrispyWaffle.Seq Project:
    • Develop a new project and NuGet package named CrispyWaffle.Seq that includes classes for integrating with SEQ.
    • Implement classes that will forward log messages to a SEQ server via HTTP.

Implementation Steps

  1. Create CrispyWaffle.Seq Project:

    • Initialize a new project and NuGet package named CrispyWaffle.Seq.
  2. Implement SeqLogProvider Class:

    • Create a class SeqLogProvider that implements the ILogProvider interface. This class will handle the configuration and setup for logging to SEQ.

    • Ensure the SeqLogProvider can be configured with the SEQ server URL and other relevant settings.

    • Example:

      public class SeqLogProvider : ILogProvider
      {
          private readonly SeqConnector _connector;
      
          public SeqLogProvider(SeqConnector connector) => _connector = connector;
      
          // Implementation of ILogProvider methods
      }
  3. Implement SeqBatchLogAdapter Class:

    • Create a class SeqBatchLogAdapter that implements the ICategorizedLogAdapter interface. This class will manage batch logging and forward messages to the SEQ server.

    • Implement batch configuration options such as timeout and throughput to optimize log forwarding.

    • Example:

      public class SeqBatchLogAdapter : ICategorizedLogAdapter
      {
          private readonly SeqConnector _connector;
          private readonly TimeSpan _batchTimeout;
          private readonly int _batchSize;
      
          public SeqBatchLogAdapter(SeqConnector connector, TimeSpan batchTimeout, int batchSize)
          {
              _connector = connector;
              _batchTimeout = batchTimeout;
              _batchSize = batchSize;
          }
      
          // Implementation of ICategorizedLogAdapter methods
      }
  4. HTTP Forwarding to SEQ:

    • Ensure that both SeqLogProvider and SeqBatchLogAdapter can forward log messages to the SEQ server using HTTP.
    • Utilize SEQ’s ingestion API or .NET libraries to handle HTTP communication.
  5. Batch Configurability:

    • Implement configurable batch behavior in SeqBatchLogAdapter, allowing settings for timeout and throughput to manage log forwarding efficiently.
  6. Testing:

    • Test the integration to ensure that logs are correctly forwarded to SEQ and that batch settings work as expected. Validate log delivery, batching behavior, and error handling.
  7. Documentation:

    • Document the new CrispyWaffle.Seq project, including configuration instructions, usage examples, and any required dependencies.

Additional Notes

  • Review SEQ’s official documentation for details on their HTTP ingestion API and best practices.
  • Ensure that the new project adheres to best practices for logging and error handling.
@guibranco guibranco added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers log .NET Pull requests that update .net code hacktoberfest Participation in the Hacktoberfest event labels Oct 16, 2023
@Laxynium
Copy link

Hi, could I take this one?

@guibranco
Copy link
Owner Author

@Laxynium sure, of course. Let me know if you need more explanation on the task!

@guibranco
Copy link
Owner Author

@Laxynium any progress on this? Do you need any help?

@dasingh92
Copy link

hey @guibranco I'd like to work on this task.

@guibranco
Copy link
Owner Author

Hi, @dasingh92, I assigned it to you!

@guibranco guibranco added the 🛠 WIP Work in progress label Jan 30, 2024
@guibranco
Copy link
Owner Author

guibranco commented Feb 16, 2024

@dasingh92 Hi, I'm just wondering if you made some progress on this or need help!

@guibranco guibranco removed waiting response 🛠 WIP Work in progress labels Mar 4, 2024
@guibranco guibranco changed the title Add SEQ log provider [FEATURE] Add SEQ log provider May 15, 2024
@gitauto-ai gitauto-ai bot added the gitauto GitAuto label to trigger the app in a issue. label Oct 22, 2024
Copy link
Contributor

gitauto-ai bot commented Oct 22, 2024

Hey, I'm a bit lost here! Not sure which file I should be fixing. Could you give me a bit more to go on? Maybe add some details to the issue or drop a comment with some extra hints? Thanks!

Have feedback or need help?
Feel free to email info@gitauto.ai.

@gitauto-ai gitauto-ai bot linked a pull request Oct 22, 2024 that will close this issue
@gstraccini gstraccini bot added the 🛠 WIP Work in progress label Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gitauto GitAuto label to trigger the app in a issue. good first issue Good for newcomers hacktoberfest Participation in the Hacktoberfest event help wanted Extra attention is needed log .NET Pull requests that update .net code 🛠 WIP Work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants