Skip to content

Instantly share code, notes, and snippets.

import logging
from opentelemetry import trace
from opentelemetry._logs import set_logger_provider
from opentelemetry.exporter.otlp.proto.grpc._log_exporter import (
OTLPLogExporter,
)
from opentelemetry.sdk._logs import LoggerProvider, LoggingHandler
from opentelemetry.sdk._logs.export import BatchLogRecordProcessor
from opentelemetry.sdk.resources import Resource
import json
# Copyright Istio Authors
#
# Licensed 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,
@serverless-mom
serverless-mom / response-drills.md
Created September 24, 2017 19:40
Thinkful response object drills
@serverless-mom
serverless-mom / OkaySecurity.md
Last active November 29, 2016 02:07
10 minutes to upgrade *anyone's* security

Upgrade your security in 10 minutes

Where do we start?

Normally, when we talk about security, we have to start with a discussion of a 'threat model'

'Threat Model'?

A threat model helps us decide which security measures to use, taking into account:

@serverless-mom
serverless-mom / WhiteListInsights.rb
Last active August 29, 2015 14:05
Demo Insights Ruby Class
class WhitelistInsight
def initialize
@host = `hostname`.chomp
epoch = Time.now.to_i
@timestamp = epoch - epoch%60
@events = []
end
def report_whitelist(rule)