Skip to content

Commit

Permalink
[Feature] Receive the statsd's host:port at STATS_PROVIDER for metric
Browse files Browse the repository at this point in the history
  • Loading branch information
minhoryang committed Jun 18, 2024
1 parent 2823bdb commit 805c749
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ docker pull luyuanxin1995/bricksllm:1.4.0
> | `REDIS_READ_TIME_OUT` | optional | Timeout for Redis read operations | `1s` |
> | `REDIS_WRITE_TIME_OUT` | optional | Timeout for Redis write operations | `500ms` |
> | `IN_MEMORY_DB_UPDATE_INTERVAL` | optional | The interval BricksLLM API gateway polls Postgresql DB for latest key configurations | `1s` |
> | `STATS_PROVIDER` | optional | This value can only be datadog. Required for integration with Datadog. |
> | `STATS_PROVIDER` | optional | "datadog" or Host:Port(127.0.0.1:8125) for statsd. |
> | `PROXY_TIMEOUT` | optional | Timeout for proxy HTTP requests. | `600s` |
> | `NUMBER_OF_EVENT_MESSAGE_CONSUMERS` | optional | Number of event message consumers that help handle counting tokens and inserting event into db. | `3` |
> | `AWS_SECRET_ACCESS_KEY` | optional | It is for PII detection feature. | `5s` |
Expand Down
6 changes: 6 additions & 0 deletions internal/stats/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ func InitializeClient(provider string) error {
return err
}
instance.statsdc = statsd
} else {
statsd, err := statsd.New(provider)
if err != nil {
return err
}
instance.statsdc = statsd
}

return nil
Expand Down

0 comments on commit 805c749

Please sign in to comment.