Skip to content

feat: Make ApiKeyFactory return Option<String> #25

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

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

Conversation

lym953
Copy link
Contributor

@lym953 lym953 commented Jul 7, 2025

What does this PR do?

  1. Right now ApiKeyFactory returns String. This PR makes it return Option<String>.
  2. In Flusher, if API key resolution fails, then make flush_metrics() a no-op by returning early.

Motivation

API key resolution can fail. In this case, we should allow the resolver function to return None.

Additional Notes

Describe how to test/QA your changes

Used and tested in bottlecap: DataDog/datadog-lambda-extension#732

@lym953 lym953 marked this pull request as ready for review July 7, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants