Skip to content

Commit edc64d2

Browse files
Add Multiple Metrics About Search Performance to splunkenterprisereceiver (#39569)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Added a new `splunk.search.initiation`, `splunk.search.duration`, `splunk.search.status`, and `splunk.search.success` metrics. <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes #39566 <!--Describe what testing was performed and which tests were added.--> #### Testing Ran on a test stack and observed the metrics in Splunk Observability ![search_example](https://github.com/user-attachments/assets/746768a8-fcca-4a23-8d12-409bb7a72b51) <!--Describe the documentation added.--> #### Documentation The only documentation added was the generated documentation about the newly added metrics. <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Sean Marciniak <[email protected]>
1 parent d676938 commit edc64d2

File tree

10 files changed

+745
-1
lines changed

10 files changed

+745
-1
lines changed

.chloggen/changes.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: 'enhancement'
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: 'splunkenterprisereceiver'
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "Added a new `splunk.search.initiation`, `splunk.search.duration`, `splunk.search.status`, and `splunk.search.success` metrics."
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [39566]
14+
15+
# If your change doesn't affect end users or the exported elements of any package,
16+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
17+
# Optional: The change log or logs in which this entry should be included.
18+
# e.g. '[user]' or '[user, api]'
19+
# Include 'user' if the change is relevant to end users.
20+
# Include 'api' if there is a change to a library API.
21+
# Default: '[user]'
22+
change_logs: [user]

receiver/splunkenterprisereceiver/documentation.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,67 @@ Gauge tracking the ratio of completed to skipped scheduled searches
509509
| splunk.splunkd.build | The build number for this Splunk instance version | Any Str |
510510
| splunk.splunkd.version | The splunkd version number | Any Str |
511511

512+
### splunk.search.duration
513+
514+
Gauge tracking the duration in seconds of the last search probe call.
515+
516+
| Unit | Metric Type | Value Type |
517+
| ---- | ----------- | ---------- |
518+
| {status} | Gauge | Double |
519+
520+
#### Attributes
521+
522+
| Name | Description | Values |
523+
| ---- | ----------- | ------ |
524+
| splunk.splunkd.build | The build number for this Splunk instance version | Any Str |
525+
| splunk.splunkd.version | The splunkd version number | Any Str |
526+
527+
### splunk.search.initiation
528+
529+
Gauge tracking whether the last search probe successfully initiated a search.
530+
531+
| Unit | Metric Type | Value Type |
532+
| ---- | ----------- | ---------- |
533+
| {status} | Gauge | Int |
534+
535+
#### Attributes
536+
537+
| Name | Description | Values |
538+
| ---- | ----------- | ------ |
539+
| splunk.splunkd.build | The build number for this Splunk instance version | Any Str |
540+
| splunk.splunkd.version | The splunkd version number | Any Str |
541+
542+
### splunk.search.status
543+
544+
Gauge tracking the dispatch status of the last search probe.
545+
546+
| Unit | Metric Type | Value Type |
547+
| ---- | ----------- | ---------- |
548+
| {status} | Gauge | Int |
549+
550+
#### Attributes
551+
552+
| Name | Description | Values |
553+
| ---- | ----------- | ------ |
554+
| splunk.search.state | The dispatch state of the search | Any Str |
555+
| splunk.splunkd.build | The build number for this Splunk instance version | Any Str |
556+
| splunk.splunkd.version | The splunkd version number | Any Str |
557+
558+
### splunk.search.success
559+
560+
Gauge tracking whether the last search probe call was successful with the dispatch state 'DONE'.
561+
562+
| Unit | Metric Type | Value Type |
563+
| ---- | ----------- | ---------- |
564+
| {status} | Gauge | Int |
565+
566+
#### Attributes
567+
568+
| Name | Description | Values |
569+
| ---- | ----------- | ------ |
570+
| splunk.splunkd.build | The build number for this Splunk instance version | Any Str |
571+
| splunk.splunkd.version | The splunkd version number | Any Str |
572+
512573
### splunk.server.introspection.queues.current
513574

514575
Gauge tracking current length of queue. *Note:** Must be pointed at specific indexer `endpoint` and gathers metrics from only that indexer.

receiver/splunkenterprisereceiver/internal/metadata/generated_config.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/splunkenterprisereceiver/internal/metadata/generated_config_test.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)