If these properties are manually configured, use only
falsefor boolean values.
The behaviour of the Scope Agent can be modified using environment variables or a configuration file
scope.yml in the source root of the project.
service: "service-name" repository: "https://github.com/undefinedlabs/scope-docs.git" source_root: "/home/user/projects/scope-docs" code_path: enabled: true metadata: sample.key1: sampleValue1 testing_mode: true instrumentation: enabled: true db: statement_values: true http: payloads: true headers: - Authorization - My-Header-One - My-Header-Two tracer: global: true runner: enabled: true fail_retries: 5 include_branches: - feature-branch-1 - feature-branch-2 exclude_branches: - master
Disabling Scope instrumentation
Scope auto instruments your code and tests by default. You can disable this behaviour.
Changing service name
You can specify the name of the service when sending data to Scope. Scope uses
default as fallback.
Change testing mode
This variable indicates whether the agent is running tests (
true) or it is being used for runtime instrumentation (
SCOPE_TESTING_MODE is not specified, the agent sets it to
Adding agent metadata
You can send arbitrary metadata for every test associated with a certain commit.
Include HTTP payloads in HTTP span tags
You can include HTTP payloads in the related HTTP spans, truncated to the first 512 bytes.
Include additional HTTP Headers in HTTP span tags
You can include additional HTTP Headers in HTTP span tags.
Note that the content of every header configured explicitly to be shown in the HTTP span tags will not be filtered.
You can add Code Path information that will show the executed lines in a certain test at a certain commit.
This is only available for tests run by Jest for the moment and it needs extra configuration. Have a look at the code path configuration.
Scope Intelligent Test Runner
Scope's Intelligent Test Runner will selectively run only the subset of tests affected by code changes. For more information go to Scope Intelligent Test Runner.
Enable or disable
Through this configuration parameter you can enable or disable Scope Intelligent Test Runner. The rest of
runner configuration parameters will have no effect if
enabled is false.
This parameter determines the number of times a test will be retried if it fails.
Included and excluded branches
There are two parameters to control the branches in which you want to run the Scope Intelligent Test Runner:
runner.exclude_branches. The way they work is the following:
runner.include_branchesis configured, only configured branches are included.
runner.exclude_branchesis configured, all branches except configured branches are included.
- If both
runner.exclude_branchesare configured, the runner will only take into account
runner.include_branches. If the same branch is configured, a warning message will be shown.