This file contains hidden or 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
| pm.status_path = /status | |
| ping.path = /ping | |
| ping.response = pong | |
| access.log = /proc/self/fd/2 | |
| access.format = '{"date":"%{%FT%T.%LZ}t", "php-fpm": {"cpu":"%C","duration_ms":"%{mili}d","filname":"%f","method":"%m","memory_b":"%M","pool":"%n","query_string":"%q","uri":"%r","remote_ip":"%R","status":"%s","end_time":"%{%FT%T.%LZ}T"}}' |
This file contains hidden or 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
| ErrorLog /proc/self/fd/2 | |
| ErrorLogFormat "{ \"time\":\"%{cu}tZ\", \"function\" : \"[%-m:%l]\" , \"process\" : \"[pid %P:tid %T]\" , \"message\" : \"%M\"}" | |
| LogFormat "{\"date\":\"%{%Y-%m-%d}tT%{%T}t.%{msec_frac}tZ\", \"http\": {\"duration_ms\":%{ms}T, \"bytes\": %{}B, \"filename\":\"%f\", \"remoteIP\":\"%a\", \"url_details\": {\"host\":\"%V\", \"path\":\"%U\", \"query\":\"%q\"}, \"method\":\"%m\", \"status_code\":%>s, \"userAgent\":\"%{User-agent}i\", \"referer\":\"%{Referer}i\"}}" jsoncombined | |
| CustomLog /proc/self/fd/1 jsoncombined |
This file contains hidden or 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
| # Place this file inside /etc/datadog-agent/conf.d/php_fpm.d/auto_conf.yaml | |
| # Then follow documentation on how to start or restart the datadog agent | |
| # You must restart the agent to pick up changes to these files | |
| init_config: | |
| ad_identifiers: | |
| - php_fpm | |
| instances: | |
| - status_url: http://%%host%%:%%port%%/status |
This file contains hidden or 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
| var mime = require('mime-types'); | |
| const MIN_CACHE_TTL = 24 * 60 * 60; | |
| const DEFAULT_CONTENT_TYPE = 'application/octet-stream'; | |
| const blacklistContentTypes = [DEFAULT_CONTENT_TYPE]; | |
| if ('server' in headers && headers.server[0].value === 'AmazonS3') { | |
| let fixContentType = false; | |
| // Special s3 origin header fixes | |
| if ('content-type' in headers) { | |
| if (blacklistContentTypes.includes(headers['content-type'][0].value.toLowerCase())) { |
This file contains hidden or 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
| USE core; | |
| CREATE TABLE events ( | |
| Owner_id int not null | |
| Recipient_id int | |
| Owner_type type | |
| Recipient_type type | |
| Event_key json | |
| Created_at date not null | |
| ) PARTITION BY RANGE (created_at); |
This file contains hidden or 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
| SELECT "core"."events".* | |
| FROM "core"."events" | |
| WHERE ("core"."events"."owner_id" = 1234 AND | |
| "core"."events"."owner_type" = 'Core::Consumer' OR | |
| "core"."events"."recipient_id" = 1234 AND | |
| "core"."events"."recipient_type" = 'Core::Consumer') AND | |
| ("core"."events"."event_key") IN | |
| ('consumer.showroom.event1', | |
| 'consumer.showroom.event2', | |
| 'consumer.marketplace.event3') |
This file contains hidden or 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
| USE core; | |
| CREATE TABLE events ( | |
| Owner_id int not null | |
| Recipient_id int | |
| Owner_type type | |
| Recipient_type type | |
| Event_key json | |
| Created_at date not null | |
| ) PARTITION BY RANGE (created_at); |
This file contains hidden or 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 apig_wsgi import make_lambda_handler | |
| import bottle | |
| from bottle import request | |
| import os | |
| app = bottle.default_app() | |
| alb_lambda_handler = make_lambda_handler(app) | |
| @app.get('/internal/<check>') | |
| def health_check(check='health'): |
This file contains hidden or 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 apig_wsgi import make_lambda_handler | |
| import bottle | |
| app = bottle.default_app() | |
| # bottle.debug = True | |
| alb_lambda_handler = make_lambda_handler(app) | |
| @app.get('/browse/hello') | |
| def hello(): |
This file contains hidden or 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
| require 'ldclient-rb' | |
| if Settings.LAUNCH_DARKLY_LOG_LEVEL | |
| ld_logger = ::Logger.new($stdout) | |
| ld_logger.level = ::Logger.const_get(Settings.LAUNCH_DARKLY_LOG_LEVEL.upcase) | |
| Ethon.logger = ld_logger | |
| else | |
| ld_logger = Rails.logger | |
| end | |
| feature_store = if ENV['REDIS_URL'].to_s.downcase.start_with?('redis://') && ENV['LAUNCH_DARKLY_USE_LDD'].to_s.downcase == 'true' |
NewerOlder