Skip to content

Commit

Permalink
feat(config): update vector config (#6365)
Browse files Browse the repository at this point in the history
  • Loading branch information
maverox authored Nov 5, 2024
1 parent e54d585 commit 2919db8
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion config/vector.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
acknowledgements:
enabled: true
enrichment_tables:
sdk_map:
type: file
file:
path: /etc/vector/config/sdk_map.csv
encoding:
type: csv
schema:
publishable_key: string
merchant_id: string


api:
enabled: true
Expand Down Expand Up @@ -87,6 +98,21 @@ transforms:
key_field: "{{ .payment_id }}{{ .merchant_id }}"
threshold: 1000
window_secs: 60

amend_sdk_logs:
type: remap
inputs:
- sdk_transformed
source: |
.before_transform = now()
merchant_id = .merchant_id
row = get_enrichment_table_record!("sdk_map", { "publishable_key" : merchant_id }, case_sensitive: true)
.merchant_id = row.merchant_id
.after_transform = now()

sinks:
opensearch_events_1:
Expand All @@ -110,6 +136,9 @@ sinks:
- offset
- partition
- topic
- clickhouse_database
- last_synced
- sign_flag
bulk:
index: "vector-{{ .topic }}"

Expand All @@ -134,6 +163,9 @@ sinks:
- offset
- partition
- topic
- clickhouse_database
- last_synced
- sign_flag
bulk:
# Add a date suffixed index for better grouping
index: "vector-{{ .topic }}-%Y-%m-%d"
Expand Down Expand Up @@ -224,7 +256,7 @@ sinks:
- "path"
- "source_type"
inputs:
- "sdk_transformed"
- "amend_sdk_logs"
bootstrap_servers: kafka0:29092
topic: hyper-sdk-logs
key_field: ".merchant_id"

0 comments on commit 2919db8

Please sign in to comment.