 
Backblaze B2
Integration
Backblaze Access
Create a new application key. The application key must have Write access.
Birch
Add the integration to your dashboard.
| Field | Value | Required | 
|---|---|---|
| Key ID | The keyId for the given application key | ✔ | 
| Application Key | The application key returned by Backblaze | ✔ | 
| Endpoint | The endpoint for the bucket you want the logs to write to. Example is s3.us-east-005.backblazevb2.com | ✔ | 
| Bucket | The bucket where the logs should be saved | ✔ | 
| Key Prefix | A prefix to the path where the logs are put. See additional documentation | 
Key Prefix
Logs will be saved to s3://:bucket/(:key_prefix/):source_identifier/:timestamp.json
Let's say you have the following setup:
- Bucket is your_company
- Key prefix is null
- You did not set an identifier on the logger. Birch.identifier = nil
- The UUID is e903d25d-eabc-4038-a149-bccf87830021. Example:let uuid = Birch.uuid
Logs will be written to:
s3://your_company/e903d25d-eabc-4038-a149-bccf87830021/1674146985.json
Let's say you have this setup:
- Bucket is your_company
- Key prefix is birch_logs
- You set an identifier on the logger. Birch.identifier = "abc123"
Logs will be written to
s3://your_company/birch_logs/abc123/1674146985.json
Log Format
[
  {
    "timestamp": "2022-10-25T02:05:15+00:00",
    "level": 0,
    "source": {
      "uuid": "954257b7-1feb-4fd1-8cb8-a047a105ff26",
      "package_name": "com.gruffins.birch.app",
      "app_version": "1.0",
      "app_build_number": "1",
      "brand": "google",
      "manufacturer": "google",
      "model": "pixel 3a",
      "os": "Android",
      "identifier": "user_id",
      "custom_property__key": "value",
      "custom_property__key_1": "value 1"
    },
    "message": "hello"
  }
]