Skip to content

recordLocation

Description

Return the cloud storage location of a record, such as the URL of an S3 object when using AWS S3.

Note

Works only with data stored in your cloud storage. Running this on indexed documents (Frequent Search mode) will return null.

Syntax

recordLocation(): string

Example

Use case: Add the storage URL to documents Attach the S3 object URL to each document for easier navigation between logs and raw storage.

{
    "service": "backend-service",
    "status_code": 500
}
create s3_location from recordLocation()

Output

{
    "service": "backend-service",
    "status_code": 500,
    "s3_location": "s3://your-bucket/path/to/object"
}