This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_bgtask_threshold(dd) | |
bgtask_series_threshold = 5 | |
from = Time.now - 120 | |
to = Time.now | |
CANARY_BGSERVERS.each do |server| | |
puts "Checking bgtasks on server #{server}" | |
query = "sum:lockable.run_delta.count{env:prod-web,role:web-bg,host:#{server},success:true}by{host}.as_count()" | |
bgtask_value = dd.get_points(query, from, to) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_bgtask_threshold(dd) | |
bgtask_series_threshold = 5 | |
from = Time.now - 120 | |
to = Time.now | |
CANARY_BGSERVERS.each do |server| | |
puts "Checking bgtasks on server #{server}" | |
query = "sum:lockable.run_delta.count{env:prod-web,role:web-bg,host:#{server},success:true}by{host}.as_count()" | |
bgtask_value = dd.get_points(query, from, to) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datadog import initialize | |
options = { | |
'api_key':'', | |
'app_key':'' | |
} | |
initialize(**options) | |
# EVENTS: Use Datadog REST API client to create an event: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
from flask import Flask | |
from ddtrace import tracer | |
app = Flask(__name__) | |
def function1(): | |
time.sleep(0.1) | |
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis # We'll call an external Redis server just to see how that looks. | |
import time # Need this for sleep statements. | |
import blinker as _ | |
from flask import Flask | |
from ddtrace import tracer | |
app = Flask(__name__) | |
@tracer.wrap(name='my_resource1') | |
def function1(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
application = Flask(__name__) | |
@application.route("/") | |
def index(): | |
return "hello!" | |
if __name__ == "__main__": | |
application.run(host="0.0.0.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flaskapp import application | |
if __name__ == "__main__": | |
application.run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[uwsgi] | |
master = true | |
processes = 8 | |
threads = 4 | |
# DogStatsD plugin configuration | |
enable-metrics = true | |
plugin = dogstatsd | |
stats-push = dogstatsd:127.0.0.1:8125,myapp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more contributor | |
license agreements. See the NOTICE file distributed with this work for additional | |
information regarding copyright ownership. The ASF licenses this file to You under | |
the Apache License, Version 2.0 (the "License"); you may not use this file except in | |
compliance with the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or | |
agreed to in writing, software distributed under the License is distributed on an | |
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instances: | |
- host: localhost | |
port: 1099 | |
# user: username | |
# password: password | |
name: activemq_instance | |
# List of metrics to be collected by the integration | |
# Visit http://docs.datadoghq.com/integrations/java/ to customize it | |
init_config: | |
conf: |