From b8f0b4feecebee30b6b4f4d2c5e862c5522ee48b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 30 Jan 2025 23:25:45 -0500 Subject: [PATCH] [chore] Spelling receiver/b...f (#37607) #### Description Fix spelling in receiver/{b...f}* https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/37128#pullrequestreview-2541561439 https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/37134#issuecomment-2619380966 #### Link to tracking issue * #37128 --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- receiver/bigipreceiver/scraper_test.go | 2 +- .../mock_server/record_big_ip_responses.sh | 2 +- receiver/carbonreceiver/config.go | 2 +- receiver/chronyreceiver/config.go | 2 +- receiver/chronyreceiver/factory.go | 2 +- .../cloudflarereceiver/logs_integration_test.go | 2 +- receiver/cloudfoundryreceiver/README.md | 2 +- receiver/collectdreceiver/collectd_test.go | 4 ++-- receiver/collectdreceiver/receiver_test.go | 4 ++-- receiver/couchdbreceiver/metrics.go | 6 +++--- .../internal/translator/sketches.go | 2 +- receiver/datadogreceiver/receiver.go | 2 +- receiver/datadogreceiver/receiver_test.go | 4 ++-- .../internal/model/nodestats.go | 14 +++++++------- receiver/elasticsearchreceiver/scraper.go | 2 +- .../testdata/sample_payloads/nodes_linux.json | 2 +- receiver/githubreceiver/internal/scraper.go | 2 +- .../internal/scraper/githubscraper/config.go | 2 +- .../internal/scraper/githubscraper/helpers.go | 4 ++-- .../scraper/githubscraper/schema.graphql | 8 ++++---- receiver/githubreceiver/traces_receiver_test.go | 2 +- receiver/httpcheckreceiver/scraper_test.go | 2 +- receiver/libhoneyreceiver/receiver.go | 2 +- .../alerts_integration_test.go | 2 +- receiver/mongodbatlasreceiver/factory.go | 2 +- receiver/osqueryreceiver/doc.go | 2 +- .../otelarrowreceiver/internal/arrow/arrow.go | 2 +- receiver/postgresqlreceiver/README.md | 2 +- receiver/pulsarreceiver/factory.go | 4 ++-- receiver/rabbitmqreceiver/scraper_test.go | 2 +- receiver/riakreceiver/scraper_test.go | 2 +- receiver/sapmreceiver/trace_receiver_test.go | 4 ++-- receiver/simpleprometheusreceiver/receiver.go | 16 ++++++++-------- .../integration/integration_test_v2c_config.yaml | 2 +- .../integration/integration_test_v3_config.yaml | 2 +- .../integration/v2c_config_expected_metrics.yaml | 6 +++--- .../integration/v3_config_expected_metrics.yaml | 6 +++--- receiver/wavefrontreceiver/config.go | 2 +- receiver/webhookeventreceiver/receiver_test.go | 2 +- 39 files changed, 67 insertions(+), 67 deletions(-) diff --git a/receiver/bigipreceiver/scraper_test.go b/receiver/bigipreceiver/scraper_test.go index 423e08aa6b9b..2483e1c47540 100644 --- a/receiver/bigipreceiver/scraper_test.go +++ b/receiver/bigipreceiver/scraper_test.go @@ -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 diff --git a/receiver/bigipreceiver/testdata/integration/mock_server/record_big_ip_responses.sh b/receiver/bigipreceiver/testdata/integration/mock_server/record_big_ip_responses.sh index 8fa9b9f2b745..c8df573609c3 100755 --- a/receiver/bigipreceiver/testdata/integration/mock_server/record_big_ip_responses.sh +++ b/receiver/bigipreceiver/testdata/integration/mock_server/record_big_ip_responses.sh @@ -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'' diff --git a/receiver/carbonreceiver/config.go b/receiver/carbonreceiver/config.go index 7e3e6be2c991..d3b6ccdf70f1 100644 --- a/receiver/carbonreceiver/config.go +++ b/receiver/carbonreceiver/config.go @@ -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"` diff --git a/receiver/chronyreceiver/config.go b/receiver/chronyreceiver/config.go index f8a8e66740a3..280379519d2a 100644 --- a/receiver/chronyreceiver/config.go +++ b/receiver/chronyreceiver/config.go @@ -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{ diff --git a/receiver/chronyreceiver/factory.go b/receiver/chronyreceiver/factory.go index 47a01cd120b9..119bd2ecb04b 100644 --- a/receiver/chronyreceiver/factory.go +++ b/receiver/chronyreceiver/factory.go @@ -20,7 +20,7 @@ import ( func NewFactory() receiver.Factory { return receiver.NewFactory( metadata.Type, - newDefaultCongfig, + newDefaultConfig, receiver.WithMetrics(newMetricsReceiver, metadata.MetricsStability), ) } diff --git a/receiver/cloudflarereceiver/logs_integration_test.go b/receiver/cloudflarereceiver/logs_integration_test.go index 16495780abbd..94eea02188f7 100644 --- a/receiver/cloudflarereceiver/logs_integration_test.go +++ b/receiver/cloudflarereceiver/logs_integration_test.go @@ -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{ diff --git a/receiver/cloudfoundryreceiver/README.md b/receiver/cloudfoundryreceiver/README.md index ce7f85c151c6..7cb12525e3bc 100644 --- a/receiver/cloudfoundryreceiver/README.md +++ b/receiver/cloudfoundryreceiver/README.md @@ -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): diff --git a/receiver/collectdreceiver/collectd_test.go b/receiver/collectdreceiver/collectd_test.go index a1c5dd7fba95..9c5a7cdb7d97 100644 --- a/receiver/collectdreceiver/collectd_test.go +++ b/receiver/collectdreceiver/collectd_test.go @@ -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) @@ -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()) diff --git a/receiver/collectdreceiver/receiver_test.go b/receiver/collectdreceiver/receiver_test.go index f9ae893824cc..0d5a26967c29 100644 --- a/receiver/collectdreceiver/receiver_test.go +++ b/receiver/collectdreceiver/receiver_test.go @@ -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() @@ -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 } diff --git a/receiver/couchdbreceiver/metrics.go b/receiver/couchdbreceiver/metrics.go index 6066562a60db..f66bf8e9a954 100644 --- a/receiver/couchdbreceiver/metrics.go +++ b/receiver/couchdbreceiver/metrics.go @@ -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 diff --git a/receiver/datadogreceiver/internal/translator/sketches.go b/receiver/datadogreceiver/internal/translator/sketches.go index 6af96fc15596..57a1480367af 100644 --- a/receiver/datadogreceiver/internal/translator/sketches.go +++ b/receiver/datadogreceiver/internal/translator/sketches.go @@ -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 diff --git a/receiver/datadogreceiver/receiver.go b/receiver/datadogreceiver/receiver.go index e667ebec5221..714ad0f7b8b0 100644 --- a/receiver/datadogreceiver/receiver.go +++ b/receiver/datadogreceiver/receiver.go @@ -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 } diff --git a/receiver/datadogreceiver/receiver_test.go b/receiver/datadogreceiver/receiver_test.go index 79c1072b7581..6a9144e166e0 100644 --- a/receiver/datadogreceiver/receiver_test.go +++ b/receiver/datadogreceiver/receiver_test.go @@ -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, }, } diff --git a/receiver/elasticsearchreceiver/internal/model/nodestats.go b/receiver/elasticsearchreceiver/internal/model/nodestats.go index 02a9d1e2cdb8..276f02716e7f 100644 --- a/receiver/elasticsearchreceiver/internal/model/nodestats.go +++ b/receiver/elasticsearchreceiver/internal/model/nodestats.go @@ -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 { diff --git a/receiver/elasticsearchreceiver/scraper.go b/receiver/elasticsearchreceiver/scraper.go index 71e92a7bb483..ba564b8002a0 100644 --- a/receiver/elasticsearchreceiver/scraper.go +++ b/receiver/elasticsearchreceiver/scraper.go @@ -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") diff --git a/receiver/elasticsearchreceiver/testdata/sample_payloads/nodes_linux.json b/receiver/elasticsearchreceiver/testdata/sample_payloads/nodes_linux.json index 04607eb3faaa..37bc9c7dfc16 100644 --- a/receiver/elasticsearchreceiver/testdata/sample_payloads/nodes_linux.json +++ b/receiver/elasticsearchreceiver/testdata/sample_payloads/nodes_linux.json @@ -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, diff --git a/receiver/githubreceiver/internal/scraper.go b/receiver/githubreceiver/internal/scraper.go index 9789999fc7b8..e41e40635ac1 100644 --- a/receiver/githubreceiver/internal/scraper.go +++ b/receiver/githubreceiver/internal/scraper.go @@ -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) diff --git a/receiver/githubreceiver/internal/scraper/githubscraper/config.go b/receiver/githubreceiver/internal/scraper/githubscraper/config.go index c8b767b97c29..554065f81bf1 100644 --- a/receiver/githubreceiver/internal/scraper/githubscraper/config.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/config.go @@ -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"` diff --git a/receiver/githubreceiver/internal/scraper/githubscraper/helpers.go b/receiver/githubreceiver/internal/scraper/githubscraper/helpers.go index 4a9753525176..573adf152ab3 100644 --- a/receiver/githubreceiver/internal/scraper/githubscraper/helpers.go +++ b/receiver/githubreceiver/internal/scraper/githubscraper/helpers.go @@ -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 } diff --git a/receiver/githubreceiver/internal/scraper/githubscraper/schema.graphql b/receiver/githubreceiver/internal/scraper/githubscraper/schema.graphql index c1276a91ad94..f0efc90b2ad9 100644 --- a/receiver/githubreceiver/internal/scraper/githubscraper/schema.graphql +++ b/receiver/githubreceiver/internal/scraper/githubscraper/schema.graphql @@ -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." @@ -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 @@ -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! @@ -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! diff --git a/receiver/githubreceiver/traces_receiver_test.go b/receiver/githubreceiver/traces_receiver_test.go index e9880d40f3ba..01c9b9ac0106 100644 --- a/receiver/githubreceiver/traces_receiver_test.go +++ b/receiver/githubreceiver/traces_receiver_test.go @@ -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() diff --git a/receiver/httpcheckreceiver/scraper_test.go b/receiver/httpcheckreceiver/scraper_test.go index 6ade4a815a9c..f24b6e340687 100644 --- a/receiver/httpcheckreceiver/scraper_test.go +++ b/receiver/httpcheckreceiver/scraper_test.go @@ -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 diff --git a/receiver/libhoneyreceiver/receiver.go b/receiver/libhoneyreceiver/receiver.go index 4d95dc752fcd..0db48b5e5f79 100644 --- a/receiver/libhoneyreceiver/receiver.go +++ b/receiver/libhoneyreceiver/receiver.go @@ -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) diff --git a/receiver/mongodbatlasreceiver/alerts_integration_test.go b/receiver/mongodbatlasreceiver/alerts_integration_test.go index 00c1a47ba635..fdc4aaaa3e0e 100644 --- a/receiver/mongodbatlasreceiver/alerts_integration_test.go +++ b/receiver/mongodbatlasreceiver/alerts_integration_test.go @@ -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{ diff --git a/receiver/mongodbatlasreceiver/factory.go b/receiver/mongodbatlasreceiver/factory.go index 27c6abff43ac..ace7899dd85e 100644 --- a/receiver/mongodbatlasreceiver/factory.go +++ b/receiver/mongodbatlasreceiver/factory.go @@ -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)) diff --git a/receiver/osqueryreceiver/doc.go b/receiver/osqueryreceiver/doc.go index ed625c151df1..c48d860df699 100644 --- a/receiver/osqueryreceiver/doc.go +++ b/receiver/osqueryreceiver/doc.go @@ -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" diff --git a/receiver/otelarrowreceiver/internal/arrow/arrow.go b/receiver/otelarrowreceiver/internal/arrow/arrow.go index 65b041068068..a7f7563544ec 100644 --- a/receiver/otelarrowreceiver/internal/arrow/arrow.go +++ b/receiver/otelarrowreceiver/internal/arrow/arrow.go @@ -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) diff --git a/receiver/postgresqlreceiver/README.md b/receiver/postgresqlreceiver/README.md index c10dcf3b367f..c73cce90a65a 100644 --- a/receiver/postgresqlreceiver/README.md +++ b/receiver/postgresqlreceiver/README.md @@ -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. diff --git a/receiver/pulsarreceiver/factory.go b/receiver/pulsarreceiver/factory.go index aa15ed799f58..730f75865ddb 100644 --- a/receiver/pulsarreceiver/factory.go +++ b/receiver/pulsarreceiver/factory.go @@ -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" @@ -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 { diff --git a/receiver/rabbitmqreceiver/scraper_test.go b/receiver/rabbitmqreceiver/scraper_test.go index 112941b136d9..26dddcf7fbf4 100644 --- a/receiver/rabbitmqreceiver/scraper_test.go +++ b/receiver/rabbitmqreceiver/scraper_test.go @@ -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 diff --git a/receiver/riakreceiver/scraper_test.go b/receiver/riakreceiver/scraper_test.go index 896c478bf39f..1817befcec27 100644 --- a/receiver/riakreceiver/scraper_test.go +++ b/receiver/riakreceiver/scraper_test.go @@ -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 diff --git a/receiver/sapmreceiver/trace_receiver_test.go b/receiver/sapmreceiver/trace_receiver_test.go index 01aa4adeb910..1a55cc81dd8e 100644 --- a/receiver/sapmreceiver/trace_receiver_test.go +++ b/receiver/sapmreceiver/trace_receiver_test.go @@ -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, }, } diff --git a/receiver/simpleprometheusreceiver/receiver.go b/receiver/simpleprometheusreceiver/receiver.go index d46eb1005719..7c3f71d5d6a1 100644 --- a/receiver/simpleprometheusreceiver/receiver.go +++ b/receiver/simpleprometheusreceiver/receiver.go @@ -23,10 +23,10 @@ import ( ) type prometheusReceiverWrapper struct { - params receiver.Settings - config *Config - consumer consumer.Metrics - prometheusRecever receiver.Metrics + params receiver.Settings + config *Config + consumer consumer.Metrics + prometheusReceiver receiver.Metrics } // newPrometheusReceiverWrapper returns a prometheusReceiverWrapper @@ -48,8 +48,8 @@ func (prw *prometheusReceiverWrapper) Start(ctx context.Context, host component. return fmt.Errorf("failed to create prometheus receiver: %w", err) } - prw.prometheusRecever = pr - return prw.prometheusRecever.Start(ctx, host) + prw.prometheusReceiver = pr + return prw.prometheusReceiver.Start(ctx, host) } // Deprecated: [v0.55.0] Use getPrometheusConfig instead. @@ -145,8 +145,8 @@ func getPrometheusConfig(cfg *Config) (*prometheusreceiver.Config, error) { // Shutdown stops the underlying Prometheus receiver. func (prw *prometheusReceiverWrapper) Shutdown(ctx context.Context) error { - if prw.prometheusRecever == nil { + if prw.prometheusReceiver == nil { return nil } - return prw.prometheusRecever.Shutdown(ctx) + return prw.prometheusReceiver.Shutdown(ctx) } diff --git a/receiver/snmpreceiver/testdata/integration/integration_test_v2c_config.yaml b/receiver/snmpreceiver/testdata/integration/integration_test_v2c_config.yaml index 4f2feedc0282..6545aaee052d 100644 --- a/receiver/snmpreceiver/testdata/integration/integration_test_v2c_config.yaml +++ b/receiver/snmpreceiver/testdata/integration/integration_test_v2c_config.yaml @@ -31,7 +31,7 @@ receivers: attributes: - name: snmp.test.attribute.two.enum value: out - snmp.test.column.out.get.reponses: + snmp.test.column.out.get.responses: description: SNMP get responses unit: "By" sum: diff --git a/receiver/snmpreceiver/testdata/integration/integration_test_v3_config.yaml b/receiver/snmpreceiver/testdata/integration/integration_test_v3_config.yaml index 4a9da0c00286..c25db5411851 100644 --- a/receiver/snmpreceiver/testdata/integration/integration_test_v3_config.yaml +++ b/receiver/snmpreceiver/testdata/integration/integration_test_v3_config.yaml @@ -37,7 +37,7 @@ receivers: attributes: - name: snmp.test.attribute.two.enum value: out - snmp.test.column.out.get.reponses: + snmp.test.column.out.get.responses: description: SNMP get responses unit: "By" sum: diff --git a/receiver/snmpreceiver/testdata/integration/v2c_config_expected_metrics.yaml b/receiver/snmpreceiver/testdata/integration/v2c_config_expected_metrics.yaml index 7b1f58a8cc17..49df4d6e7593 100644 --- a/receiver/snmpreceiver/testdata/integration/v2c_config_expected_metrics.yaml +++ b/receiver/snmpreceiver/testdata/integration/v2c_config_expected_metrics.yaml @@ -40,7 +40,7 @@ resourceMetrics: scopeMetrics: - metrics: - description: SNMP get responses - name: snmp.test.column.out.get.reponses + name: snmp.test.column.out.get.responses sum: aggregationTemporality: 2 dataPoints: @@ -66,7 +66,7 @@ resourceMetrics: scopeMetrics: - metrics: - description: SNMP get responses - name: snmp.test.column.out.get.reponses + name: snmp.test.column.out.get.responses sum: aggregationTemporality: 2 dataPoints: @@ -92,7 +92,7 @@ resourceMetrics: scopeMetrics: - metrics: - description: SNMP get responses - name: snmp.test.column.out.get.reponses + name: snmp.test.column.out.get.responses sum: aggregationTemporality: 2 dataPoints: diff --git a/receiver/snmpreceiver/testdata/integration/v3_config_expected_metrics.yaml b/receiver/snmpreceiver/testdata/integration/v3_config_expected_metrics.yaml index cc1337c8cfe0..668848eb056f 100644 --- a/receiver/snmpreceiver/testdata/integration/v3_config_expected_metrics.yaml +++ b/receiver/snmpreceiver/testdata/integration/v3_config_expected_metrics.yaml @@ -40,7 +40,7 @@ resourceMetrics: scopeMetrics: - metrics: - description: SNMP get responses - name: snmp.test.column.out.get.reponses + name: snmp.test.column.out.get.responses sum: aggregationTemporality: 2 dataPoints: @@ -66,7 +66,7 @@ resourceMetrics: scopeMetrics: - metrics: - description: SNMP get responses - name: snmp.test.column.out.get.reponses + name: snmp.test.column.out.get.responses sum: aggregationTemporality: 2 dataPoints: @@ -92,7 +92,7 @@ resourceMetrics: scopeMetrics: - metrics: - description: SNMP get responses - name: snmp.test.column.out.get.reponses + name: snmp.test.column.out.get.responses sum: aggregationTemporality: 2 dataPoints: diff --git a/receiver/wavefrontreceiver/config.go b/receiver/wavefrontreceiver/config.go index 4f5d4b73eff6..496e65123ab6 100644 --- a/receiver/wavefrontreceiver/config.go +++ b/receiver/wavefrontreceiver/config.go @@ -14,7 +14,7 @@ import ( type Config struct { confignet.TCPAddrConfig `mapstructure:",squash"` - // TCPIdleTimeout is the timout for idle TCP connections. + // TCPIdleTimeout is the timeout for idle TCP connections. TCPIdleTimeout time.Duration `mapstructure:"tcp_idle_timeout"` // ExtractCollectdTags instructs the Wavefront receiver to attempt to extract diff --git a/receiver/webhookeventreceiver/receiver_test.go b/receiver/webhookeventreceiver/receiver_test.go index c86946dc466d..be8a62e2fb3d 100644 --- a/receiver/webhookeventreceiver/receiver_test.go +++ b/receiver/webhookeventreceiver/receiver_test.go @@ -231,7 +231,7 @@ func TestHealthCheck(t *testing.T) { r := receiver.(*eventReceiver) 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()