Skip to content

Docs for how to monitor the resulting production app #353

@osdiab

Description

@osdiab

I figured out how to tail the logs on my Cloudflare Workers instance using wrangler, but it's not clear from the fab docs how you'd monitor a real production instance of a fab-deployed project. It would be helpful if this kind of info was present somewhere in the docs since monitoring is a big part of running a prod service.

I did this for a Cloudflare Workers deploy:

  • yarn add -D @cloudflare/wrangler
  • touch wrangler.toml
  • Add the following to it:
name = "script-name-you-chose-in-fab.config.json5"
type = "webpack"
workers_dev = false
route = "route-you-chose-in-fab.config.json5"

or can omit route, use workers_dev = true for a workers-dev deploy

  • renamed the example env vars in .env used in the fab config to match those that Cloudflare workers expect: CF_ACCOUNT_ID, CF_ZONE_ID, CF_API_TOKEN
  • yarn add -D dotenv-cli
  • Add a script to package.json: "tail": "dotenv wrangler tail"

Then yarn tail tails the logs as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions