rate calculator: https://glitch.com/edit/#!/handsomely-garden
filter-er: https://glitch.com/edit/#!/cosmic-plow?path=src/components/live-search.js:20:72
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, |
class WhitelistInsight | |
def initialize | |
@host = `hostname`.chomp | |
epoch = Time.now.to_i | |
@timestamp = epoch - epoch%60 | |
@events = [] | |
end | |
def report_whitelist(rule) |