test
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: fluent-bit-config | |
namespace: logging | |
labels: | |
k8s-app: fluent-bit | |
data: | |
fluent-bit.conf: | | |
[SERVICE] |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: fluent-bit-config | |
namespace: logging | |
labels: | |
k8s-app: fluent-bit | |
data: | |
fluent-bit.conf: | | |
[SERVICE] |
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
### | |
# | |
# Installation configuration script for sending logs to Timber using fluent-bit | |
# | |
# * Docs: https://timber.io/docs/platforms/aws-elastic-beanstalk | |
# * Support: [email protected] | |
# | |
# To use this file: | |
# | |
# *Note:* The in-app instructions will offer copy/paste step-by-step |
I hereby claim:
- I am binarylogic on github.
- I am binarylogic (https://keybase.io/binarylogic) on keybase.
- I have a public key ASCnAKZM2WXIBisJmRLt-UOsRwv8dWyzAlL7-chQ7Gcc0Qo
To claim this, I am signing this object:
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
config.integrations.action_controller.enabled = false | |
config.integrations.action_view.enabled = false | |
config.integrations.active_record.enabled = false | |
config.integrations.rack.error_event.enabled = false | |
config.integrations.rack.http_context.enabled = false | |
config.integrations.rack.http_events.enabled = false | |
config.integrations.rack.session_context.enabled = false | |
config.integrations.rack.user_context.enabled = false |
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
Rails.logger.level = :info | |
Rails.logger.silence(Logger::ERROR) do | |
Rails.logger.info("info message") # will _not_ be logged | |
Rails.logger.error("error mesasge") # _will_ be logged | |
end | |
Rails.logger.info("info message") # _will_ be logged |
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
const timber = require('timber') | |
const timber_transport = new timber.transports.HTTPS('your-api-key') | |
// The second argument must follow the structure defined in the Timber log event JSON schema: | |
// https://github.com/timberio/log-event-json-schema | |
log_entry = new timber.LogEntry('my log message', {context: {http: {method: 'GET', request_id: 'abcd1234'}}}) | |
// It's important that you pass the `data` object here. | |
timber_transport.write(log_entry.data); |
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
class ApplicationController < ActionController::Base | |
# Make sure this is called *after* you authenticate users | |
around_filter :set_user_context | |
private | |
def set_user_context(&block) | |
if !current_user.nil? | |
# Ensure the attributes are mapped properly here | |
user_context = Timber::Contexts::User.new(id: current_user.id, email: current_user.email, name: current_user.full_name) | |
Timber.with_context(user_context, &block) |
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
$.ajax({ | |
url: 'https://api.wit.ai/message', | |
data: { | |
'q': 'I need 4 tickets', | |
'access_token' : 'MY_WIT_TOKEN' | |
}, | |
dataType: 'jsonp', | |
method: 'GET', | |
success: function(response) { | |
console.log("success!", response); |
NewerOlder