Download the PHP package mr-dlef/os-query-digest without Composer

On this page you can find all versions of the php package mr-dlef/os-query-digest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package os-query-digest

os-query-digest

CI PHP 7.4 โ€“ 8.5 no runtime dependencies LGPL-3.0-or-later

Human-readable, loggable digests and stable fingerprints for OpenSearch DSL queries.

A DSL query in a log line is a wall of nested braces: nobody greps it, nobody groups by it, and it costs a fortune in log volume. So the question you actually have during an incident โ€” which kind of query is hurting us? โ€” has no answer anywhere in your stack.

This gives it one!

๐Ÿ“– Documentation ยท โ–ถ Try it on your own query


Before. One search request, as it lands in your logs โ€” and there are thousands of these a day:

After. The same request, three ways:

what it is what it is for
text the query in DQL, with real values paste it into the Dashboards search bar
signature the same line with literals erased read the shape at a glance
hash versioned fingerprint of the signature terms aggregate on it

The third one is the point. Log the hash next to took, and your log index answers questions your dashboards cannot: which kind of query got slow this week, which one showed up with Friday's deploy, which one was hammering the cluster during the incident. Not which thousand queries were slow โ€” which shape was. OpenSearch, analysing OpenSearch.

That query and that fingerprint are not illustrations: they are tests/fixtures/01-error-rate-filter, and the golden file pins the exact hash.

Install

Download the CLI

It digests a query you paste, a file of them a line at a time, or the slow log your cluster is already writing โ€” every flag is in the guide:

That last one ranks the shapes in the file by what they cost you: no code to change, nothing to deploy, no index to create. Needs PHP 7.4 โ†’ 8.5 on the machine, and every release carries a .sha256 beside the file.

Or run it in Docker

It reads standard input, so nothing has to be mounted. Mounting a log instead is one flag. Both artefacts are built from the same source as the package and mint the same fingerprints โ€” CI digests one query each way and compares the two.

Then put it in your application

Three ways in, and they mix:

ext-json, and no runtime dependencies: Monolog, PSR-18 and Guzzle are suggested, never required.

What you get

Documentation

mrdlef.github.io/php-os-query-digest โ€” a guide for each way in, the reference, and the reasoning behind the normalisation rules.

The site tracks the latest release, not main.

Contributing and security

CONTRIBUTING.md โ€” the commands, and the rules that are not guessable from the code.

SECURITY.md โ€” report a vulnerability privately, not in an issue.

License

LGPL-3.0-or-later โ€” see LICENSE.

The LGPL builds on the GPL, so both texts ship: LICENSE holds the Lesser GPL and LICENSE.GPL the GPL it refers to.

In practice: you can use this library in a closed-source application without that application becoming subject to the licence. If you modify the library itself and distribute it, those changes stay under the LGPL.


All versions of os-query-digest with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mr-dlef/os-query-digest contains the following files

Loading the files please wait ...