Skip to content

Commit

Permalink
feat: added java instrumentation for elasticsearch queries
Browse files Browse the repository at this point in the history
  • Loading branch information
hsinghkalsi committed Jan 24, 2022
1 parent e0b7d59 commit 982806b
Show file tree
Hide file tree
Showing 9 changed files with 673 additions and 0 deletions.
29 changes: 29 additions & 0 deletions quickstarts/java/elasticsearch/alerts/HighCpuUtilization.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: High CPU Utilization

details: |+
This alert is triggered when the CPU Utilization is above 90%.
type: STATIC
nrql:
query: "SELECT rate(sum(apm.service.cpu.usertime.utilization), 1 second) * 100
as cpuUsage FROM Metric WHERE appName like '%'"

# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation
threshold: 90
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 2592000
31 changes: 31 additions & 0 deletions quickstarts/java/elasticsearch/alerts/TransactionErrors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Transaction Errors

details: |+
This alert is triggered when the the transactions fail more than 10% of the time in 5 minutes.
type: STATIC
nrql:
query:
"SELECT count(apm.service.error.count) / count(apm.service.transaction.duration) * 100
as 'Web errors' FROM Metric WHERE appName like '%'
AND (transactionType = 'Web')"

# Function used to aggregate the NRQL query value(s) for comparison to the terms.threshold (Default: SINGLE_VALUE)
valueFunction: SINGLE_VALUE

# List of Critical and Warning thresholds for the condition
terms:
- priority: CRITICAL
# Operator used to compare against the threshold.
operator: ABOVE
# Value that triggers a violation
threshold: 10
# Time in seconds; 120 - 3600
thresholdDuration: 300
# How many data points must be in violation for the duration
thresholdOccurrences: ALL

# Duration after which a violation automatically closes
# Time in seconds; 300 - 2592000 (Default: 86400 [1 day])
violationTimeLimitSeconds: 86400
40 changes: 40 additions & 0 deletions quickstarts/java/elasticsearch/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
id: ca1d4f11-5dea-4c8c-8a83-d59fb0b9e52b
name: gcp-pubsub
title: Google Cloud Pub/Sub Java Agent Extension
description: |
# What is Pub/Sub?
Messaging and ingestion for event-driven systems and streaming analytics.
- Pub/Sub enables you to create systems of event producers and consumers, called publishers and subscribers.
- Publishers communicate with subscribers asynchronously by broadcasting events, rather than by synchronous remote procedure calls (RPCs).
- Publishers send events to the Pub/Sub service, without regard to how or when these events will be processed.
Pub/Sub then delivers events to all services that need to react to them.
Compared to systems communicating through RPCs, where publishers must wait for subscribers to receive the data,
such asynchronous integration increases the flexibility and robustness of the system overall.
summary: |
Java agent extension to monitor Google Cloud Pub/Sub with New Relic. Once installed, the instrumentation will monitor both the publish and the subscribe of messages sent via the PubSub framework.
In addition, the instrumentation will take care of distributed tracing so that the publish will provide the distributed tracing headers on the message and the subscribe will read the headers and process them appropriately.
icon: icon.svg
logo: logo.svg
level: Community
website: https://cloud.google.com/pubsub

keywords:
- nrlabs
- nrlabs-data
- apm
- java
- pubsub
- gcp

authors:
- New Relic Labs

documentation:
- name: Java agent extension for Google Cloud Pub/Sub
description: |
Java Agent instrumentation extension for the Google Cloud Platform PubSub framework
url: >-
https://github.com/newrelic-experimental/newrelic-java-gcp-pubsub
Loading

0 comments on commit 982806b

Please sign in to comment.