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

feat: payload collection instrumentation rule #1488

Merged
merged 36 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3a59fb2
feat: add payload collection rule
blumamir Sep 2, 2024
7899095
feat: reconciler for payloadcollection
blumamir Sep 2, 2024
c1d561a
feat: workload instrumentation config skelaton
blumamir Sep 2, 2024
9df17d8
feat: payload collection rules in instrumentation configs
blumamir Sep 2, 2024
6a41da4
feat: reconcile rules to ic
blumamir Sep 2, 2024
bbe8fdf
fix: merge mime types lists without duplication
blumamir Sep 2, 2024
4781000
chore: remove debug files
blumamir Sep 2, 2024
8fd258d
chore: update comment in CRD
blumamir Sep 3, 2024
091441e
chore: add RBAC permissions
blumamir Sep 3, 2024
5a7c11e
feat: reconcile instrumeented application to config
blumamir Sep 3, 2024
c2ca517
fix: add language to instrumentation libraries in rule
blumamir Sep 3, 2024
19df1e2
feat: use instrumentation libraries in rules
blumamir Sep 3, 2024
fe6a3d7
feat: add span kind to library name
blumamir Sep 3, 2024
0687c3f
use payload types attributes in ic
blumamir Sep 3, 2024
be0e2b0
test: add some unittests
blumamir Sep 3, 2024
69aa441
docs: add documentation for inst rule
blumamir Sep 4, 2024
3dc522a
chore: rename typo in file
blumamir Sep 4, 2024
97af699
chore: rename dbStatement to dbQuery
blumamir Sep 4, 2024
4e02f03
docs: add multiple rules section
blumamir Sep 4, 2024
24633bf
Merge remote-tracking branch 'upstream/main' into payload-collection-crd
blumamir Sep 4, 2024
10d74bb
chore: go mod tidy
blumamir Sep 4, 2024
ebf1f08
fix: generated files for api
blumamir Sep 4, 2024
50868cb
chore: make generic instrumentation rule instead of CRD per rule
blumamir Sep 5, 2024
18ac804
fix: compilation
blumamir Sep 5, 2024
949ecfb
Merge remote-tracking branch 'upstream/main' into payload-collection-crd
blumamir Sep 5, 2024
5e81d8e
fix: rbac for instrumentation rule
blumamir Sep 5, 2024
c59ab82
Merge remote-tracking branch 'upstream/main' into payload-collection-crd
blumamir Sep 5, 2024
aa1f9df
fix: test ignore order
blumamir Sep 5, 2024
03d7790
docs: update docs for instrumentation rule
blumamir Sep 8, 2024
d269b47
Merge remote-tracking branch 'upstream/main' into payload-collection-crd
blumamir Sep 8, 2024
441a84d
chore: move rules to seprate directory
blumamir Sep 8, 2024
2204281
Merge remote-tracking branch 'upstream/main' into payload-collection-crd
blumamir Sep 8, 2024
7d43f3d
fix(instrumentor): test
blumamir Sep 8, 2024
ee763f5
fix(instrumentor): unittests
blumamir Sep 8, 2024
7a2620c
refactor: update a temporary list and not the CR
blumamir Sep 8, 2024
b396e1b
docs: payload collection enterprise
blumamir Sep 8, 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
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,12 @@ cli-install:
.PHONY: cli-upgrade
cli-upgrade:
@echo "Installing odigos from source. version: $(ODIGOS_CLI_VERSION)"
cd ./cli ; go run -tags=embed_manifests . upgrade --version $(ODIGOS_CLI_VERSION) --yes
cd ./cli ; go run -tags=embed_manifests . upgrade --version $(ODIGOS_CLI_VERSION) --yes

.PHONY: api-all
api-all:
make -C api all

.PHONY: crd-apply
crd-apply: api-all cli-upgrade
@echo "Applying changes to CRDs in api directory"
140 changes: 139 additions & 1 deletion api/config/crd/bases/odigos.io_instrumentationconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,75 @@ spec:
required:
- libraryName
type: object
payloadCollection:
properties:
dbQuery:
description: rule for collecting db payloads for the
mentioned workload and instrumentation libraries
properties:
dropPartialPayloads:
description: |-
If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all.
This is useful if you require some decoding of the payload (like json) and having it partially is not useful.
type: boolean
maxPayloadLength:
description: |-
Maximum length of the payload to collect.
If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option
format: int64
type: integer
type: object
httpRequest:
description: |-
Collect HTTP request payload data when available.
Can be a client (outgoing) request or a server (incoming) request, depending on the instrumentation library
properties:
dropPartialPayloads:
description: |-
If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all.
This is useful if you require some decoding of the payload (like json) and having it partially is not useful.
type: boolean
maxPayloadLength:
description: |-
Maximum length of the payload to collect.
If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option
format: int64
type: integer
mimeTypes:
description: |-
Limit payload collection to specific mime types based on the content type header.
When not specified, all mime types payloads will be collected.
Empty array will make the rule ineffective.
items:
type: string
type: array
type: object
httpResponse:
description: |-
rule for collecting the response part of an http payload.
Can be a client response or a server response, depending on the instrumentation library
properties:
dropPartialPayloads:
description: |-
If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all.
This is useful if you require some decoding of the payload (like json) and having it partially is not useful.
type: boolean
maxPayloadLength:
description: |-
Maximum length of the payload to collect.
If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option
format: int64
type: integer
mimeTypes:
description: |-
Limit payload collection to specific mime types based on the content type header.
When not specified, all mime types payloads will be collected.
Empty array will make the rule ineffective.
items:
type: string
type: array
type: object
type: object
traceConfig:
properties:
enabled:
Expand Down Expand Up @@ -241,9 +310,78 @@ spec:
- unknown
- ignored
type: string
payloadCollection:
properties:
dbQuery:
description: rule for collecting db payloads for the mentioned
workload and instrumentation libraries
properties:
dropPartialPayloads:
description: |-
If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all.
This is useful if you require some decoding of the payload (like json) and having it partially is not useful.
type: boolean
maxPayloadLength:
description: |-
Maximum length of the payload to collect.
If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option
format: int64
type: integer
type: object
httpRequest:
description: |-
Collect HTTP request payload data when available.
Can be a client (outgoing) request or a server (incoming) request, depending on the instrumentation library
properties:
dropPartialPayloads:
description: |-
If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all.
This is useful if you require some decoding of the payload (like json) and having it partially is not useful.
type: boolean
maxPayloadLength:
description: |-
Maximum length of the payload to collect.
If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option
format: int64
type: integer
mimeTypes:
description: |-
Limit payload collection to specific mime types based on the content type header.
When not specified, all mime types payloads will be collected.
Empty array will make the rule ineffective.
items:
type: string
type: array
type: object
httpResponse:
description: |-
rule for collecting the response part of an http payload.
Can be a client response or a server response, depending on the instrumentation library
properties:
dropPartialPayloads:
description: |-
If the payload is larger than the MaxPayloadLength, this parameter will determine if the payload should be partially collected up to the allowed length, or not collected at all.
This is useful if you require some decoding of the payload (like json) and having it partially is not useful.
type: boolean
maxPayloadLength:
description: |-
Maximum length of the payload to collect.
If the payload is longer than this value, it will be truncated or dropped, based on the value of `dropPartialPayloads` config option
format: int64
type: integer
mimeTypes:
description: |-
Limit payload collection to specific mime types based on the content type header.
When not specified, all mime types payloads will be collected.
Empty array will make the rule ineffective.
items:
type: string
type: array
type: object
type: object
required:
- instrumentationLibraryConfigs
- language
- payloadCollection
type: object
type: array
type: object
Expand Down
Loading
Loading