- Running on Flink v1.13.2
- as a AWS Kinesis Data Analytics application
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
name: 🤖 CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint: | |
name: 🏖️ Lint |
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 { makeExecutableSchema } = require('@graphql-tools/schema') | |
const { stitchSchemas } = require('@graphql-tools/stitch') | |
const { RenameObjectFields, FilterRootFields, PruneSchema, wrapSchema } = require('@graphql-tools/wrap') | |
const { printSchema, parse, execute, print } = require('graphql') | |
/// SERVICE 1 | |
const source = /* GraphQL */ ` | |
type Query { | |
foo(key: String!): Foo |
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 { makeExecutableSchema } = require('@graphql-tools/schema') | |
const { stitchSchemas } = require('@graphql-tools/stitch') | |
const { execute, parse, printSchema, print, buildSchema } = require('graphql') | |
const aSchema = buildSchema(/* GraphQL */ ` | |
type Thing { | |
id: ID! | |
foo: String | |
} | |
type Query { |
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 { visit, visitWithTypeInfo, TypeInfo, Kind } = require('graphql') | |
const { MapperKind, mapSchema, visitData } = require('@graphql-tools/utils') | |
const { GraphQLObjectType, GraphQLID } = require('graphql') | |
class Transform { | |
constructor(groupTypes, typeIdFields) { | |
this.groupTypes = groupTypes | |
this.typeIdFields = typeIdFields | |
} |
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 { parse } from 'parse5' | |
import { adapter } from 'parse5-htmlparser2-tree-adapter' | |
import xpath from 'xpath' | |
const html = '...' | |
const selector = '...' | |
const doc = parse(html, { treeAdapter: adapter }) | |
const htmlEl = doc.childNodes.find(c => c.name === 'html') |
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 zlib | |
from datetime import datetime | |
import dpkt | |
def get_tcpip_frame(buf): | |
# standard pcap uses ethernet root layer | |
eth = dpkt.ethernet.Ethernet(buf) | |
if isinstance(eth.data, dpkt.ip6.IP6): | |
# print('Unexpected: IPv6 protocol') |
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 dlt | |
from pyspark.sql.functions import from_json, col, expr, transform_values, transform, coalesce | |
from pyspark.sql.types import * | |
nf_cdc_schema = StructType([ | |
StructField('eventName', StringType()), | |
StructField('dynamodb', StructType([ | |
StructField('ApproximateCreationDateTime', LongType()), | |
StructField('NewImage', StructType([ | |
StructField('service', StructType([ |
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
version: '3.8' | |
services: | |
api: | |
build: | |
# ...snip... | |
awscollector: | |
image: public.ecr.aws/aws-observability/aws-otel-collector | |
ports: | |
- '4317:4317' |
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 opentelemetry = require('@opentelemetry/sdk-node') | |
// const { getNodeAutoInstrumentations } = require('@opentelemetry/auto-instrumentations-node') | |
const { DnsInstrumentation } = require('@opentelemetry/instrumentation-dns') | |
const { AwsLambdaInstrumentation } = require('@opentelemetry/instrumentation-aws-lambda') | |
const { AWSXRayIdGenerator } = require('@opentelemetry/id-generator-aws-xray') | |
const { AWSXRayPropagator } = require('@opentelemetry/propagator-aws-xray') | |
// const { OTLPTraceExporter } = require('@opentelemetry/exporter-trace-otlp-http') | |
const { OTLPTraceExporter } = require('@opentelemetry/exporter-otlp-proto') | |
const CONSOLE_DEBUG = false |