Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 2.48 KB

framework-metric_writer.md

File metadata and controls

44 lines (36 loc) · 2.48 KB

Metric Writer Framework

The Metric Writer Framework causes an application to be automatically configured to add Cloud Foundry-specific Micrometer tags.

Detection Criterion Existence of a micrometer-core*.jar file in the application directory
Tags metric-writer-reconfiguration=<version>
Tags are printed to standard output by the buildpack detect script

The Metric Writer Framework adds a set of CloudFoundry-specific Micrometer tags to any Micrometer metric that does not already contain the keys. The values of these tags can be explicitly configured via environment variables otherwise they default to values extracted from the standard Cloud Foundry runtime environment.

Tag Environment Variable Default
cf.account CF_APP_ACCOUNT $VCAP_APPLICATION / cf_api
cf.application CF_APP_APPLICATION $VCAP_APPLICATION / application_name / frigga:name
cf.cluster CF_APP_CLUSTER $VCAP_APPLICATION / application_name / frigga:cluster
cf.version CF_APP_VERSION $VCAP_APPLICATION / application_name / frigga:revision
cf.instance.index CF_APP_INSTANCE_INDEX $CF_INSTANCE_INDEX
cf.organization CF_APP_ORGANIZATION $VCAP_APPLICATION / organization_name
cf.space CF_APP_SPACE $VCAP_APPLICATION / space_name

Configuration

For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to Configuration and Extension.

The framework can be configured by modifying the config/metric_writer.yml file in the buildpack fork. The framework uses the Repository utility support and so it supports the version syntax defined there.

Name Description
enabled Whether to attempt metric augmentation
repository_root The URL of the Metric Writer repository index (details).
version The version of Metric Writer to use. Candidate versions can be found in this listing.