Skip to content

Commit b280fa6

Browse files
chore: add http_status_code to objectstore customer cw access_logging and metrics (#1511)
1 parent 1c554ba commit b280fa6

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

docs/objectstore/http-api.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,8 @@ When access logging is enabled, Momento delivers logs to your CloudWatch Log Gro
605605
"key": "images/logo.png",
606606
"store": "my-store",
607607
"status": "cache_hit",
608-
"size": 15234
608+
"size": 15234,
609+
"http_status_code": 200
609610
}
610611
```
611612

@@ -617,6 +618,7 @@ When access logging is enabled, Momento delivers logs to your CloudWatch Log Gro
617618
| store | String | The name of the object store. |
618619
| status | String | The result of the operation (see below). |
619620
| size | Integer | The size of the object in bytes. Only present for successful operations. |
621+
| http_status_code | Integer | The HTTP status code returned for the operation (e.g. `200`, `204`, `403`, `404`, `500`). |
620622

621623
### Status Values
622624

@@ -651,6 +653,7 @@ Momento/ObjectStore
651653
| `Endpoint` | The Momento endpoint serving the request. |
652654
| `Api` | The API operation: `GetObject` or `PutObject`. |
653655
| `Result` | The result of the operation (only present in per-result metrics, see below). |
656+
| `HttpStatusCode` | The HTTP status code returned for the operation (only present in per-result metrics, see below). |
654657

655658
## Metrics
656659

@@ -666,9 +669,9 @@ These metrics are emitted for every request, regardless of outcome. They include
666669
| `Bytes` | Bytes | Total bytes transferred (object size for PutObject, response size for GetObject). |
667670
| `Latency` | Microseconds | End-to-end request latency. |
668671

669-
### Per-result metrics (with `Result` dimension)
672+
### Per-result metrics (with `Result` and `HttpStatusCode` dimensions)
670673

671-
These metrics are emitted with a `Result` dimension, allowing you to filter and alarm on specific outcomes. Only the `Requests` metric is emitted per result.
674+
These metrics are emitted with `Result` and `HttpStatusCode` dimensions, allowing you to filter and alarm on specific outcomes. Only the `Requests` metric is emitted per result.
672675

673676
| Metric | Unit | Description |
674677
|--------|------|-------------|
@@ -678,23 +681,23 @@ These metrics are emitted with a `Result` dimension, allowing you to filter and
678681

679682
#### GetObject
680683

681-
| Result | Description |
682-
|--------|-------------|
683-
| `CacheHit` | Object was found in the cache. |
684-
| `CacheHitExpired` | Object was found in the cache but had expired. |
685-
| `Miss` | Object was not found in either cache or storage. |
686-
| `StorageHit` | Object was not in cache but was found in S3 storage. |
687-
| `StorageHitExpired` | Object was found in S3 storage but had expired. |
688-
| `InternalError` | The request failed due to an internal error. |
689-
| `AuthorizationError` | The request was rejected due to insufficient permissions. |
684+
| Result | HttpStatusCode | Description |
685+
|--------|----------------|-------------|
686+
| `CacheHit` | `200` | Object was found in the cache. |
687+
| `CacheHitExpired` | `404` | Object was found in the cache but had expired. |
688+
| `Miss` | `404` | Object was not found in either cache or storage. |
689+
| `StorageHit` | `200` | Object was not in cache but was found in S3 storage. |
690+
| `StorageHitExpired` | `404` | Object was found in S3 storage but had expired. |
691+
| `InternalError` | `500` | The request failed due to an internal error. |
692+
| `AuthorizationError` | `403` | The request was rejected due to insufficient permissions. |
690693

691694
#### PutObject
692695

693-
| Result | Description |
694-
|--------|-------------|
695-
| `Ok` | Object was successfully stored. |
696-
| `InternalError` | The request failed due to an internal error. |
697-
| `AuthorizationError` | The request was rejected due to insufficient permissions. |
696+
| Result | HttpStatusCode | Description |
697+
|--------|----------------|-------------|
698+
| `Ok` | `204` | Object was successfully stored. |
699+
| `InternalError` | `500` | The request failed due to an internal error. |
700+
| `AuthorizationError` | `403` | The request was rejected due to insufficient permissions. |
698701

699702
## Example CloudWatch Queries
700703

0 commit comments

Comments
 (0)