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

Extract time query parameter in splunkhecreceiver #27008

Merged
merged 4 commits into from
Sep 25, 2023

Conversation

splunkericl
Copy link
Contributor

@splunkericl splunkericl commented Sep 19, 2023

Description:
This change adds a new feature in splunk hec receiver allowing users to specify time query parameter. This is to put parity between splunk hec receiver and splunk HEC raw endpoint

Note: the validation response is slightly different than what splunk returns. if invalid input is provided for time:

  • splunk returns 400 response with this error message:
{
    "text": "Error in handling indexed fields",
    "code": 15,
    "invalid-event-number": 0
}
  • however this doesn't make sense for splunk hec receiver as it is not indexing anything. Instead, splunk hec receiver will return:
{"text":"Invalid data format","code":6}

Link to tracking Issue: #27006

Testing: Update unit test to verify both paths

Documentation: N/A

@timannguyen
Copy link
Contributor

LGTM

update changelog type from "api" to "user"

Co-authored-by: Antoine Toulme <antoine@toulme.name>
@splunkericl
Copy link
Contributor Author

@atoulme can we merge this change in?

@atoulme
Copy link
Contributor

atoulme commented Sep 22, 2023

I'm just an approver, I can't merge anything. A maintainer will be in touch.

@atoulme atoulme added the ready to merge Code review completed; ready to merge by maintainers label Sep 22, 2023
@codeboten codeboten merged commit 7db0833 into open-telemetry:main Sep 25, 2023
@github-actions github-actions bot added this to the next release milestone Sep 25, 2023
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
This change adds a new feature in splunk hec receiver allowing users to
specify time query parameter. This is to put parity between splunk hec
receiver and splunk HEC raw endpoint

Note: the validation response is slightly different than what splunk
returns. if invalid input is provided for time:
- splunk returns 400 response with this error message:
```
{
    "text": "Error in handling indexed fields",
    "code": 15,
    "invalid-event-number": 0
}
```
- however this doesn't make sense for splunk hec receiver as it is not
indexing anything. Instead, splunk hec receiver will return:
```
{"text":"Invalid data format","code":6}
```

Fixes open-telemetry#27006

---------

Co-authored-by: Antoine Toulme <antoine@toulme.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers receiver/splunkhec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants