apps

package module
v0.0.0-...-5762cf1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 29, 2024 License: Apache-2.0, BSD-3-Clause Imports: 10 Imported by: 0

README

Internal Test Apps

Most of dd-trace-go is tested using unit tests or integration tests.

However, some situations require end to end testing. For example:

  • Changes involving the agent, backend and UI.
  • Producing screen shots for documentation and marketing purposes.
  • Validating that existing features continue to work end-to-end.
  • etc.

This directory contains a collection of apps that can be used for such purposes. It also contains the supporting code and documentation that makes it easy to add more apps and run them locally or in CI.

Adding a new app

Run the apps

Manually via CI
  1. Follow this link to open the test workflow in GH Actions.
  2. Click Run workflow
  3. Select the scenarios you want to run.
  4. Configure any other parameters you want to change.
  5. Press Run workflow
Scheduled via CI

All test scenarios are run nightly for 10min and weekly for 1h in CI.

Local development

export DD_API_KEY=<API KEY>
docker-compose run --build scenario memory-leak/heap$

Note:

  • The default destination site is prod. Set export DD_SITE=datad0g.com to send the data to staging.
  • You can pass -e DD_TEST_APPS_TOTAL_DURATION=120s and similar vars to docker-compose, see scenario_test.go for the available vars.

Cost

The CI cost of adding a new scenario is calculated as follows:

envs * nightly_minutes * cost_per_minute * 30 + envs * weekly_minutes * cost_per_minute * 4
2 * 10 * 0.008 * 30 + 2 * 60 * 0.008 * 4 = $8.64

See GH Actions per-minute-rates for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DisableExecutionTracing disables execution tracing for the test app. By
	// default we configure non-stop execution tracing for the test apps unless
	// a DD_PROFILING_EXECUTION_TRACE_PERIOD env is set or this option is true.
	DisableExecutionTracing bool
}

Config is the configuration for a test app used by RunHTTP.

func (Config) RunHTTP

func (c Config) RunHTTP(handler func() http.Handler)

Directories

Path Synopsis
memory-leak implements a http service that provides endpoints that can leak memory in various interesting ways.
memory-leak implements a http service that provides endpoints that can leak memory in various interesting ways.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL