Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommended setup for production #422

Open
zeluspudding opened this issue Jan 6, 2025 · 1 comment
Open

Recommended setup for production #422

zeluspudding opened this issue Jan 6, 2025 · 1 comment

Comments

@zeluspudding
Copy link

I'm assuming it's best to omit Fiberplane from production hono instances. Since hono is instrumented with Fiberplane like:

image

What is the recommended CI/CD setup so this is omitted in prod? Install it as a dev dependency and add an environment switch? Something like:
image

?

@zeluspudding zeluspudding changed the title Guidance on how to remove fiberplane when deploying to production Recommended setup for production Jan 6, 2025
@flenter
Copy link
Member

flenter commented Jan 7, 2025

Good question! If the FPX_ENDPOINT environment variable isn't set, the library won't do much anymore:
https://github.com/fiberplane/fpx/blob/main/packages/client-library-otel/src/instrumentation.ts#L115-L130

So not setting that env var avoids the need for additional code. If you don't want the library code + its dependencies to be deployed to production it's a bit more complicated as you'd need to either avoid importing the library at all when in production or handle the exception that happens when you try to import it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants