Skip to content

Latest commit

 

History

History

instrumentation

Example: Instrumentation

This example demonstrates how to instrument the Elasticsearch client.

OpenCensus

The opencensus.go example uses the ochttp.Transport wrapper to auto-instrument the client calls, and provides a simple exporter which prints information to the terminal.

Elastic APM

The apmelasticsearch.go example demonstrates instrumenting the client with the Go agent for Elastic APM: configuring the transactions for multiple types, creating custom spans within a transaction, and reporting errors.

Screenshot

Run the example interactively with Docker and inspect the UI in Kibana:

docker-compose --file elasticstack.yml up --build