Skip to content

Commit

Permalink
[chore] Spelling receiver/b...f (#37607)
Browse files Browse the repository at this point in the history
#### Description

Fix spelling in receiver/{b...f}*

#37128 (review)

#37134 (comment)

#### Link to tracking issue

* #37128

---------

Signed-off-by: Josh Soref <[email protected]>
  • Loading branch information
jsoref authored Jan 31, 2025
1 parent 226893e commit b8f0b4f
Show file tree
Hide file tree
Showing 39 changed files with 67 additions and 67 deletions.
2 changes: 1 addition & 1 deletion receiver/bigipreceiver/scraper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestScraperStart(t *testing.T) {
}
}

func TestScaperScrape(t *testing.T) {
func TestScraperScrape(t *testing.T) {
testCases := []struct {
desc string
setupMockClient func(t *testing.T) client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MEMBERS_STATS_RESPONSE_FILE_SUFFIX='_pool_members_stats_response.json'
LOGIN_RESPONSE=$(curl -sk POST $ENDPOINT/mgmt/shared/authn/login -H $JSON_HEADER -d '{"username":"'$USER'","password":"'$PASSWORD'"}')
echo $LOGIN_RESPONSE | jq . > $LOGIN_RESPONSE_FILE

# Retrieve token from the respons and create header with it
# Retrieve token from the response and create header with it
TOKEN=$(echo $LOGIN_RESPONSE | jq -r '.token.token')
TOKEN_HEADER='X-F5-Auth-Token:'$TOKEN''

Expand Down
2 changes: 1 addition & 1 deletion receiver/carbonreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var _ component.ConfigValidator = (*Config)(nil)
type Config struct {
confignet.AddrConfig `mapstructure:",squash"`

// TCPIdleTimeout is the timout for idle TCP connections, it is ignored
// TCPIdleTimeout is the timeout for idle TCP connections, it is ignored
// if transport being used is UDP.
TCPIdleTimeout time.Duration `mapstructure:"tcp_idle_timeout"`

Expand Down
2 changes: 1 addition & 1 deletion receiver/chronyreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var (
errInvalidValue = errors.New("invalid value")
)

func newDefaultCongfig() component.Config {
func newDefaultConfig() component.Config {
cfg := scraperhelper.NewDefaultControllerConfig()
cfg.Timeout = 10 * time.Second
return &Config{
Expand Down
2 changes: 1 addition & 1 deletion receiver/chronyreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
func NewFactory() receiver.Factory {
return receiver.NewFactory(
metadata.Type,
newDefaultCongfig,
newDefaultConfig,
receiver.WithMetrics(newMetricsReceiver, metadata.MetricsStability),
)
}
Expand Down
2 changes: 1 addition & 1 deletion receiver/cloudflarereceiver/logs_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func clientWithCert(path string) (*http.Client, error) {
roots := x509.NewCertPool()
ok := roots.AppendCertsFromPEM(b)
if !ok {
return nil, errors.New("failed to append certficate as root certificate")
return nil, errors.New("failed to append certificate as root certificate")
}

return &http.Client{
Expand Down
2 changes: 1 addition & 1 deletion receiver/cloudfoundryreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ The receiver maps the envelope attribute tags to the following OpenTelemetry att
The `cloudfoundry.resourceAttributes.allow` [feature gate](https://github.com/open-telemetry/opentelemetry-collector/blob/main/featuregate/README.md#collector-feature-gates) allows the envelope tags being copied to the metrics as resource attributes instead of datapoint attributes (default `false`).
Therefore all `org.cloudfoundry.*` datapoint attributes won't be present anymore on metrics datapoint level, but on resource level instead, since the attributes describe the resource and not the datapoints itself.

The `cloudfoundry.resourceAttributes.allow` feature gate is available since version `v0.117.0` and will be held at least for 2 versions (`v0.119.0`) until promoting to `beta` and another 2 vesions (`v0.121.0`) until promoting to `stable`.
The `cloudfoundry.resourceAttributes.allow` feature gate is available since version `v0.117.0` and will be held at least for 2 versions (`v0.119.0`) until promoting to `beta` and another 2 versions (`v0.121.0`) until promoting to `stable`.

Below you can see the list of attributes that are present the resource level instead of datapoint level (when `cloudfoundry.resourceAttributes.allow` feature gate is enabled):

Expand Down
4 changes: 2 additions & 2 deletions receiver/collectdreceiver/collectd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func TestDecodeEvent(t *testing.T) {

func TestDecodeMetrics(t *testing.T) {
metrics := pmetric.NewMetrics()
scopeMemtrics := metrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty()
scopeMetrics := metrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty()
jsonData, err := os.ReadFile(filepath.Join("testdata", "collectd.json"))
require.NoError(t, err)

Expand All @@ -48,7 +48,7 @@ func TestDecodeMetrics(t *testing.T) {
require.NoError(t, err)

for _, cdr := range records {
err = cdr.appendToMetrics(zap.NewNop(), scopeMemtrics, map[string]string{})
err = cdr.appendToMetrics(zap.NewNop(), scopeMetrics, map[string]string{})
assert.NoError(t, err)
}
assert.Equal(t, 10, metrics.MetricCount())
Expand Down
4 changes: 2 additions & 2 deletions receiver/collectdreceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func TestCollectDServer(t *testing.T) {
func createWantedMetrics(wantedRequestBody wantedBody) pmetric.Metrics {
var dataPoint pmetric.NumberDataPoint
testMetrics := pmetric.NewMetrics()
scopeMemtrics := testMetrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty()
scopeMetrics := testMetrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty()
testMetric := pmetric.NewMetric()
testMetric.SetName(wantedRequestBody.Name)
sum := testMetric.SetEmptySum()
Expand All @@ -206,7 +206,7 @@ func createWantedMetrics(wantedRequestBody wantedBody) pmetric.Metrics {
}
attributes.CopyTo(dataPoint.Attributes())
dataPoint.SetDoubleValue(wantedRequestBody.Value)
newMetric := scopeMemtrics.Metrics().AppendEmpty()
newMetric := scopeMetrics.Metrics().AppendEmpty()
testMetric.MoveTo(newMetric)
return testMetrics
}
Expand Down
6 changes: 3 additions & 3 deletions receiver/couchdbreceiver/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ func (c *couchdbScraper) recordCouchdbHttpdRequestsDataPoint(now pcommon.Timesta
func (c *couchdbScraper) recordCouchdbHttpdResponsesDataPoint(now pcommon.Timestamp, stats map[string]any, errs *scrapererror.ScrapeErrors) {
codes := []string{"200", "201", "202", "204", "206", "301", "302", "304", "400", "401", "403", "404", "405", "406", "409", "412", "413", "414", "415", "416", "417", "500", "501", "503"}
for _, code := range codes {
httpdResponsetCodeKey := []string{"httpd_status_codes", code, "value"}
httpdResponsetCodeValue, err := getValueFromBody(httpdResponsetCodeKey, stats)
httpdResponseCodeKey := []string{"httpd_status_codes", code, "value"}
httpdResponseCodeValue, err := getValueFromBody(httpdResponseCodeKey, stats)
if err != nil {
errs.AddPartial(1, err)
continue
}

parsedValue, err := c.parseInt(httpdResponsetCodeValue)
parsedValue, err := c.parseInt(httpdResponseCodeValue)
if err != nil {
errs.AddPartial(1, err)
continue
Expand Down
2 changes: 1 addition & 1 deletion receiver/datadogreceiver/internal/translator/sketches.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func mapSketchBucketsToHistogramBuckets(sketchKeys []int32, sketchCounts []uint3
continue
}
if sketchKeys[i] >= maxIndex {
// This should not happen, as sketches that contain bucket(s) with an index higher than the max
// This should not happen, as sketches that contain bucket(s) with an index greater than the max
// limit should have already been discarded. However, if there happens to be an index > maxIndex,
// it can cause an infinite loop within the below inner for loop on some operating systems. Therefore,
// throw an error for sketches that have an index above the max limit
Expand Down
2 changes: 1 addition & 1 deletion receiver/datadogreceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (ddr *datadogReceiver) handleInfo(w http.ResponseWriter, _ *http.Request, i
}

func (ddr *datadogReceiver) handleTraces(w http.ResponseWriter, req *http.Request) {
if req.ContentLength == 0 { // Ping mecanism of Datadog SDK perform http request with empty body when GET /info not implemented.
if req.ContentLength == 0 { // Ping mechanism of Datadog SDK perform http request with empty body when GET /info not implemented.
http.Error(w, "Fake featuresdiscovery", http.StatusBadRequest) // The response code should be different of 404 to be considered ok by Datadog SDK.
return
}
Expand Down
4 changes: 2 additions & 2 deletions receiver/datadogreceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ func TestDatadogResponse(t *testing.T) {
}{
{
name: "non-permanent error",
err: errors.New("non-permanenet error"),
err: errors.New("non-permanent error"),
expectedStatus: http.StatusServiceUnavailable,
},
{
name: "permanent error",
err: consumererror.NewPermanent(errors.New("non-permanenet error")),
err: consumererror.NewPermanent(errors.New("non-permanent error")),
expectedStatus: http.StatusBadRequest,
},
}
Expand Down
14 changes: 7 additions & 7 deletions receiver/elasticsearchreceiver/internal/model/nodestats.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ type JVMInfo struct {
}

type JVMMemoryInfo struct {
HeapUsedInBy int64 `json:"heap_used_in_bytes"`
NonHeapUsedInBy int64 `json:"non_heap_used_in_bytes"`
MaxHeapInBy int64 `json:"heap_max_in_bytes"`
HeapCommittedInBy int64 `json:"heap_committed_in_bytes"`
HeapUsedPercent int64 `json:"heap_used_percent"`
NonHeapComittedInBy int64 `json:"non_heap_committed_in_bytes"`
MemoryPools JVMMemoryPools `json:"pools"`
HeapUsedInBy int64 `json:"heap_used_in_bytes"`
NonHeapUsedInBy int64 `json:"non_heap_used_in_bytes"`
MaxHeapInBy int64 `json:"heap_max_in_bytes"`
HeapCommittedInBy int64 `json:"heap_committed_in_bytes"`
HeapUsedPercent int64 `json:"heap_used_percent"`
NonHeapCommittedInBy int64 `json:"non_heap_committed_in_bytes"`
MemoryPools JVMMemoryPools `json:"pools"`
}

type JVMMemoryPools struct {
Expand Down
2 changes: 1 addition & 1 deletion receiver/elasticsearchreceiver/scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (r *elasticsearchScraper) scrapeNodeMetrics(ctx context.Context, now pcommo
r.mb.RecordJvmMemoryHeapUtilizationDataPoint(now, float64(info.JVMInfo.JVMMemoryInfo.HeapUsedPercent)/100)

r.mb.RecordJvmMemoryNonheapUsedDataPoint(now, info.JVMInfo.JVMMemoryInfo.NonHeapUsedInBy)
r.mb.RecordJvmMemoryNonheapCommittedDataPoint(now, info.JVMInfo.JVMMemoryInfo.NonHeapComittedInBy)
r.mb.RecordJvmMemoryNonheapCommittedDataPoint(now, info.JVMInfo.JVMMemoryInfo.NonHeapCommittedInBy)

r.mb.RecordJvmMemoryPoolUsedDataPoint(now, info.JVMInfo.JVMMemoryInfo.MemoryPools.Young.MemUsedBy, "young")
r.mb.RecordJvmMemoryPoolUsedDataPoint(now, info.JVMInfo.JVMMemoryInfo.MemoryPools.Survivor.MemUsedBy, "survivor")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@
"version": "7.17.7",
"elasticsearch_version": "7.17.7",
"java_version": "1.8",
"description": "Ingest processor that uses looksup geo data based on ip adresses using the Maxmind geo database",
"description": "Ingest processor that uses looksup geo data based on ip addresses using the Maxmind geo database",
"classname": "org.elasticsearch.ingest.geoip.IngestGeoIpPlugin",
"extended_plugins": [],
"has_native_controller": false,
Expand Down
2 changes: 1 addition & 1 deletion receiver/githubreceiver/internal/scraper.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

type ScraperFactory interface {
// Create the default configuration for the sub sccraper.
// Create the default configuration for the sub scraper.
CreateDefaultConfig() Config
// Create a scraper based on the configuration passed or return an error if not valid.
CreateMetricsScraper(ctx context.Context, params receiver.Settings, cfg Config) (scraper.Metrics, error)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/githubreceiver/internal/metadata"
)

// Config relating to Github Metric Scraper.
// Config relating to GitHub Metric Scraper.
type Config struct {
metadata.MetricsBuilderConfig `mapstructure:",squash"`
confighttp.ClientConfig `mapstructure:",squash"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ func (ghs *githubScraper) getCommitData(
tar := data.Repository.Refs.Nodes[0].GetTarget()

// We do a sanity type check just to make sure the GraphQL response was
// indead for commits. This is a byproduct of the `... on Commit` syntax
// indeed for commits. This is a byproduct of the `... on Commit` syntax
// within the GraphQL query and then return the actual history if the
// returned Target is inded of type Commit.
// returned Target is indeed of type Commit.
if ct, ok := tar.(*BranchHistoryTargetCommit); ok {
return &ct.History, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10585,7 +10585,7 @@ type ProjectV2SingleSelectField implements ProjectV2FieldCommon & Node {
name: String!
"Options for the single select field"
options(
"Filter returned options to only those matching these names, case insensitive."
"Filter returned options to only those matching these names, case-insensitive."
names: [String!]
): [ProjectV2SingleSelectFieldOption!]!
"The project that contains this field."
Expand Down Expand Up @@ -22370,7 +22370,7 @@ enum ThreadSubscriptionState {
SUBSCRIBED_TO_THREAD_EVENTS
"The User is never notified because they are ignoring the thread"
IGNORING_THREAD
"The User is notified becuase they are watching the list"
"The User is notified because they are watching the list"
SUBSCRIBED_TO_LIST
"The User is notified because they chose custom settings for this thread."
SUBSCRIBED_TO_THREAD_TYPE
Expand Down Expand Up @@ -23903,7 +23903,7 @@ input Environments {
"The direction in which to order environments by the specified field."
direction: OrderDirection!
}
"A command to add a file at the given path with the given contents as part of a commit. Any existing file at that that path will be replaced."
"A command to add a file at the given path with the given contents as part of a commit. Any existing file at that path will be replaced."
input FileAddition {
"The path in the repository where the file will be located"
path: String!
Expand Down Expand Up @@ -24667,7 +24667,7 @@ input RepositoryRulesetBypassActorInput {
actorId: ID
"For role bypasses, the role database ID"
repositoryRoleDatabaseId: Int
"For org admin bupasses, true"
"For org admin bypasses, true"
organizationAdmin: Boolean
"The bypass mode for this actor."
bypassMode: RepositoryRulesetBypassActorBypassMode!
Expand Down
2 changes: 1 addition & 1 deletion receiver/githubreceiver/traces_receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestHealthCheck(t *testing.T) {
r := receiver
require.NoError(t, r.Start(context.Background(), componenttest.NewNopHost()), "failed to start receiver")
defer func() {
require.NoError(t, r.Shutdown(context.Background()), "failed to shutdown revceiver")
require.NoError(t, r.Shutdown(context.Background()), "failed to shutdown receiver")
}()

w := httptest.NewRecorder()
Expand Down
2 changes: 1 addition & 1 deletion receiver/httpcheckreceiver/scraper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func TestScraperStart(t *testing.T) {
}
}

func TestScaperScrape(t *testing.T) {
func TestScraperScrape(t *testing.T) {
testCases := []struct {
desc string
expectedResponse int
Expand Down
2 changes: 1 addition & 1 deletion receiver/libhoneyreceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (r *libhoneyReceiver) startHTTPServer(ctx context.Context, host component.H

httpMux := http.NewServeMux()

r.settings.Logger.Info("r.nextTraces is not null so httpTracesReciever was added", zap.Int("paths", len(r.cfg.HTTP.TracesURLPaths)))
r.settings.Logger.Info("r.nextTraces is not null so httpTracesReceiver was added", zap.Int("paths", len(r.cfg.HTTP.TracesURLPaths)))
for _, path := range r.cfg.HTTP.TracesURLPaths {
httpMux.HandleFunc(path, func(resp http.ResponseWriter, req *http.Request) {
r.handleEvent(resp, req)
Expand Down
2 changes: 1 addition & 1 deletion receiver/mongodbatlasreceiver/alerts_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ func clientWithCert(path string) (*http.Client, error) {
roots := x509.NewCertPool()
ok := roots.AppendCertsFromPEM(b)
if !ok {
return nil, errors.New("failed to append certficate as root certificate")
return nil, errors.New("failed to append certificate as root certificate")
}

return &http.Client{
Expand Down
2 changes: 1 addition & 1 deletion receiver/mongodbatlasreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func createMetricsReceiver(
recv := newMongoDBAtlasReceiver(params, cfg)
ms, err := newMongoDBAtlasScraper(recv)
if err != nil {
return nil, fmt.Errorf("unable to create a MongoDB Atlas Scaper instance: %w", err)
return nil, fmt.Errorf("unable to create a MongoDB Atlas Scraper instance: %w", err)
}

return scraperhelper.NewMetricsController(&cfg.ControllerConfig, params, consumer, scraperhelper.AddScraper(metadata.Type, ms))
Expand Down
2 changes: 1 addition & 1 deletion receiver/osqueryreceiver/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

//go:generate mdatagen metadata.yaml

// Package osqueryreciever emits osquery results as logs
// Package osqueryreceiver emits osquery results as logs
package osqueryreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/osqueryreceiver"
2 changes: 1 addition & 1 deletion receiver/otelarrowreceiver/internal/arrow/arrow.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (r *Receiver) anyStream(serverStream anyStreamServer, method string) (retEr
pendingCh := make(chan batchResp, runtime.NumCPU())

// wg is used to ensure this thread returns after both
// sender and recevier threads return.
// sender and receiver threads return.
var sendWG sync.WaitGroup
var recvWG sync.WaitGroup
sendWG.Add(1)
Expand Down
2 changes: 1 addition & 1 deletion receiver/postgresqlreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The following settings are also optional and nested under `tls` to help configur

- `insecure` (default = `false`): Whether to enable client transport security for the postgresql connection.
- `insecure_skip_verify` (default = `true`): Whether to validate server name and certificate if client transport security is enabled.
- `cert_file` (default = `$HOME/.postgresql/postgresql.crt`): A cerficate used for client authentication, if necessary.
- `cert_file` (default = `$HOME/.postgresql/postgresql.crt`): A certificate used for client authentication, if necessary.
- `key_file` (default = `$HOME/.postgresql/postgresql.key`): An SSL key used for client authentication, if necessary.
- `ca_file` (default = ""): A set of certificate authorities used to validate the database server's SSL certificate.

Expand Down
4 changes: 2 additions & 2 deletions receiver/pulsarreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
const (
defaultEncoding = "otlp_proto"
defaultTraceTopic = "otlp_spans"
defaultMeticsTopic = "otlp_metrics"
defaultMetricsTopic = "otlp_metrics"
defaultLogsTopic = "otlp_logs"
defaultConsumerName = ""
defaultSubscription = "otlp_subscription"
Expand Down Expand Up @@ -103,7 +103,7 @@ func (f *pulsarReceiverFactory) createMetricsReceiver(
) (receiver.Metrics, error) {
c := *(cfg.(*Config))
if len(c.Topic) == 0 {
c.Topic = defaultMeticsTopic
c.Topic = defaultMetricsTopic
}
r, err := newMetricsReceiver(c, set, f.metricsUnmarshalers, nextConsumer)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion receiver/rabbitmqreceiver/scraper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestScraperStart(t *testing.T) {
}
}

func TestScaperScrape(t *testing.T) {
func TestScraperScrape(t *testing.T) {
testCases := []struct {
desc string
setupMockClient func(t *testing.T) client
Expand Down
2 changes: 1 addition & 1 deletion receiver/riakreceiver/scraper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func TestScraperStart(t *testing.T) {
}
}

func TestScaperScrape(t *testing.T) {
func TestScraperScrape(t *testing.T) {
testCases := []struct {
desc string
setupMockClient func(t *testing.T) client
Expand Down
4 changes: 2 additions & 2 deletions receiver/sapmreceiver/trace_receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,12 @@ func TestStatusCode(t *testing.T) {
}{
{
name: "non-permanent error",
err: errors.New("non-permanenet error"),
err: errors.New("non-permanent error"),
expectedStatus: http.StatusServiceUnavailable,
},
{
name: "permanent error",
err: consumererror.NewPermanent(errors.New("non-permanenet error")),
err: consumererror.NewPermanent(errors.New("non-permanent error")),
expectedStatus: http.StatusBadRequest,
},
}
Expand Down
Loading

0 comments on commit b8f0b4f

Please sign in to comment.