This repository has been archived by the owner on Oct 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 183
Use static 404 for unsupported signalfx-forwarder paths #1731
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmfitzpatrick
requested review from
asuresh4,
jchengsfx,
jrcamp,
keitwb and
mstumpfx
as code owners
April 21, 2021 21:16
rmfitzpatrick
commented
Apr 21, 2021
rmfitzpatrick
force-pushed
the
404_forwarder_endpoint
branch
from
April 22, 2021 13:22
ee56683
to
6bfde65
Compare
keitwb
reviewed
Apr 22, 2021
pkg/monitors/forwarder/forwarder.go
Outdated
_, _ = w.Write([]byte(errMsg + "\n")) | ||
errMsg := "Datapoint or span request received on invalid path" | ||
logger.ThrottledError(fmt.Sprintf("%s: %s", errMsg, r.URL.Path)) | ||
errMsg = fmt.Sprintf("%s. You should send to the same path that you would on the Smart Gateway.\n", errMsg) |
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.
Actually this is an obsolete message since we don't really use Gateway anymore. This ideally would just be a list of the supported paths for maximum clarity.
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.
Updated w/ supported paths.
rmfitzpatrick
force-pushed
the
404_forwarder_endpoint
branch
from
April 22, 2021 15:44
6bfde65
to
b0ac5e4
Compare
keitwb
approved these changes
Apr 22, 2021
rmfitzpatrick
pushed a commit
that referenced
this pull request
Apr 23, 2021
Deprecation Notice: * SA deprecation notice for April 15 GA (#1720) * Pull deprecation notice to integrations repo (#1721) Changes: * prometheus-exporter monitor: Don't set timestamp (#1703) * Update ingest-protocols lib (#1704) * sfxcollectd: Fix single item handling with #flatten (#1705) * Allow non defined in collectd/jenkins metrics (#1706) * writer: Sanitize token in HTTP error logs (#1710) * excludeJobMetrics parameter available on collectd-jenkins v2.4.0 (#1712) + Update scripts, docs, and CI for main (#1724) * Add an option to control remote config watch (#1730) * Security updates for third-party dependencies Breaking Changes: * Use static 404 for unsupported signalfx-forwarder paths instead of 200 (#1731)
Merged
rmfitzpatrick
pushed a commit
that referenced
this pull request
Apr 23, 2021
Deprecation Notice: * SA deprecation notice for April 15 GA (#1720) * Pull deprecation notice to integrations repo (#1721) Changes: * prometheus-exporter monitor: Don't set timestamp (#1703) * Update ingest-protocols lib (#1704) * sfxcollectd: Fix single item handling with #flatten (#1705) * Allow non defined in collectd/jenkins metrics (#1706) * writer: Sanitize token in HTTP error logs (#1710) * excludeJobMetrics parameter available on collectd-jenkins v2.4.0 (#1712) * Update scripts, docs, and CI for main (#1724) * Add an option to control remote config watch (#1730) * Security updates for third-party dependencies Breaking Changes: * Use static 404 for unsupported signalfx-forwarder paths instead of 200 (#1731)
rmfitzpatrick
added a commit
that referenced
this pull request
Apr 23, 2021
Deprecation Notice: * SA deprecation notice for April 15 GA (#1720) * Pull deprecation notice to integrations repo (#1721) Changes: * prometheus-exporter monitor: Don't set timestamp (#1703) * Update ingest-protocols lib (#1704) * sfxcollectd: Fix single item handling with #flatten (#1705) * Allow non defined in collectd/jenkins metrics (#1706) * writer: Sanitize token in HTTP error logs (#1710) * excludeJobMetrics parameter available on collectd-jenkins v2.4.0 (#1712) * Update scripts, docs, and CI for main (#1724) * Add an option to control remote config watch (#1730) * Security updates for third-party dependencies Breaking Changes: * Use static 404 for unsupported signalfx-forwarder paths instead of 200 (#1731)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of returning 200 with dynamic message echoing potentially undesired/unsanitized content, the signalfx-forwarder monitor should return generic 404.