Skip to content

Commit

Permalink
Sync modal integration from logs-backend (DataDog#2304)
Browse files Browse the repository at this point in the history
* Sync modal integration from logs-backend

* Fix linting issues with facet attributes
  • Loading branch information
vishalshah-dd authored Mar 6, 2024
1 parent ef2d561 commit 0254b0e
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
30 changes: 30 additions & 0 deletions modal/assets/logs/modal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
id: modal
backend_only: false
facets:
- groups:
- modal
name: RPC
path: rpc
source: log
pipeline:
type: pipeline
name: Modal
enabled: true
filter:
query: source:modal
processors:
- type: date-remapper
name: Define `timestamp` as the official date of the log
enabled: true
sources:
- timestamp
- type: status-remapper
name: Define `level` as the official status of the log
enabled: true
sources:
- level
- type: service-remapper
name: Define `service` as the official service of the log
enabled: true
sources:
- service
39 changes: 39 additions & 0 deletions modal/assets/logs/modal_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
id: "modal"
tests:
-
sample: |-
{
"hostname" : "",
"rpc" : "TokenCreate",
"target_attr_name" : "token_type",
"level" : "success",
"service" : "modal.audit-logs",
"target_attr_value" : "0",
"client_type" : "CLIENT_TYPE_WEB_SERVER",
"timestamp" : "2023-11-24T21:39:37.805667+00:00"
}
result:
custom:
client_type: "CLIENT_TYPE_WEB_SERVER"
hostname: ""
level: "success"
rpc: "TokenCreate"
service: "modal.audit-logs"
target_attr_name: "token_type"
target_attr_value: "0"
timestamp: "2023-11-24T21:39:37.805667+00:00"
message: |-
{
"hostname" : "",
"rpc" : "TokenCreate",
"target_attr_name" : "token_type",
"level" : "success",
"service" : "modal.audit-logs",
"target_attr_value" : "0",
"client_type" : "CLIENT_TYPE_WEB_SERVER",
"timestamp" : "2023-11-24T21:39:37.805667+00:00"
}
tags:
- "source:LOGS_SOURCE"
timestamp: 1700861977805

0 comments on commit 0254b0e

Please sign in to comment.