Skip to content

Enhancement: Add path to Splunk errors #39026

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

Merged

Conversation

MovieStoreGuy
Copy link
Contributor

Description

To help clarify what endpoint is being used within the collector once errors are being reported, this makes it apparent to all which is the impacted endpoint.

Link to tracking issue

Tracked externally

Testing

Updated existing tests.

Documentation

No user facing changes made, no additional documentation required.

@MovieStoreGuy MovieStoreGuy requested review from dmitryax and a team as code owners March 28, 2025 00:52
@MovieStoreGuy MovieStoreGuy marked this pull request as draft March 28, 2025 03:17
@github-actions github-actions bot requested a review from crobert-1 March 28, 2025 03:52
@MovieStoreGuy MovieStoreGuy marked this pull request as ready for review March 28, 2025 03:56
} else {
err = multierr.Append(err, err2)
}
err = consumererror.NewPermanent(err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also think this change deserves its own PR, given that this code is shared with the splunkhec exporter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to keep the change in so that on permanent errors it is also returned.

I also have some concerns around returning the dumped HTTP response.

@atoulme
Copy link
Contributor

atoulme commented Mar 28, 2025

I think this change is worth an enhancement changelog. I would caution keeping it just on the addition of the url to the error, and make other improvements separately.

@atoulme atoulme marked this pull request as draft March 28, 2025 23:35
@MovieStoreGuy MovieStoreGuy force-pushed the msg/chore-include-endpoint-in-error branch from f4f3680 to 6dca0a2 Compare March 30, 2025 23:54
@MovieStoreGuy MovieStoreGuy marked this pull request as ready for review March 31, 2025 00:19
@MovieStoreGuy MovieStoreGuy changed the title [chore]: Add URL to Splunk errors Enhancement: Add URL to Splunk errors Mar 31, 2025
@MovieStoreGuy MovieStoreGuy force-pushed the msg/chore-include-endpoint-in-error branch 2 times, most recently from 887ed33 to f34a22f Compare March 31, 2025 03:04
@@ -1316,7 +1317,12 @@ func TestErrorReceived(t *testing.T) {
case <-time.After(5 * time.Second):
t.Fatal("Should have received request")
}
assert.EqualError(t, err, "HTTP 500 \"Internal Server Error\"")
errMsg := fmt.Sprintf("HTTP %q %d %q",
cfg.ClientConfig.Endpoint,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Splunk HEC endpoint can contain auth parameters.

@MovieStoreGuy MovieStoreGuy force-pushed the msg/chore-include-endpoint-in-error branch from ddb7187 to 34f695f Compare April 2, 2025 02:18
Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MovieStoreGuy MovieStoreGuy changed the title Enhancement: Add URL to Splunk errors Enhancement: Add path to Splunk errors Apr 2, 2025
@atoulme atoulme merged commit 6880efe into open-telemetry:main Apr 4, 2025
171 of 172 checks passed
@github-actions github-actions bot added this to the next release milestone Apr 4, 2025
dmathieu pushed a commit to dmathieu/opentelemetry-collector-contrib that referenced this pull request Apr 8, 2025
#### Description

To help clarify what endpoint is being used within the collector once
errors are being reported, this makes it apparent to all which is the
impacted endpoint.

#### Link to tracking issue
Tracked externally

#### Testing

Updated existing tests.

#### Documentation

No user facing changes made, no additional documentation required.
LucianoGiannotti pushed a commit to LucianoGiannotti/opentelemetry-collector-contrib that referenced this pull request Apr 9, 2025
#### Description

To help clarify what endpoint is being used within the collector once
errors are being reported, this makes it apparent to all which is the
impacted endpoint.

#### Link to tracking issue
Tracked externally

#### Testing

Updated existing tests.

#### Documentation

No user facing changes made, no additional documentation required.
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
#### Description

To help clarify what endpoint is being used within the collector once
errors are being reported, this makes it apparent to all which is the
impacted endpoint.

#### Link to tracking issue
Tracked externally

#### Testing

Updated existing tests.

#### Documentation

No user facing changes made, no additional documentation required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants