Skip to content

Commit

Permalink
chore: update readme and freeze phpstan version < 1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
GCalmels committed Jun 11, 2024
1 parent d2eb277 commit 7d27686
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"open-telemetry/gen-otlp-protobuf": "^1.0",
"php-http/httplug": "^2.3",
"phpspec/phpspec": "^7.5",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan": "<1.11",
"symfony/framework-bundle": "*",
"symfony/http-client": "*",
"symfony/messenger": "*",
Expand Down
40 changes: 24 additions & 16 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,31 @@
### Features

#### Tracing

- Using the official [OpenTelemetry SDK](https://github.com/open-telemetry/opentelemetry-php)
- Minimal auto-instrumentation for **requests**, console **commands**, **consumers** and **doctrine**
- Trace context propagation from incoming **requests** to **consumers**, **outgoing http calls** and **databases** (using [`sqlcommenter`](https://google.github.io/sqlcommenter/))
- Configurable blacklisting of requests by path to avoid useless traces, eg. `/metrics` or `/_healthz`
- Automatic log inclusion with configurable log level and channels
- Disabling tracing with the `NoopTracerProvider` thanks to OTEL_SDK_DISABLED=true

#### Metrics

- Using the [Prometheus Client](https://github.com/PromPHP/prometheus_client_php)
- Minimal auto-instrumentation for common **request**, **consumer** and **message** metrics (see list of provided [default metrics](./docs/metrics/default-metrics.md)).
- Autoconfigurable metric providers, see below.

#### Logging

- Adds trace context to logs for correlation, with customizable keys.

#### Baggage

- Using the official [OpenTelemetry SDK](https://github.com/open-telemetry/opentelemetry-php)
- Baggage propagation from incoming **requests** to **consumers** and **outgoing http calls**

#### Health

- A simple endpoint to expose application health (default: `/_healthz`)
- Autoconfigurable healthcheck interface to add healthchecks to be made for global application health

Expand All @@ -30,19 +36,21 @@
```sh
composer require worldia/instrumentation-bundle <your-exporter>
```

You will aso need to install an [exporter implementation](https://packagist.org/packages/open-telemetry/exporter-otlp?query=open-telemetry%2Fexporter-) and `APCu` is required by the prometheus exporter.
```

````
Add to ```bundles.php```:
```php
return [
// Other bundles
Instrumentation\InstrumentationBundle::class => ['all' => true],
];
```
````

**Minimal configuration**
See the complete [configuration reference here](./docs/config-reference.md) or run ```bin/console config:dump-reference instrumentation```.
**Minimal configuration**
See the complete [configuration reference here](./docs/config-reference.md) or run `bin/console config:dump-reference instrumentation`.

```yaml
// docker-compose.yaml
Expand Down Expand Up @@ -71,18 +79,18 @@ instrumentation: ~
### Usage
- **Tracing**
- [Simple tracing example](./docs/tracing/simple-trace.md)
- [Simple tracing example using the static API](./docs/tracing/static-usage.md)
- [Add Urls to your traces in error messages](./docs/tracing/add-urls-to-your-traces.md)
- [Use upstream request id as trace id](./docs/tracing/upstream-request-id.md)
- [Customize operation (span) name for a message](./docs/tracing/custom-operation-name-for-message.md)
- [Link strategy for a message](./docs/tracing/link-strategy-for-message.md)
- [Propagating trace/baggage context in HTTP requests](./docs/tracing/propagating-context.md)
- [Add request / response bodies as span attributes for HTTP requests](./docs/tracing/message-bodies.md)
- [Simple tracing example](./docs/tracing/simple-trace.md)
- [Simple tracing example using the static API](./docs/tracing/static-usage.md)
- [Add Urls to your traces in error messages](./docs/tracing/add-urls-to-your-traces.md)
- [Use upstream request id as trace id](./docs/tracing/upstream-request-id.md)
- [Customize operation (span) name for a message](./docs/tracing/custom-operation-name-for-message.md)
- [Link strategy for a message](./docs/tracing/link-strategy-for-message.md)
- [Propagating trace/baggage context in HTTP requests](./docs/tracing/propagating-context.md)
- [Add request / response bodies as span attributes for HTTP requests](./docs/tracing/message-bodies.md)
- **Metrics**
- [Adding a metric](./docs/metrics/adding-a-metric.md)
- [Using Redis as storage adapter](./docs/metrics/using-redis-as-storage.md) (Recommended)
- [Adding a metric](./docs/metrics/adding-a-metric.md)
- [Using Redis as storage adapter](./docs/metrics/using-redis-as-storage.md) (Recommended)
- **Logging**
- [Customizing trace context log keys](./docs/logging/custom-keys.md)
- [Customizing trace context log keys](./docs/logging/custom-keys.md)
- **Health**
- [Adding a healthcheck](./docs/health/adding-a-healthcheck.md)
- [Adding a healthcheck](./docs/health/adding-a-healthcheck.md)

0 comments on commit 7d27686

Please sign in to comment.