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

Add table gcp_logging_log_entry Closes #462 #463

Merged
merged 13 commits into from
Jul 20, 2023
Merged

Add table gcp_logging_log_entry Closes #462 #463

merged 13 commits into from
Jul 20, 2023

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Jun 30, 2023

Integration test logs

Logs
N/A

Example query results

Results
> select * from gcp_logging_log_entry where resource_type = 'audited_resource' and severity = 'NOTICE' limit 5
+---------------------------------------------------------------+-------------+---------------------------+--------------------------+--------------------------------+------------------------------+----->
| log_name                                                      | insert_id   | log_entry_operation_first | log_entry_operation_last | log_entry_operation_id         | log_entry_operation_producer | rece>
+---------------------------------------------------------------+-------------+---------------------------+--------------------------+--------------------------------+------------------------------+----->
| projects/hdask-aaa/logs/cloudaudit.googleapis.com%2Factivity | 1k23yuwcdjh | true                      | true                     | operations/noop.DONE_OPERATION | serviceusage.googleapis.com  | 2022>
| projects/hdask-aaa/logs/cloudaudit.googleapis.com%2Factivity | 1l66a4sconn | true                      | true                     | operations/noop.DONE_OPERATION | serviceusage.googleapis.com  | 2022>
| projects/hdask-aaa/logs/cloudaudit.googleapis.com%2Factivity | 1orymg3cegb | true                      | true                     | operations/noop.DONE_OPERATION | serviceusage.googleapis.com  | 2022>
| projects/hdask-aaa/logs/cloudaudit.googleapis.com%2Factivity | mh8p7acxde  | true                      | true                     | operations/noop.DONE_OPERATION | serviceusage.googleapis.com  | 2022>
| projects/hdask-aaa/logs/cloudaudit.googleapis.com%2Factivity | 646ksjcanp  | true                      | true                     | operations/noop.DONE_OPERATION | serviceusage.googleapis.com  | 2022>
+---------------------------------------------------------------+-------------+---------------------------+--------------------------+--------------------------------+------------------------------+----->


> select * from gcp_logging_log_entry where insert_id = '1k23yuwcdjh'
+---------------------------------------------------------------+-------------+---------------------------+--------------------------+--------------------------------+------------------------------+---------------------------+------------------+----------+---------+----->
| log_name                                                      | insert_id   | log_entry_operation_first | log_entry_operation_last | log_entry_operation_id         | log_entry_operation_producer | receive_timestamp         | resource_type    | severity | span_id | text>
+---------------------------------------------------------------+-------------+---------------------------+--------------------------+--------------------------------+------------------------------+---------------------------+------------------+----------+---------+----->
| projects/hdask-aaa/logs/cloudaudit.googleapis.com%2Factivity | 1k23yuwcdjh | true                      | true                     | operations/noop.DONE_OPERATION | serviceusage.googleapis.com  | 2022-05-27T09:41:30+05:30 | audited_resource | NOTICE   |         |     >
+---------------------------------------------------------------+-------------+---------------------------+--------------------------+--------------------------------+------------------------------+---------------------------+------------------+----------+---------+----->

> select * from gcp_logging_log_entry where filter = 'resource.type = "gae_app" AND severity = NOTICE' limit 30
[
 {
  "_ctx": {
   "connection_name": "gcp"
  },
  "filter": "resource.type = \"gae_app\" AND severity = NOTICE",
  "insert_id": "-vwh6usdwqb6",
  "location": "global",
  "log_entry_operation_first": true,
  "log_entry_operation_id": "cc24b009-eeca-4578-846b-ace8d584fbc6",
  "log_entry_operation_last": false,
  "log_entry_operation_producer": "appengine.googleapis.com/admin",
  "log_name": "projects/hdask-aaa/logs/cloudaudit.googleapis.com%2Factivity",
  "project": "hdask-aaa",
  "receive_timestamp": "2023-01-13T12:21:19+05:30",
  "resource_labels": {
   "module_id": "",
   "project_id": "hdask-aaa",
   "version_id": "",
   "zone": ""
  },
  "resource_type": "gae_app",
  "severity": "NOTICE",
  "source_location": null,
  "span_id": "",
  "split_index": null,
  "split_uid": null,
  "text_payload": "",
  "timestamp": "2023-01-13T12:21:19+05:30",
  "title": "-vwh6usdwqb6",
  "total_splits": null,
  "trace": "",
  "trace_sampled": false
 },
 {
  "_ctx": {
   "connection_name": "gcp"
  },
  "filter": "resource.type = \"gae_app\" AND severity = NOTICE",
  "insert_id": "w6w9sud34rk",
  "location": "global",
  "log_entry_operation_first": false,
  "log_entry_operation_id": "bdc9e73c-422e-46e0-8c5c-e0bcc01a0bf1",
  "log_entry_operation_last": true,
  "log_entry_operation_producer": "appengine.googleapis.com/admin",
  "log_name": "projects/hdask-aaa/logs/cloudaudit.googleapis.com%2Factivity",
  "project": "hdask-aaa",
  "receive_timestamp": "2023-01-13T12:30:46+05:30",
  "resource_labels": {
   "module_id": "default",
   "project_id": "hdask-aaa",
   "version_id": "",
   "zone": ""
  },

@ParthaI ParthaI self-assigned this Jun 30, 2023
@ParthaI ParthaI marked this pull request as draft June 30, 2023 08:33
@ParthaI ParthaI requested a review from cbruno10 July 3, 2023 03:46
@ParthaI ParthaI marked this pull request as ready for review July 3, 2023 03:49
Copy link
Contributor

@misraved misraved left a comment

Choose a reason for hiding this comment

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

@ParthaI please take a look at the review comments. Thanks!!

Comment on lines 1 to 2

# Table: gcp_logging_log_entry
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
# Table: gcp_logging_log_entry
# Table: gcp_logging_log_entry


# Table: gcp_logging_log_entry

AWS Logging Log Entry refers to a single log event or entry in a log stream within an AWS service's logging system. It contains information about a specific occurrence or activity that is being logged. Log entries typically include details such as timestamp, log message, log level, request ID, and other relevant metadata.
Copy link
Contributor

Choose a reason for hiding this comment

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

@ParthaI could you please update the table description to use GCP instead of AWS?

Transform: transform.FromField("Split.Uid"),
},
{
Name: "resource_lebels",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Name: "resource_lebels",
Name: "resource_labels",

@ParthaI ParthaI linked an issue Jul 18, 2023 that may be closed by this pull request
@misraved misraved merged commit c371234 into main Jul 20, 2023
@misraved misraved deleted the issue-462 branch July 20, 2023 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table gcp_logging_log_entry
2 participants