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(config): update vector config #6365

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

maverox
Copy link

@maverox maverox commented Oct 18, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Fixes #6364

Description

  • adding a transform for sdk logs that fetches a value from an enrichment table sdk_map populated by file sdk_map.csv and updates the fields using this value.
  • adding some fields to ignore/except in opensearch logs sink
    Important Notes
    Please ensure that the sdk_map.csv file is properly formatted and accessible at the specified path. The name of the file should also match the name of the table in config i.e sdk_map.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

  • Ensuring correctness of logs and reduce log size by storing only relevant fields.

How did you test it?

Running it locally to check logs added in console (sdk) logs & opensearch

sdk_logs

I created a dummy_transform event that inserted a publishable_key in merchant_id field and passed it to the actual
transform function and then captured the output on a
console sink

  • test-code
Screenshot 2024-10-23 at 10 26 22 PM
  • sdk_map.csv (with dummy value 19999)
Screenshot 2024-10-23 at 10 27 26 PM
  • console output
Screenshot 2024-10-23 at 10 25 40 PM

opensearch logs

for this simply created a payment and compared the logs from kafka topics and opensearch entries

kafka ui
Screenshot 2024-10-23 at 10 44 45 PM

opensearch dashboard (no last_synced entry found)
Screenshot 2024-10-23 at 10 45 43 PM

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

- change the merchant_id value that contains publishable_key to actual
merchant_id value
- an sdk_map.csv is used to keep map of publishable_key -> merchant_id
@maverox maverox self-assigned this Oct 18, 2024
@maverox maverox requested a review from a team as a code owner October 18, 2024 10:13
Copy link

Review changes with SemanticDiff.

@maverox maverox added M-configuration-changes Metadata: This PR involves configuration changes C-feature Category: Feature request or enhancement labels Oct 18, 2024
@maverox maverox changed the title Feat(config): Update Vector Config feat(config): Update Vector Config Oct 18, 2024
@tsdk02 tsdk02 requested a review from lsampras October 22, 2024 08:33
@maverox maverox changed the title feat(config): Update Vector Config feat(config): update Vector Config Oct 23, 2024
@maverox maverox changed the title feat(config): update Vector Config feat(config): update ector config Oct 23, 2024
@maverox maverox changed the title feat(config): update ector config feat(config): update vector config Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: Feature request or enhancement M-configuration-changes Metadata: This PR involves configuration changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(config): update vector config
2 participants