Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge dev into main #15

Merged
merged 101 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
f21584a
Setup local dev env with dynamic module
TheTeaCat Jul 4, 2023
603c3c8
Doc local dev setup & compilation + configuration steps
TheTeaCat Jul 4, 2023
bcbd20d
Merge pull request #1 from FireTail-io/local-dev
TheTeaCat Jul 4, 2023
82c117f
Add .clang-format
TheTeaCat Jul 4, 2023
04ed442
Add .pre-commit-config.yaml
TheTeaCat Jul 4, 2023
7bad906
Initial clang-format
TheTeaCat Jul 4, 2023
73033f8
Merge branch 'dev' into clang-format
TheTeaCat Jul 4, 2023
150ac0a
Doc formatter
TheTeaCat Jul 4, 2023
9718af4
Add clang-format style check CI action
TheTeaCat Jul 4, 2023
bf8a84d
Use clang-format 16
TheTeaCat Jul 4, 2023
b51c5dc
Remove DecimalMinDigits
TheTeaCat Jul 4, 2023
bd25c53
Remove BinaryMinDigits
TheTeaCat Jul 4, 2023
b154df4
Remove HexMinDigits
TheTeaCat Jul 4, 2023
d5c1d9b
Merge pull request #2 from FireTail-io/clang-format
TheTeaCat Jul 4, 2023
e176209
Doc local deps setup
TheTeaCat Jul 5, 2023
023d64a
Add .gitignore
TheTeaCat Jul 5, 2023
2b0121d
Reorder & doc existing POC
TheTeaCat Jul 6, 2023
1579456
Just update content-length in header filter for now
TheTeaCat Jul 6, 2023
8575612
Update body filter to traverse chain to find its end & append message…
TheTeaCat Jul 6, 2023
72dad32
Nicer index.html for dev
TheTeaCat Jul 6, 2023
89039b2
Always include nginx headers first and disable SortIncludes
TheTeaCat Jul 6, 2023
4b0db37
Use dev nginx in dev image
TheTeaCat Jul 6, 2023
43cac3a
tweak custom index
TheTeaCat Jul 6, 2023
f4221e9
Log cumulative size of all buffers in the chain
TheTeaCat Jul 6, 2023
787efc4
Move the ngx_firetail_module out into a .h file
TheTeaCat Jul 6, 2023
176f248
Implement collecting up the complete request and response bodies
TheTeaCat Jul 6, 2023
a87aa34
Tweak logs
TheTeaCat Jul 6, 2023
c640e82
Add /health and /health-proxy to dev nginx.conf
TheTeaCat Jul 6, 2023
31b667e
Namespace overhaul
TheTeaCat Jul 7, 2023
9a680e7
missing k prefixes
TheTeaCat Jul 7, 2023
4bcc563
Logging request & response headers
TheTeaCat Jul 7, 2023
6479abc
Tidy header loops
TheTeaCat Jul 10, 2023
70191c5
Put headers into ctx
TheTeaCat Jul 10, 2023
5e060fb
Remove unecessary loops
TheTeaCat Jul 10, 2023
4b64e47
Move logging
TheTeaCat Jul 10, 2023
604f45d
JSON request body WIP
TheTeaCat Jul 10, 2023
0b4d205
Restructure
TheTeaCat Jul 10, 2023
ca4d01c
Tidy
TheTeaCat Jul 10, 2023
26b9b3a
Refactor for(;;)s
TheTeaCat Jul 10, 2023
c4352ec
Setup initial POST to /logs/bulk
TheTeaCat Jul 10, 2023
d1c4ea4
Merge pull request #3 from FireTail-io/doc-local-deps
rileyfiretail Jul 10, 2023
945530c
Add various TODOs
TheTeaCat Jul 13, 2023
69a909b
Add resource to request log
TheTeaCat Jul 13, 2023
32e9a6d
Add http:// prefix and TODO
TheTeaCat Jul 13, 2023
3a76b28
Add noop func for libcurl write callback
TheTeaCat Jul 14, 2023
9f5ec30
Initial firetail_api_token directive implementation
TheTeaCat Jul 14, 2023
fac2604
Setup POST to Firetail
TheTeaCat Jul 14, 2023
588d09e
Doc API token directive
TheTeaCat Jul 14, 2023
283651d
Update configuration doc
TheTeaCat Jul 14, 2023
c32cbd2
Fix missing null terminator on uri
TheTeaCat Jul 14, 2023
ed1c75c
Add more locations to dev nginx conf
TheTeaCat Jul 14, 2023
e542149
emoji breaks things
TheTeaCat Jul 14, 2023
2cce241
Add comments to nginx.conf
TheTeaCat Jul 14, 2023
b932348
Merge pull request #4 from FireTail-io/log-request-response
rileyfiretail Jul 14, 2023
85b318c
Merge pull request #5 from FireTail-io/post-log-to-firetail
rileyfiretail Jul 14, 2023
0904626
use multicurl for async requests
muhammadn Aug 10, 2023
5152a28
fix lint
muhammadn Aug 10, 2023
52a86d6
attempt to do async with response
muhammadn Aug 13, 2023
1ae1e3f
enhancements to multicurl
muhammadn Aug 13, 2023
40e4c99
cleanups
muhammadn Aug 13, 2023
bdcf4e2
run clang-format
muhammadn Aug 14, 2023
e2bdcd9
fix by adding line termination "\0" to prevent memory corruption bug
muhammadn Aug 20, 2023
327b4f5
fix lint errors
muhammadn Aug 20, 2023
653c7bf
Merge pull request #9 from FireTail-io/feat/convert-curl-to-multicurl
TheTeaCat Aug 21, 2023
1aa0439
remove callback and remove loop to ensure async
muhammadn Aug 24, 2023
94cd835
remove unnecessary code
muhammadn Aug 24, 2023
419a675
fix lint issues
muhammadn Aug 24, 2023
92f14b1
add missing cleanup code for curl
muhammadn Aug 24, 2023
d3d25cf
linting (again!)
muhammadn Aug 24, 2023
811b904
Merge pull request #10 from FireTail-io/feat/convert-curl-to-multicurl
TheTeaCat Sep 13, 2023
099414d
Move nginx module src into nginx_module subdir
TheTeaCat Aug 9, 2023
652f049
Add validator stubs to validator new subdir in src
TheTeaCat Aug 9, 2023
f431212
Create go mod
TheTeaCat Aug 9, 2023
12d273e
Update dir for clang check on C formatting in CI
TheTeaCat Aug 9, 2023
ee268a0
Update docs for adding module
TheTeaCat Aug 9, 2023
ea3a503
Add todo docs for Go module
TheTeaCat Aug 9, 2023
8e4be9b
Add go module build steps to dockerfile
TheTeaCat Aug 9, 2023
d62d783
Add firetail lib to go module deps
TheTeaCat Aug 10, 2023
8836b98
Implement method for initialising instance of Firetail middleware
TheTeaCat Aug 10, 2023
3acb41f
Create appspec for dev nginx
TheTeaCat Aug 10, 2023
8996421
Add logs around call to ResponseBodyValidator
TheTeaCat Aug 10, 2023
0c9c07e
Remove go version -m
TheTeaCat Aug 10, 2023
e0db590
Load the go module every call for now (POC)
TheTeaCat Aug 11, 2023
949472d
Create dev appspec
TheTeaCat Aug 21, 2023
5b8b80b
Add big bird profile endpoint
TheTeaCat Aug 21, 2023
3c41a4b
Copy appspec into dockerfile
TheTeaCat Aug 21, 2023
2f17685
Middlware doesn't need API token
TheTeaCat Aug 21, 2023
d663d2c
Implement call to go lib
TheTeaCat Aug 21, 2023
d88d1fe
Create middleware and use it in C
TheTeaCat Aug 21, 2023
416f842
Create big bird proxy
TheTeaCat Aug 23, 2023
c086e38
Fix: Load openapi spec in C only once (#11)
muhammadn Jan 31, 2024
dffb869
use the official library now
muhammadn Feb 13, 2024
e2aea43
Merge pull request #13 from FireTail-io/chore/use-official-go-lib
TheTeaCat Feb 13, 2024
7dd8992
Rewrite nginx code to use go-lib as the client (#14)
muhammadn Feb 21, 2024
0297739
flip the argument between token and response body which is incorrect
muhammadn Feb 23, 2024
f268641
remove nginx2.conf
muhammadn Feb 23, 2024
a0ad09d
more cleanups
muhammadn Mar 6, 2024
3b2e13a
fix formattingg
muhammadn Mar 7, 2024
f55530d
remove dead code
muhammadn Mar 7, 2024
b3b3875
switch firetail go-lib to use v0.2.1
muhammadn Apr 9, 2024
42ea705
Merge pull request #7 from FireTail-io/go-validation
rileyfiretail Jul 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
256 changes: 256 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
---
Language: Cpp
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: true
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
PadOperators: false
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments:
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
AttributeMacros:
- __capability
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterExternBlock: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAfterAttributes: Never
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Attach
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*\.h>'
Priority: 1
SortPriority: 0
CaseSensitive: false
- Regex: '^<.*'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 3
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '([-_](test|unittest))?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: None
IndentRequiresClause: true
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
Decimal: 0
Hex: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Never
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: NextLine
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
PPIndentWidth: -1
QualifierAlignment: Leave
RawStringFormats:
- Language: Cpp
Delimiters:
- cc
- CC
- cpp
- Cpp
- CPP
- 'c++'
- 'C++'
CanonicalDelimiter: ''
BasedOnStyle: google
- Language: TextProto
Delimiters:
- pb
- PB
- proto
- PROTO
EnclosingFunctions:
- EqualsProto
- EquivToProto
- PARSE_PARTIAL_TEXT_PROTO
- PARSE_TEST_PROTO
- PARSE_TEXT_PROTO
- ParseTextOrDie
- ParseTextProtoOrDie
- ParseTestProto
- ParsePartialTestProto
CanonicalDelimiter: pb
BasedOnStyle: google
ReferenceAlignment: Pointer
ReflowComments: true
RemoveBracesLLVM: false
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SortIncludes: Never
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeParensOptions:
AfterControlStatements: true
AfterForeachMacros: true
AfterFunctionDefinitionName: false
AfterFunctionDeclarationName: false
AfterIfMacros: true
AfterOverloadedOperator: false
AfterRequiresInClause: false
AfterRequiresInExpression: false
BeforeNonEmptyParentheses: false
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
StatementAttributeLikeMacros:
- Q_EMIT
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
...

19 changes: 19 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull Request CI

on:
- pull_request

jobs:
formatting-check:
name: Formatting Check

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@f62da5e3d3a2d88ff364771d9d938773a618ab5e
with:
check-path: 'src/nginx_module'
clang-format-version: '16'
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
nginx-*
vcpkg
.vscode
**/.DS_Store
src/validator/firetail-validator.so
src/validator/firetail-validator.h
*.swo
*.swp
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6
hooks:
- id: clang-format
Loading
Loading