Documentation ¶
Overview ¶
Package apmclient provides an API for querying APM data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateAgentAPIKey ¶
CreateAgentAPIKey creates an agent API Key, and returns it in the base64-encoded form that agents should provide.
If expiration is less than or equal to zero, then the API Key never expires.
func (*Client) GetElasticCloudAPMInput ¶
GetElasticCloudAPMInput returns the APM configuration as defined in the "elastic-cloud-apm" integration policy,
func (*Client) ServiceSummary ¶
ServiceSummary returns ServiceSummary objects by aggregating `service_summary` metric sets.
type Config ¶
type Config struct { // ElasticsearchURL holds the Elasticsearch URL. ElasticsearchURL string // Username holds the Elasticsearch username for basic auth. Username string // Password holds the Elasticsearch password for basic auth. Password string // APIKey holds an Elasticsearch API Key. // // This will be set from $ELASTICSEARCH_API_KEY if specified. APIKey string // APMServerURL holds the APM Server URL. // // If this is unspecified, it will be derived from // ElasticsearchURL if that is an Elastic Cloud URL. APMServerURL string // KibanaURL holds the Kibana URL. // // If this is unspecified, it will be derived from // ElasticsearchURL if that is an Elastic Cloud URL. KibanaURL string // TLSSkipVerify determines if TLS certificate // verification is skipped or not. Default to false. // // If not specified the value will be take from // TLS_SKIP_VERIFY env var. // Any value different from "" is considered true. TLSSkipVerify bool }
func (*Config) Finalize ¶
Finalize finalizes cfg by setting unset fields from environment variables:
- ElasticsearchURL is set from $ELASTICSEARCH_URL
- Username is set from $ELASTICSEARCH_USERNAME
- Password is set from $ELASTICSEARCH_PASSWORD
- API Key is set from $ELASTICSEARCH_API_KEY
- APMServerURL is set from $ELASTIC_APM_SERVER_URL
- KibanaURL is set from $KIBANA_URL
If $ELASTIC_APM_SERVER_URL is unspecified, and ElasticsearchURL holds an Elastic Cloud-based URL, then the APM Server URL is derived from that. Likewise, the Kibana URL will be set in this way if $KIBANA_URL is unspecified.
func (*Config) InferElasticCloudURLs ¶
InferElasticCloudURLs attempts to infer a value for APMServerURL and KibanaURL (if they are empty), by checking if ElasticsearchURL matches an Elastic Cloud URL pattern, and deriving the other URLs from that.