Install into containers

Contrast works inside applications using the language’s instrumentation API or by wrapping functions. Since Contrast is running within the same process as the application, it does not require an additional container. Think of Contrast as just another external dependency.

When using a container, you’ll want to pull the agent and insert it into your application’s runtime during the build process. For example, an image-based deployment might look something like this:

  1. Put agent on the container file system with your application.

  2. Add a Contrast config file to source control.

  3. Modify your deployment configuration to inject application-specific configuration values as environment variables.

  4. Modify the container entry-point to start with Contrast enabled.

  5. Rebuild and deploy the application.

See specific examples for working with a particular tool or technology like Docker, Kubernetes or Fargate.