The OpenTelemetry Collector provides an integration with Memcached to ingest metrics. The Collector synthesizes metrics by scraping stats from a running Memcached instance. From there the metrics are processed and exported to Cloud Observability.
To complete the integration, you will configure the Memcached receiver for the Collector. The receiver periodically executes the Memcache Stats command and synthesize metrics from the results.
You then need to enable the integration by adding it to a pipeline.
In the Collector configuration file, add Memcached as a receiver and set the following:
endpoint: The hostname/IP address and port or, unix socket file path of the memcached instance
1 2 3 receivers: memcached: endpoint: "localhost:11211"
The OpenTelemetry repo provides additional details about Memcached configuration.
Once the Memcached receiver is configured, enable it by adding it to one or more pipelines as described in the Collector configuration documentation.
You can validate that metrics are reporting to Cloud Observability on the Metrics details page in Project settings.
In Cloud Observability, click Project settings > Metric details.
Search for Memcached metric names.
See the repo documentation for a complete list of emitted metrics.
If needed, click on the metric to edit the description and how the units are displayed in Cloud Observability.
For a more complete example that’s ready to run, see the Memcached integration in Cloud Observability OpenTelemetry Examples.
Updated Dec 1, 2022