-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(new source): okta #22968
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
base: master
Are you sure you want to change the base?
feat(new source): okta #22968
Conversation
@pront anything needed on my end for this one? |
Hi @sonnens, and thank you for this PR! We want a few more docs files. You can look at other PRs for inspiration: https://github.com/vectordotdev/vector/pull/22609/files. Note that |
@pront something like this work? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 I left a couple small docs suggestions
Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>
Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>
Co-authored-by: Heston Hoffman <hestonhoffman@gmail.com>
@pront any updates? |
|
||
/// The timeout for each scrape request. | ||
#[serde(default = "default_timeout")] | ||
#[serde_as(as = "serde_with:: DurationSecondsWithFrac<f64>")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#[serde_as(as = "serde_with:: DurationSecondsWithFrac<f64>")] | |
#[serde_as(as = "serde_with::DurationSecondsWithFrac<f64>")] |
log_namespace.clone(), | ||
) | ||
.build() | ||
.unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to remove all unwrap()
usages. Instead return an error.
.build() | ||
.unwrap(); | ||
|
||
let client = HttpClient::new(tls, &proxy).expect("Building HTTP client failed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also return the error here.
async move { | ||
// We update the actual URL based on the response the API returns | ||
// so the critical section is between here & when the request finishes | ||
let mut url_lock = url_mutex.lock().await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, holding a lock across multiple async operations is discouraged. Can we use a lock guard here?
let response_result = {
let mut url_guard = url_mutex.lock().await;
let url = url_guard.to_string();
// ...
}; // <-- Lock guard drops here
Summary
Adds a new source to consume the Okta system log / audit log
Change Type
Is this a breaking change?
How did you test this PR?
Tests are included in the PR, and I've run it on our own Okta instance
Does this PR include user facing changes?
References