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

[GCP ]Filter the logs base on logNames and timestamps #379

Merged
merged 6 commits into from
Oct 21, 2024

Conversation

rakhimundhada15
Copy link
Contributor

@rakhimundhada15 rakhimundhada15 commented Oct 8, 2024

Problem Description

Currently there is no functionality to filter the logs base on log names and collector pull all type of logs

Solution Description

Apply filtering based on the provided logName values,
So that the system fetches only the relevant logs, or all logs if no logName is provided, using the GCP Logging API.

Acceptance Criteria for Contributors

  1. Filter Handling:
  • The backend should receive the logName filter value from the UI.
  • If one or more logName values are provided, the backend should apply these filters when making requests to the GCP Logging API.
    It will encode the Log name URI if it is not encoded. It will accept below pattern :
    1.cloudaudit.googleapis.com%2Factivity;
    2. cloudaudit.googleapis.com/activity;
    3. cloudaudit.googleapis.com%2Factivity\ncloudaudit.googleapis.com%2Factivity-function; // Valid multiple entries
    4. cloudaudit.googleapis.com
  • Else If no logName value is provided, the system should fetch all available logs from the GCP Logging API without any filtering.

@al-cibot
Copy link

al-cibot commented Oct 8, 2024

CI Service Job Number 1047 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 1047 -g

Stages Run:

  • PR Test

@al-cibot
Copy link

al-cibot commented Oct 8, 2024

CI Service Job Number 1048 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 1048 -g

Stages Run:

  • PR Test

Copy link
Contributor

@OHaganA OHaganA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the changes! +1 from me

@al-cibot
Copy link

al-cibot commented Oct 8, 2024

CI Service Job Number 1049 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 1049 -g

Stages Run:

  • PR Test

@al-cibot
Copy link

al-cibot commented Oct 8, 2024

CI Service Job Number 1050 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 1050 -g

Stages Run:

  • PR Test

Copy link
Contributor

@imranalisyed506 imranalisyed506 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@scott-jones-AlertLogic scott-jones-AlertLogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks Rakhi, looks good; just one minor comment and one question from me

@al-cibot
Copy link

CI Service Job Number 1055 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 1055 -g

Stages Run:

  • PR Test

@al-cibot
Copy link

CI Service Job Number 1056 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 1056 -g

Stages Run:

  • PR Test

@al-cibot
Copy link

CI Service Job Number 1062 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 1062 -g

Stages Run:

  • PR Test

@rakhimundhada15
Copy link
Contributor Author

build-collector-googlestackdriver

@al-cibot
Copy link

CI Service Job Number 1063 Logs - SUCCESS

alps ci job-logs --organization alertlogic --repository paws-collector --job-num 1063 -g

Stages Run:

  • build-collector-googlestackdriver
  • file_packager_55b83d

@rakhimundhada15 rakhimundhada15 merged commit d9313f5 into alertlogic:master Oct 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants