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

Time should be included in query parameter #27006

Closed
splunkericl opened this issue Sep 19, 2023 · 2 comments
Closed

Time should be included in query parameter #27006

splunkericl opened this issue Sep 19, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request receiver/splunkhec

Comments

@splunkericl
Copy link
Contributor

Component(s)

receiver/splunkhec

Is your feature request related to a problem? Please describe.

Current Splunk HEC raw endpoint allows time query parameter. However, splunk hec receiver doesn't expose this query parameter.

To maintain parity between two endpoints, time parameter should be accepted and passed into the event timestamp.

Describe the solution you'd like

Extracts time in query parameter in the method splunkHecRawToLogData

Describe alternatives you've considered

No response

Additional context

No response

@splunkericl splunkericl added enhancement New feature or request needs triage New item requiring triage labels Sep 19, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@splunkericl
Copy link
Contributor Author

@atoulme can you take a look at this issue and the PR and see if it makes sense?

@atoulme atoulme removed the needs triage New item requiring triage label Sep 20, 2023
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue 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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request receiver/splunkhec
Projects
None yet
Development

No branches or pull requests

2 participants