Skip to content

Commit

Permalink
Updated CHANGELOG and README for v8.9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Aug 13, 2024
1 parent 511745d commit 0bc067b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 8.9.0 (2024-08-13)

- Added the OpenTelemetry support
[#27](https://github.com/elastic/elastic-transport-php/pull/27)

## 8.8.0 (2023-11-08)

- Support path in host connection URI
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,30 @@ a [PSR-18](https://www.php-fig.org/psr/psr-18/) client for the syncronous reques
a different [HttpAsyncClient](https://github.com/php-http/httplug/blob/master/src/HttpAsyncClient.php)
client for the asyncronous requests.

## OpenTelemetry

Starting from v8.9.0 we introduced the support of OpenTelemetry for the HTTP send request.
Right now the support is only for syncronous HTTP call.

In order to enable the OpenTelemetry you need to set the ENV variable
`OTEL_PHP_INSTRUMENTATION_ELASTICSEARCH_ENABLED` to true.

We added the support of OpenTelemetry natively in the `Transport:sendRequest()` function.
By default, the Transport create a span from a Tracer provider (e.g. Global) with the
following attributes:

```
http.request.method
url.full
server.address
server.port
```

We also added a `$opts` array as second optional parameter for the `Transport:sendRequest()`
to pass additional attributes for OTel instrumentation.

We created an [OpenTelemetry](src/OpenTelemetry.php) class to provide all the configuration.

## Copyright and License

Copyright (c) [Elasticsearch B.V](https://www.elastic.co).
Expand Down

0 comments on commit 0bc067b

Please sign in to comment.