From 99cf670ff201c6622936fc1f8780cfada32e5704 Mon Sep 17 00:00:00 2001 From: Christoph Quadt Date: Wed, 21 Oct 2020 10:42:07 +0200 Subject: [PATCH 1/2] Enhanced README. --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1d8296b..776c09b 100644 --- a/README.md +++ b/README.md @@ -57,8 +57,7 @@ class AppKernel extends Kernel } ``` -Step 3: Add the Bundle config file ----------------------------------- +### Step 3: Add the Bundle config file Then, add the bundle configuration yml file `elastic_apm.yml` into `app/config` directory: @@ -67,9 +66,9 @@ Then, add the bundle configuration yml file `elastic_apm.yml` into elastic_apm: enabled: true # Activate the APM Agent, default is true serviceName: 'Symfony APM App' # The name of your service, required - environment: dev # The environment of your service - serverUrl: 'http://localhost:8200' # The URL for your APM service. The URL must be fully qualified, including the protocol and port. + serverUrl: 'http://localhost:8200' # The URL for your APM service, required The URL must be fully qualified, including the protocol and port. secretToken: null # The secret token required to send data to your APM service + environment: dev # The environment of your service ``` Import new config file to `config.yml` into `app/config` directory: @@ -80,6 +79,44 @@ imports: - { resource: elastic_apm.yml } ``` +Configuration +============= + +The following configurations options are provided: + +| Option | Default | Example Value(s) | Mandatory | Description | +| ------------- |:-------------:|:-----:|:-----:|:-----:| +| enabled | true | true, false | yes | Activating the APM Agent +| serviceName | "Symfony APM Service" | | yes | The name of your service +| serverUrl | null | "http://localhost:8200" | yes | The URL for your APM service. The URL must be fully qualified, including the protocol and port. +| secretToken | null | "SOME_TOKEN" | no | The secret token required to send data to your APM service +| serviceVersion | null | 1.0 | no | The version of your deployed service +| frameworkName | null | "Symfony" | no | The name of the application framework +| frameworkVersion | null | "5.1.7", !php/const App\Kernel::VERSION | no | The version of the application framework +| environment | null | "dev", '%kernel.environment%' | no | The environment where your service is running +| hostname | null | "local-hostname" | no | The OS hostname on which the agent is running +| env | [] | ['DOCUMENT_ROOT', 'REMOTE_ADDR', 'REMOTE_USER'] | no | $_SERVER vars to send to the APM Server. Keys are case sensitive +| cookies | [] | ['my-cookie'] | no | Cookies to send to the APM Server. Keys are case sensitive +| httpClient | null | "Buzz\Browser" | no | The service reference to the HTTP client to use for APM requests. It needs to implement the Psr\Http\Client\ClientInterface. When left empty, the Http\Discovery\HttpClientDiscovery is used to find any installed http clients. +| timeout | 10 | 10 | no | The timeout for the HTTP client +| logger | null | "monolog.logger" | no | The service reference to the Logger to use in all APM requests. It needs to implement the Psr\Log\LoggerInterface. When left empty, the Psr\Log\NullLogger is used. +| logLevel | INFO | DEBUG | no | The log level of the logger +| stackTraceLimit | 0 | 10 | no | The depth of a transaction stack trace. The default (0) is unlimited depth. +| transactionSampleRate | 1.0 | 1.0 | no | Transactions will be sampled at the given rate (1.0 being 100%). Sampling a transaction means that the context and child events will be included in the data sent to APM. Unsampled transactions are still reported to APM, including the overall transaction time, but will have no details. The default is to sample all (1.0) transactions. + +Furthermore, it is possible to de-/activate the data capturing for transactions and errors. Per default, both are enabled. +For errors, status codes and exceptions can be excluded. +See the following example: +``` +transactions: # Captures transactions + enabled: true # Activating capturing of transactions, default is true +errors: # Captures errors + enabled: true # Activating capturing of errors, default is true + exclude: + status_codes: [] # Status codes which should not be captured. The default is none. + exceptions: [] # Exceptions which should not be captured. The default is none. +``` + ## Contributing Contributions are welcome. Read the [contributing guide](.github/CONTRIBUTING.md) to get started. From 99eee2fc21a47714d4a377fadb8bf036e6eaac6e Mon Sep 17 00:00:00 2001 From: Christoph Quadt Date: Wed, 21 Oct 2020 10:43:02 +0200 Subject: [PATCH 2/2] Updated CHANGELOG. --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 817c110..693ed01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.2 (October 21, 2020) + - Add more detailed configuration options in README + +## 1.0.1 (October 21, 2020) + - Add CI (travis.yml, updated vendor constraints) + ## 1.0.0 (October 20, 2020) - Update symfony dependencies to 5.1 - Introduce user context on all listeners