-
Notifications
You must be signed in to change notification settings - Fork 151
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
Fix metrics sourcetype annotation #1375
base: main
Are you sure you want to change the base?
Fix metrics sourcetype annotation #1375
Conversation
examples/disable-persistence-queue-traces/rendered_manifests/configmap-agent.yaml
Outdated
Show resolved
Hide resolved
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Fixed updating metrics' sourcetype with annotations | ||
# One or more tracking issues related to the change | ||
issues: [] |
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.
issues: [] | |
issues: [1375] |
@@ -563,7 +563,7 @@ Manage Splunk OTel Collector Logging with these supported annotations. | |||
* Filter logs using pod and/or namespace annotation | |||
* If `logsCollection.containers.useSplunkIncludeAnnotation` is `false` (default: false), set `splunk.com/exclude` annotation to `true` on pod and/or namespace to exclude its logs from ingested. | |||
* If `logsCollection.containers.useSplunkIncludeAnnotation` is `true` (default: false), set `splunk.com/include` annotation to `true` on pod and/or namespace to only include its logs from ingested. All other logs will be ignored. | |||
* Use `splunk.com/sourcetype` annotation on pod to overwrite `sourcetype` field. If not set, it is dynamically generated to be `kube:container:CONTAINER_NAME`. | |||
* Use `splunk.com/sourcetype` annotation on pod to overwrite `sourcetype` field. If not set, it is dynamically generated to be `kube:container:CONTAINER_NAME` for logs and defaults to "httpevent" for metrics. |
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.
Nit: I might suggest updating this to something like this.
* Use `splunk.com/sourcetype` annotation on pod to overwrite `sourcetype` field. If not set, it is dynamically generated to be `kube:container:CONTAINER_NAME` for logs and defaults to "httpevent" for metrics. | |
* Use `splunk.com/sourcetype` annotation on pod to overwrite `sourcetype` field. | |
* For logs, if not set, it defaults to `kube:container:CONTAINER_NAME`. | |
* For metrics, if not set, it defaults to `httpevent`. |
password=setup["splunk_password"]) | ||
logger.info("Splunk received %s events in the last minute", | ||
len(events)) | ||
assert len(events) >= expected |
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.
This test is failing in CI/CD still, see what you can do about it.
- You might need to add the
splunk.com/sourcetype: "sourcetype-anno"
annotation right below here.splunk.com/metricsIndex: test_metrics
Description: Fixed updating metrics' sourcetype with annotations
Link to Splunk idea:
Testing: Added a new unit test
Documentation: Added
splunk.com/metricsSourceType
toadvanced-configuration.md