Skip to content

Commit 40419c5

Browse files
[chore]unexport struct
1 parent 2ec3148 commit 40419c5

File tree

3 files changed

+38
-11
lines changed

3 files changed

+38
-11
lines changed

.chloggen/unexport_struct.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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: breaking
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: Unexport InfoEntry and InfoContent
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: [39830]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: [api]

receiver/splunkenterprisereceiver/scraper.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (s *splunkScraper) scrape(ctx context.Context) (pmetric.Metrics, error) {
119119
info = s.scrapeInfo(ctx, now, errChan)
120120
} else {
121121
info = make(infoDict)
122-
nullInfo := Info{Host: "", Entries: make([]InfoEntry, 1)}
122+
nullInfo := Info{Host: "", Entries: make([]infoEntry, 1)}
123123
info[typeCm] = nullInfo
124124
info[typeSh] = nullInfo
125125
info[typeIdx] = nullInfo
@@ -1791,7 +1791,7 @@ func (s *splunkScraper) scrapeHealth(_ context.Context, now pcommon.Timestamp, i
17911791
}
17921792
}
17931793

1794-
func (s *splunkScraper) traverseHealthDetailFeatures(details healthDetails, now pcommon.Timestamp, i InfoContent) {
1794+
func (s *splunkScraper) traverseHealthDetailFeatures(details healthDetails, now pcommon.Timestamp, i infoContent) {
17951795
if details.Features == nil {
17961796
return
17971797
}
@@ -1813,7 +1813,7 @@ func (s *splunkScraper) scrapeInfo(_ context.Context, _ pcommon.Timestamp, errs
18131813
// there could be an endpoint configured for each type (never more than 3)
18141814

18151815
info := make(infoDict)
1816-
nullInfo := Info{Host: "", Entries: make([]InfoEntry, 1)}
1816+
nullInfo := Info{Host: "", Entries: make([]infoEntry, 1)}
18171817
info[typeCm] = nullInfo
18181818
info[typeSh] = nullInfo
18191819
info[typeIdx] = nullInfo
@@ -1980,25 +1980,25 @@ func (s *splunkScraper) scrapeSearch(_ context.Context, now pcommon.Timestamp, i
19801980
}
19811981
}
19821982

1983-
func (s *splunkScraper) recordSplunkSearchInitiationDataPoint(now pcommon.Timestamp, value int64, i InfoContent) {
1983+
func (s *splunkScraper) recordSplunkSearchInitiationDataPoint(now pcommon.Timestamp, value int64, i infoContent) {
19841984
if s.conf.Metrics.SplunkSearchInitiation.Enabled {
19851985
s.mb.RecordSplunkSearchInitiationDataPoint(now, value, i.Build, i.Version)
19861986
}
19871987
}
19881988

1989-
func (s *splunkScraper) recordSplunkSearchStatusDataPoint(now pcommon.Timestamp, value int64, state string, i InfoContent) {
1989+
func (s *splunkScraper) recordSplunkSearchStatusDataPoint(now pcommon.Timestamp, value int64, state string, i infoContent) {
19901990
if s.conf.Metrics.SplunkSearchStatus.Enabled {
19911991
s.mb.RecordSplunkSearchStatusDataPoint(now, value, state, i.Build, i.Version)
19921992
}
19931993
}
19941994

1995-
func (s *splunkScraper) recordSplunkSearchDurationDataPoint(now pcommon.Timestamp, value float64, i InfoContent) {
1995+
func (s *splunkScraper) recordSplunkSearchDurationDataPoint(now pcommon.Timestamp, value float64, i infoContent) {
19961996
if s.conf.Metrics.SplunkSearchDuration.Enabled {
19971997
s.mb.RecordSplunkSearchDurationDataPoint(now, value, i.Build, i.Version)
19981998
}
19991999
}
20002000

2001-
func (s *splunkScraper) recordSplunkSearchSuccessDataPoint(now pcommon.Timestamp, value int64, i InfoContent) {
2001+
func (s *splunkScraper) recordSplunkSearchSuccessDataPoint(now pcommon.Timestamp, value int64, i infoContent) {
20022002
if s.conf.Metrics.SplunkSearchInitiation.Enabled {
20032003
s.mb.RecordSplunkSearchSuccessDataPoint(now, value, i.Build, i.Version)
20042004
}

receiver/splunkenterprisereceiver/search_result.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,14 @@ type healthDetails struct {
196196
// '/services/server/info'
197197
type Info struct {
198198
Host string `json:"origin"`
199-
Entries []InfoEntry `json:"entry"`
199+
Entries []infoEntry `json:"entry"`
200200
}
201201

202-
type InfoEntry struct {
203-
Content InfoContent `json:"content"`
202+
type infoEntry struct {
203+
Content infoContent `json:"content"`
204204
}
205205

206-
type InfoContent struct {
206+
type infoContent struct {
207207
Build string `json:"build"`
208208
Version string `json:"version"`
209209
}

0 commit comments

Comments
 (0)