Skip to content

Commit ca6f641

Browse files
authored
Add bentoml parsing rules (DataDog#21733)
* add bentoml parsing rules * manifest changes * fixes * Update bentoml.yaml * saved views * Update bentoml.yaml * Update bentoml.yaml * Update bentoml.yaml * Update bentoml.yaml * Update bentoml_tests.yaml * Update bentoml.yaml * Update bentoml_tests.yaml * fix merge conflict * fix merge conf * Update bentoml_tests.yaml
1 parent 26d39e7 commit ca6f641

4 files changed

Lines changed: 111 additions & 1 deletion

File tree

bentoml/assets/logs/bentoml.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
id: bentoml
2+
metric_id: bentoml
3+
backend_only: false
4+
facets:
5+
pipeline:
6+
type: pipeline
7+
name: BentoML
8+
enabled: true
9+
filter:
10+
query: source:bentoml
11+
processors:
12+
- type: grok-parser
13+
name: Parse timestamp from json logs
14+
enabled: true
15+
source: timestamp
16+
samples:
17+
- "22025-10-07T23:10:10.287722"
18+
grok:
19+
matchRules: |
20+
timestamp %{date("yyyy-MM-dd'T'HH:mm:ss.SSSSSS"):timestamp}
21+
supportRules: ""
22+
- type: grok-parser
23+
name: BentoML Parser
24+
enabled: true
25+
source: message
26+
samples:
27+
- "2025-10-22T15:49:41-0400 [INFO] [entry_service:Summarization:1] 127.0.0.1:50870 (scheme=http,method=POST,path=/summarize,type=application/json,length=227) (status=200,type=text/plain; charset=utf-8,length=407) 5890.581ms (trace=ab27d3de318c77adc1a75e34786fb557,span=29583fecc118996f,sampled=0,service.name=Summarization)"
28+
grok:
29+
matchRules: |
30+
general %{_timestamp} \[%{word:level}\] \[%{_component}\] %{_client} \(%{notSpace:bentoml.request:keyvalue("=","/:")}\) \(%{_response}\) %{_latency} \(%{_tracing}\).*
31+
supportRules: |
32+
_timestamp %{date("yyyy-MM-dd'T'HH:mm:ssZ"):timestamp}
33+
_component %{word:bentoml.component_name}\:%{word:bentoml.service.name}\:%{number:bentoml.service.instance}
34+
_client %{ip:bentoml.client.ip}\:%{number:bentoml.client.port}
35+
_response status=%{number:bentoml.response.code},type=%{notSpace:bentoml.response.type} charset=%{notSpace:bentoml.response.charset},length=%{number:bentoml.response.length}
36+
_latency %{number:bentoml.request.latency_ms}ms
37+
_tracing trace=%{notSpace:tracing.trace_id},span=%{notSpace:tracing.span_id},sampled=%{integer:tracing.sampled},service.name=%{notSpace:tracing.service.name}
38+
- type: date-remapper
39+
name: Define `timestamp` as the official date of the log
40+
enabled: true
41+
sources:
42+
- timestamp
43+
- type: service-remapper
44+
name: Define `service` as the official service of the log
45+
enabled: true
46+
sources:
47+
- bentoml.service.name
48+
- type: status-remapper
49+
name: Define `level` as the official status of the log
50+
enabled: true
51+
sources:
52+
- level
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
id: "bentoml"
2+
tests:
3+
-
4+
sample: "2025-10-22T15:49:41-0400 [INFO] [entry_service:Summarization:1] 127.0.0.1:50870 (scheme=http,method=POST,path=/summarize,type=application/json,length=227) (status=200,type=text/plain; charset=utf-8,length=407) 5890.581ms (trace=ab27d3de318c77adc1a75e34786fb557,span=29583fecc118996f,sampled=0,service.name=Summarization)"
5+
result:
6+
custom:
7+
bentoml:
8+
client:
9+
ip: "127.0.0.1"
10+
port: 50870.0
11+
component_name: "entry_service"
12+
request:
13+
latency_ms: 5890.581
14+
length: 227
15+
method: "POST"
16+
path: "/summarize"
17+
scheme: "http"
18+
type: "application/json"
19+
response:
20+
charset: "utf-8"
21+
code: 200.0
22+
length: 407.0
23+
type: "text/plain;"
24+
service:
25+
instance: 1.0
26+
name: "Summarization"
27+
level: "INFO"
28+
timestamp: 1761162581000
29+
tracing:
30+
sampled: 0
31+
service:
32+
name: "Summarization"
33+
span_id: "29583fecc118996f"
34+
trace_id: "ab27d3de318c77adc1a75e34786fb557"
35+
message: "2025-10-22T15:49:41-0400 [INFO] [entry_service:Summarization:1] 127.0.0.1:50870 (scheme=http,method=POST,path=/summarize,type=application/json,length=227) (status=200,type=text/plain; charset=utf-8,length=407) 5890.581ms (trace=ab27d3de318c77adc1a75e34786fb557,span=29583fecc118996f,sampled=0,service.name=Summarization)"
36+
service: "Summarization"
37+
status: "info"
38+
tags:
39+
- "source:LOGS_SOURCE"
40+
timestamp: 1761162581000
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "BentoML Logs Overview",
3+
"query": "source:bentoml",
4+
"visible_facets": [
5+
"status",
6+
"service",
7+
"host"
8+
],
9+
"type": "logs",
10+
"timerange": {
11+
"interval_ms": 3600000
12+
},
13+
"page": "patterns"
14+
}

bentoml/manifest.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"Supported OS::Windows",
1818
"Supported OS::macOS",
1919
"Submitted Data Type::Metrics",
20+
"Submitted Data Type::Logs",
2021
"Offering::Integration",
22+
"Category::Log Collection",
2123
"Category::AI/ML"
2224
]
2325
},
@@ -47,7 +49,9 @@
4749
"monitors": {
4850
"BentoML Liveness Monitor": "assets/monitors/bentoml_liveness_monitor.json"
4951
},
50-
"saved_views": {}
52+
"saved_views": {
53+
"BentoML Logs Overview": "assets/saved_views/bentoml_overview.json"
54+
}
5155
},
5256
"author": {
5357
"support_email": "help@datadoghq.com",

0 commit comments

Comments
 (0)