Skip to content
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

Spelling receiver a* #37606

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .chloggen/fix-attribute-typo-on-activedirectorydsreceiver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
change_type: breaking

component: activedirectorydsreceiver

note: Fixed typo in the attribute `distingushed_names`, renaming it to `distinguished_names`.

issues: [37606]

subtext:

change_logs: [user]
8 changes: 4 additions & 4 deletions internal/aws/xray/tracesegment.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,22 @@ type Segment struct {
// Validate checks whether the segment is valid or not
func (s *Segment) Validate() error {
if s.Name == nil {
return errors.New(`segment "name" can not be nil`)
return errors.New(`segment "name" cannot be nil`)
}

if s.ID == nil {
return errors.New(`segment "id" can not be nil`)
return errors.New(`segment "id" cannot be nil`)
}

if s.StartTime == nil {
return errors.New(`segment "start_time" can not be nil`)
return errors.New(`segment "start_time" cannot be nil`)
}

// it's ok for embedded subsegments to not have trace_id
// but the root segment and independent subsegments must all
// have trace_id.
if s.TraceID == nil {
return errors.New(`segment "trace_id" can not be nil`)
return errors.New(`segment "trace_id" cannot be nil`)
}

return nil
Expand Down
10 changes: 5 additions & 5 deletions internal/aws/xray/tracesegment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ func TestTraceBodyUnMarshalling(t *testing.T) {

for _, tc := range tests {
content, err := os.ReadFile(tc.samplePath)
assert.NoErrorf(t, err, "[%s] can not read raw segment", tc.testCase)
assert.NoErrorf(t, err, "[%s] cannot read raw segment", tc.testCase)

assert.NotEmptyf(t, content, "[%s] content length is 0", tc.testCase)

Expand All @@ -647,22 +647,22 @@ func TestValidate(t *testing.T) {
{
testCase: "missing segment name",
input: &Segment{},
expectedErrorStr: `segment "name" can not be nil`,
expectedErrorStr: `segment "name" cannot be nil`,
},
{
testCase: "missing segment id",
input: &Segment{
Name: String("a name"),
},
expectedErrorStr: `segment "id" can not be nil`,
expectedErrorStr: `segment "id" cannot be nil`,
},
{
testCase: "missing segment start_time",
input: &Segment{
Name: String("a name"),
ID: String("an ID"),
},
expectedErrorStr: `segment "start_time" can not be nil`,
expectedErrorStr: `segment "start_time" cannot be nil`,
},
{
testCase: "missing segment trace_id",
Expand All @@ -671,7 +671,7 @@ func TestValidate(t *testing.T) {
ID: String("an ID"),
StartTime: aws.Float64(10),
},
expectedErrorStr: `segment "trace_id" can not be nil`,
expectedErrorStr: `segment "trace_id" cannot be nil`,
},
{
testCase: "happy case",
Expand Down
12 changes: 6 additions & 6 deletions receiver/activedirectorydsreceiver/counters.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const (
dsNotifyQueueSize = "DS Notify Queue Size"
dsSecurityDescriptorPropagationsEvents = "DS Security Descriptor Propagations Events"
dsSearchSubOperations = "DS Search sub-operations/sec"
dsSecurityDescripterSubOperations = "DS Security Descriptor sub-operations/sec"
dsSecurityDescriptorSubOperations = "DS Security Descriptor sub-operations/sec"
dsThreadsInUse = "DS Threads in Use"
ldapClientSessions = "LDAP Client Sessions"
ldapBindTime = "LDAP Bind Time"
Expand Down Expand Up @@ -81,7 +81,7 @@ func (w *watchers) Close() error {
return err
}

func getWatchers(wc watcherCreater) (*watchers, error) {
func getWatchers(wc watcherCreator) (*watchers, error) {
var err error

w := &watchers{
Expand Down Expand Up @@ -192,7 +192,7 @@ func getWatchers(wc watcherCreater) (*watchers, error) {
return nil, err
}

if w.counterNameToWatcher[dsSecurityDescripterSubOperations], err = wc.Create(dsSecurityDescripterSubOperations); err != nil {
if w.counterNameToWatcher[dsSecurityDescriptorSubOperations], err = wc.Create(dsSecurityDescriptorSubOperations); err != nil {
return nil, err
}

Expand All @@ -219,7 +219,7 @@ func getWatchers(wc watcherCreater) (*watchers, error) {
return w, nil
}

type watcherCreater interface {
type watcherCreator interface {
Create(counterName string) (winperfcounters.PerfCounterWatcher, error)
}

Expand All @@ -228,8 +228,8 @@ const (
object = "DirectoryServices"
)

type defaultWatcherCreater struct{}
type defaultWatcherCreator struct{}

func (defaultWatcherCreater) Create(counterName string) (winperfcounters.PerfCounterWatcher, error) {
func (defaultWatcherCreator) Create(counterName string) (winperfcounters.PerfCounterWatcher, error) {
return winperfcounters.NewWatcher(object, instanceName, counterName)
}
6 changes: 3 additions & 3 deletions receiver/activedirectorydsreceiver/counters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

func TestGetWatchers(t *testing.T) {
c := &mockCounterCreater{
c := &mockCounterCreator{
availableCounterNames: getAvailableCounters(t),
}

Expand All @@ -46,12 +46,12 @@ func getAvailableCounters(t *testing.T) []string {
return linesOut
}

type mockCounterCreater struct {
type mockCounterCreator struct {
created int
availableCounterNames []string
}

func (m *mockCounterCreater) Create(counterName string) (winperfcounters.PerfCounterWatcher, error) {
func (m *mockCounterCreator) Create(counterName string) (winperfcounters.PerfCounterWatcher, error) {
for _, availableCounter := range m.availableCounterNames {
if counterName == availableCounter {
watcher := &mockPerfCounterWatcher{
Expand Down
2 changes: 1 addition & 1 deletion receiver/activedirectorydsreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ The number of values transmitted by the Directory Replication Agent per second.
| Name | Description | Values |
| ---- | ----------- | ------ |
| direction | The direction of data flow. | Str: ``sent``, ``received`` |
| type | The type of value sent. | Str: ``distingushed_names``, ``other`` |
| type | The type of value sent. | Str: ``distinguished_names``, ``other`` |

### active_directory.ds.security_descriptor_propagations_event.queued

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion receiver/activedirectorydsreceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ attributes:
description: The type of value sent.
type: string
enum:
- distingushed_names
- distinguished_names
jsoref marked this conversation as resolved.
Show resolved Hide resolved
- other
operation_type:
name_override: type
Expand Down
14 changes: 7 additions & 7 deletions receiver/activedirectorydsreceiver/scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func newActiveDirectoryDSScraper(mbc metadata.MetricsBuilderConfig, params recei
}

func (a *activeDirectoryDSScraper) start(_ context.Context, _ component.Host) error {
watchers, err := getWatchers(defaultWatcherCreater{})
watchers, err := getWatchers(defaultWatcherCreator{})
if err != nil {
return fmt.Errorf("failed to create performance counter watchers: %w", err)
}
Expand Down Expand Up @@ -106,7 +106,7 @@ func (a *activeDirectoryDSScraper) scrape(_ context.Context) (pmetric.Metrics, e
draInboundValuesDNs, dnsErr := a.w.Scrape(draInboundValuesDNs)
multiErr = multierr.Append(multiErr, dnsErr)
if dnsErr == nil {
a.mb.RecordActiveDirectoryDsReplicationValueRateDataPoint(now, draInboundValuesDNs, metadata.AttributeDirectionReceived, metadata.AttributeValueTypeDistingushedNames)
a.mb.RecordActiveDirectoryDsReplicationValueRateDataPoint(now, draInboundValuesDNs, metadata.AttributeDirectionReceived, metadata.AttributeValueTypeDistinguishedNames)
}

draInboundValuesTotal, totalErr := a.w.Scrape(draInboundValuesTotal)
Expand All @@ -120,7 +120,7 @@ func (a *activeDirectoryDSScraper) scrape(_ context.Context) (pmetric.Metrics, e
draOutboundValuesDNs, dnsErr := a.w.Scrape(draOutboundValuesDNs)
multiErr = multierr.Append(multiErr, dnsErr)
if dnsErr == nil {
a.mb.RecordActiveDirectoryDsReplicationValueRateDataPoint(now, draOutboundValuesDNs, metadata.AttributeDirectionSent, metadata.AttributeValueTypeDistingushedNames)
a.mb.RecordActiveDirectoryDsReplicationValueRateDataPoint(now, draOutboundValuesDNs, metadata.AttributeDirectionSent, metadata.AttributeValueTypeDistinguishedNames)
}

draOutboundValuesTotal, totalErr := a.w.Scrape(draOutboundValuesTotal)
Expand All @@ -136,10 +136,10 @@ func (a *activeDirectoryDSScraper) scrape(_ context.Context) (pmetric.Metrics, e
a.mb.RecordActiveDirectoryDsReplicationOperationPendingDataPoint(now, int64(draPendingReplicationOperations))
}

draSyncFailuresSchemaMistmatch, schemaMismatchErr := a.w.Scrape(draSyncFailuresSchemaMismatch)
draSyncFailuresSchemaMismatch, schemaMismatchErr := a.w.Scrape(draSyncFailuresSchemaMismatch)
multiErr = multierr.Append(multiErr, schemaMismatchErr)
if schemaMismatchErr == nil {
a.mb.RecordActiveDirectoryDsReplicationSyncRequestCountDataPoint(now, int64(draSyncFailuresSchemaMistmatch), metadata.AttributeSyncResultSchemaMismatch)
a.mb.RecordActiveDirectoryDsReplicationSyncRequestCountDataPoint(now, int64(draSyncFailuresSchemaMismatch), metadata.AttributeSyncResultSchemaMismatch)
}

draSyncRequestsSuccessful, requestsSuccessfulErr := a.w.Scrape(draSyncRequestsSuccessful)
Expand All @@ -151,7 +151,7 @@ func (a *activeDirectoryDSScraper) scrape(_ context.Context) (pmetric.Metrics, e
draSyncRequestsTotal, totalErr := a.w.Scrape(draSyncRequestsMade)
multiErr = multierr.Append(multiErr, totalErr)
if totalErr == nil && requestsSuccessfulErr == nil && schemaMismatchErr == nil {
otherReplicationSyncRequests := draSyncRequestsTotal - draSyncRequestsSuccessful - draSyncFailuresSchemaMistmatch
otherReplicationSyncRequests := draSyncRequestsTotal - draSyncRequestsSuccessful - draSyncFailuresSchemaMismatch
a.mb.RecordActiveDirectoryDsReplicationSyncRequestCountDataPoint(now, int64(otherReplicationSyncRequests), metadata.AttributeSyncResultOther)
}

Expand Down Expand Up @@ -203,7 +203,7 @@ func (a *activeDirectoryDSScraper) scrape(_ context.Context) (pmetric.Metrics, e
a.mb.RecordActiveDirectoryDsSecurityDescriptorPropagationsEventQueuedDataPoint(now, int64(securityPropEvents))
}

securityDescSubops, err := a.w.Scrape(dsSecurityDescripterSubOperations)
securityDescSubops, err := a.w.Scrape(dsSecurityDescriptorSubOperations)
multiErr = multierr.Append(multiErr, err)
if err == nil {
a.mb.RecordActiveDirectoryDsSuboperationRateDataPoint(now, securityDescSubops, metadata.AttributeSuboperationTypeSecurityDescriptorPropagationsEvent)
Expand Down
8 changes: 4 additions & 4 deletions receiver/activedirectorydsreceiver/scraper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestScrape(t *testing.T) {
t.Run("Fully successful scrape", func(t *testing.T) {
t.Parallel()

mockWatchers, err := getWatchers(&mockCounterCreater{
mockWatchers, err := getWatchers(&mockCounterCreator{
availableCounterNames: getAvailableCounters(t),
})
require.NoError(t, err)
Expand Down Expand Up @@ -59,7 +59,7 @@ func TestScrape(t *testing.T) {
fullSyncObjectsRemainingErr := errors.New("failed to scrape sync objects remaining")
draInboundValuesDNErr := errors.New("failed to scrape sync inbound value DNs")

mockWatchers, err := getWatchers(&mockCounterCreater{
mockWatchers, err := getWatchers(&mockCounterCreator{
availableCounterNames: getAvailableCounters(t),
})
require.NoError(t, err)
Expand Down Expand Up @@ -94,7 +94,7 @@ func TestScrape(t *testing.T) {
fullSyncObjectsRemainingErr := errors.New("failed to close sync objects remaining")
draInboundValuesDNErr := errors.New("failed to close sync inbound value DNs")

mockWatchers, err := getWatchers(&mockCounterCreater{
mockWatchers, err := getWatchers(&mockCounterCreator{
availableCounterNames: getAvailableCounters(t),
})
require.NoError(t, err)
Expand All @@ -115,7 +115,7 @@ func TestScrape(t *testing.T) {
t.Run("Double shutdown does not error", func(t *testing.T) {
t.Parallel()

mockWatchers, err := getWatchers(&mockCounterCreater{
mockWatchers, err := getWatchers(&mockCounterCreator{
availableCounterNames: getAvailableCounters(t),
})
require.NoError(t, err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ resourceMetrics:
stringValue: received
- key: type
value:
stringValue: distingushed_names
stringValue: distinguished_names
startTimeUnixNano: "1000000"
timeUnixNano: "1000000"
- asDouble: 1
Expand All @@ -266,7 +266,7 @@ resourceMetrics:
stringValue: sent
- key: type
value:
stringValue: distingushed_names
stringValue: distinguished_names
startTimeUnixNano: "1000000"
timeUnixNano: "1000000"
- asDouble: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ resourceMetrics:
stringValue: sent
- key: type
value:
stringValue: distingushed_names
stringValue: distinguished_names
startTimeUnixNano: "1000000"
timeUnixNano: "1000000"
- asDouble: 1
Expand Down
2 changes: 1 addition & 1 deletion receiver/aerospikereceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Number of cell coverings for query region queried. Aerospike metric geo_region_q

Number of points outside the region.

Total query result points is geo_region_query_points + geo_region_query_falsepos. Aerospike metric geo_regio_query_falspos.
Total query result points is geo_region_query_points + geo_region_query_falsepos. Aerospike metric geo_region_query_falsepos.

| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
Expand Down
2 changes: 1 addition & 1 deletion receiver/aerospikereceiver/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ metrics:
enabled: true
description: Number of points outside the region.
unit: '{points}'
extended_documentation: Total query result points is geo_region_query_points + geo_region_query_falsepos. Aerospike metric geo_regio_query_falspos.
extended_documentation: Total query result points is geo_region_query_points + geo_region_query_falsepos. Aerospike metric geo_region_query_falsepos.
sum:
value_type: int
input_type: string
Expand Down
2 changes: 1 addition & 1 deletion receiver/apachereceiver/testdata/integration/httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ Include conf/extra/proxy-html.conf
# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# Note: The following must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
Expand Down
2 changes: 1 addition & 1 deletion receiver/awscloudwatchmetricsreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ This receiver uses the [GetMetricData](https://docs.aws.amazon.com/AmazonCloudWa

## Troubleshooting / Debugging

## My metrics are intermittent / not receing any metrics
## My metrics are intermittent / not receiving any metrics

Try a bigger `poll_interval`. CloudWatch returns no data if the period of the metric, by default for AWS supplied metrics, it's 300 seconds (5 minutes). Try out a period of 600 seconds and a poll interval of 600 seconds.

Expand Down
Loading