Skip to content

Commit 8f40e85

Browse files
steveny91git-thuerk-donesarah-witt
authored
Docs and metric descriptions for BentoML (DataDog#21580)
* changelog updates * readme * log collection readme * metric descriptions * Update bentoml/README.md Co-authored-by: Alicia Thuerk <26307719+git-thuerk-done@users.noreply.github.com> * Update bentoml/README.md Co-authored-by: Alicia Thuerk <26307719+git-thuerk-done@users.noreply.github.com> * Update bentoml/README.md Co-authored-by: Alicia Thuerk <26307719+git-thuerk-done@users.noreply.github.com> * Update bentoml/README.md Co-authored-by: Alicia Thuerk <26307719+git-thuerk-done@users.noreply.github.com> * Update bentoml/README.md Co-authored-by: Alicia Thuerk <26307719+git-thuerk-done@users.noreply.github.com> * Update bentoml/README.md Co-authored-by: Alicia Thuerk <26307719+git-thuerk-done@users.noreply.github.com> * Update bentoml/README.md Co-authored-by: Alicia Thuerk <26307719+git-thuerk-done@users.noreply.github.com> * hatch env update * small edit * Update bentoml/README.md Co-authored-by: Sarah Witt <sarah.witt@datadoghq.com> * nit * validation * changelog --------- Co-authored-by: Alicia Thuerk <26307719+git-thuerk-done@users.noreply.github.com> Co-authored-by: Sarah Witt <sarah.witt@datadoghq.com>
1 parent 564a8f3 commit 8f40e85

5 files changed

Lines changed: 102 additions & 22 deletions

File tree

bentoml/README.md

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
## Overview
44

5-
This check monitors [BentoML][1] through the Datadog Agent.
5+
This check monitors [BentoML][1] through the Datadog Agent.
66

7-
Include a high level overview of what this integration does:
8-
- What does your product do (in 1-2 sentences)?
9-
- What value will customers get from this integration, and why is it valuable to them?
10-
- What specific data will your integration monitor, and what's the value of that data?
7+
BentoML is an open-source platform for building, shipping, and running machine learning models in production. This integration enables you to track the health and performance of your BentoML model serving infrastructure directly from Datadog.
8+
9+
By using this integration, you gain visibility into key BentoML metrics such as request throughput, response latency, error rates, and resource utilization. Monitoring these metrics helps you ensure reliable model deployments, quickly detect issues, and optimize the performance of your ML services in production environments.
1110

1211
**Minimum Agent version:** 7.70.1
1312

@@ -17,15 +16,65 @@ Follow the instructions below to install and configure this check for an Agent r
1716

1817
### Installation
1918

20-
The BentoML check is included in the [Datadog Agent][2] package.
21-
No additional installation is needed on your server.
19+
Starting with Agent version `7.71.0`, the BentoML check is included in the [Datadog Agent][2] package. No additional installation is needed on your environment.
2220

2321
### Configuration
2422

25-
1. Edit the `bentoml.d/conf.yaml` file, in the `conf.d/` folder at the root of your Agent's configuration directory to start collecting your bentoml performance data. See the [sample bentoml.d/conf.yaml][4] for all available configuration options.
23+
#### Metrics
24+
25+
The BentoML integration collects data from both the [health API endpoints][11] and the [Prometheus metrics endpoint][10]. By default, BentoML exposes these endpoints, so in most cases, no additional configuration is required on the BentoML side. For more information about these endpoints and how to enable or secure them, refer to the [BentoML observability documentation][11].
26+
27+
To configure the Datadog Agent to collect BentoML metrics:
28+
29+
1. Edit the `bentoml.d/conf.yaml` file, located in the `conf.d/` directory at the root of your Agent's configuration folder. This file controls how the Agent collects metrics from your BentoML deployment. For a full list of configuration options, see the [sample bentoml.d/conf.yaml][4]. Below is a minimal example configuration:
30+
31+
```yaml
32+
init_config:
33+
instances:
34+
- openmetrics_endpoint: http://localhost:3000/metrics
35+
tags:
36+
- bentoml_service: foo # Tag to easily scope metrics
37+
```
2638
2739
2. [Restart the Agent][5].
2840
41+
#### Logs
42+
43+
BentoML logs can be collected by the Datadog Agent using several methods:
44+
45+
- **Agent log collection (recommended)**: Configure the Datadog Agent to tail BentoML log files. See the [BentoML documentation][12] for more details.
46+
47+
**For host-based Agents:**
48+
49+
1. Enable log collection in your `datadog.yaml` file (disabled by default):
50+
51+
```yaml
52+
logs_enabled: true
53+
```
54+
55+
2. Configure the Agent to tail BentoML logs by editing `bentoml.d/conf.yaml` (or the corresponding file in `conf.d/`):
56+
57+
```yaml
58+
logs:
59+
- type: file
60+
path: monitoring/text_summarization/data/*.log
61+
source: bentoml
62+
service: <SERVICE>
63+
```
64+
65+
Replace `<SERVICE>` with a name that matches your service.
66+
67+
**For containerized environments**:
68+
69+
- Ensure the BentoML log files are mounted inside the Datadog Agent container so they can be accessed and tailed. See [container based log collection][14] for more information.
70+
71+
**Other log shipping options**:
72+
73+
- **Fluent Bit**: Forward logs to Datadog using [Fluent Bit][13].
74+
- **OTLP**: Send logs to the Datadog Agent using the [OpenTelemetry Protocol (OTLP)][14].
75+
76+
Choose the log collection method that best fits your environment and operational needs. Ensure the logs are tagged correctly with `source:bentoml`.
77+
2978
### Validation
3079

3180
[Run the Agent's status subcommand][6] and look for `bentoml` under the Checks section.
@@ -42,16 +91,14 @@ The BentoML integration does not include any events.
4291

4392
### Service Checks
4493

45-
The BentoML integration does not include any service checks.
46-
4794
See [service_checks.json][8] for a list of service checks provided by this integration.
4895

4996
## Troubleshooting
5097

5198
Need help? Contact [Datadog support][9].
5299

53100

54-
[1]: **LINK_TO_INTEGRATION_SITE**
101+
[1]: https://docs.bentoml.com/en/latest/index.html
55102
[2]: https://app.datadoghq.com/account/settings/agent/latest
56103
[3]: https://docs.datadoghq.com/containers/kubernetes/integrations/
57104
[4]: https://github.com/DataDog/integrations-core/blob/master/bentoml/datadog_checks/bentoml/data/conf.yaml.example
@@ -60,3 +107,8 @@ Need help? Contact [Datadog support][9].
60107
[7]: https://github.com/DataDog/integrations-core/blob/master/bentoml/metadata.csv
61108
[8]: https://github.com/DataDog/integrations-core/blob/master/bentoml/assets/service_checks.json
62109
[9]: https://docs.datadoghq.com/help/
110+
[10]: https://docs.bentoml.com/en/latest/build-with-bentoml/observability/metrics.html
111+
[11]: https://docs.bentoml.com/en/latest/build-with-bentoml/observability/monitoring-and-data-collection.html#monitoring
112+
[12]: https://docs.bentoml.com/en/latest/build-with-bentoml/observability/monitoring-and-data-collection.html#view-request-and-schema-logs
113+
[13]: https://docs.fluentbit.io/manual/data-pipeline/outputs/datadog
114+
[14]: https://docs.datadoghq.com/opentelemetry/setup/otlp_ingest_in_the_agent/?tab=docker#enabling-otlp-ingestion-on-the-datadog-agent

bentoml/assets/configuration/spec.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ files:
1313
openmetrics_endpoint.description: |
1414
Endpoint exposing the BentoML Prometheus metrics. For more information refer to:
1515
https://docs.bentoml.com/en/latest/build-with-bentoml/observability/metrics.html
16+
- template: logs
17+
example:
18+
- type: file
19+
path: monitoring/text_summarization/data/*.log
20+
source: bentoml
21+
service: <SERVICE>

bentoml/changelog.d/21580.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add log config section

bentoml/datadog_checks/bentoml/data/conf.yaml.example

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,3 +640,24 @@ instances:
640640
# - <INCLUDE_REGEX>
641641
# exclude:
642642
# - <EXCLUDE_REGEX>
643+
644+
## Log Section
645+
##
646+
## type - required - Type of log input source (tcp / udp / file / windows_event).
647+
## port / path / channel_path - required - Set port if type is tcp or udp.
648+
## Set path if type is file.
649+
## Set channel_path if type is windows_event.
650+
## source - required - Attribute that defines which integration sent the logs.
651+
## encoding - optional - For file specifies the file encoding. Default is utf-8. Other
652+
## possible values are utf-16-le and utf-16-be.
653+
## service - optional - The name of the service that generates the log.
654+
## Overrides any `service` defined in the `init_config` section.
655+
## tags - optional - Add tags to the collected logs.
656+
##
657+
## Discover Datadog log collection: https://docs.datadoghq.com/logs/log_collection/
658+
#
659+
# logs:
660+
# - type: file
661+
# path: monitoring/text_summarization/data/*.log
662+
# source: bentoml
663+
# service: <SERVICE>

bentoml/metadata.csv

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
metric_name,metric_type,interval,unit_name,per_unit_name,description,orientation,integration,short_name,curated_metric,sample_tags
2-
bentoml.endpoint_livez,gauge,,,,,0,bentoml,,,
3-
bentoml.endpoint_readyz,gauge,,,,,0,bentoml,,,
4-
bentoml.service.adaptive_batch_size.bucket,count,,,,,0,bentoml,,,
5-
bentoml.service.adaptive_batch_size.count,count,,,,,0,bentoml,,,
6-
bentoml.service.adaptive_batch_size.sum,count,,,,,0,bentoml,,,
7-
bentoml.service.request.count,count,,,,,0,bentoml,,,
8-
bentoml.service.request.duration.bucket,count,,,,,0,bentoml,,,
9-
bentoml.service.request.duration.count,count,,,,,0,bentoml,,,
10-
bentoml.service.request.duration.sum,count,,,,,0,bentoml,,,
11-
bentoml.service.request.in_progress,gauge,,,,,0,bentoml,,,
12-
bentoml.service.time_since_last_request,gauge,,,,,0,bentoml,,,
2+
bentoml.endpoint_livez,gauge,,,,"A liveness probe endpoint that checks if the Service is still alive and needs to restart. This metrics reports a 1 if the endpoint is healthy, 0 otherwise.",0,bentoml,,,
3+
bentoml.endpoint_readyz,gauge,,,,"A readiness probe endpoint that indicates if the Service is ready to accept traffic. This metrics reports a 1 if the endpoint is healthy, 0 otherwise.",0,bentoml,,,
4+
bentoml.service.adaptive_batch_size.bucket,count,,,,"The number of observations since last data collection that fall within a specific upper_bound tag for adaptive batch sizes used during Service execution histogram measurements.",0,bentoml,,,
5+
bentoml.service.adaptive_batch_size.count,count,,,,"The number of observations since last data collection for adaptive batch sizes used during Service execution histogram measurements.",0,bentoml,,,
6+
bentoml.service.adaptive_batch_size.sum,count,,,,"The total batch size units across all observations since last data collection for adaptive batch sizes used during Service execution histogram measurements.",0,bentoml,,,
7+
bentoml.service.request.count,count,,request,,The number of new requests that a Service has processed since last submission,0,bentoml,,,
8+
bentoml.service.request.duration.bucket,count,,,,"The number of observations since last data collection that fall within a specific upper_bound tag for request processing duration histogram measurements.",0,bentoml,,,
9+
bentoml.service.request.duration.count,count,,,,"The number of requests processed since last data collection histogram measurements.",0,bentoml,,,
10+
bentoml.service.request.duration.sum,count,,second,,"The total sum of request processing time in seconds across all observations since last data collection histogram measurements.",0,bentoml,,,
11+
bentoml.service.request.in_progress,gauge,,request,,The number of requests that are currently being processed by a Service.,0,bentoml,,,
12+
bentoml.service.time_since_last_request,gauge,,second,,The amount of time in seconds since the last request was processed by a Service.,0,bentoml,,,

0 commit comments

Comments
 (0)