diff --git a/receiver/libhoneyreceiver/internal/libhoneyevent/libhoneyevent.go b/receiver/libhoneyreceiver/internal/libhoneyevent/libhoneyevent.go index f9245ac00cfd..14a518472b39 100644 --- a/receiver/libhoneyreceiver/internal/libhoneyevent/libhoneyevent.go +++ b/receiver/libhoneyreceiver/internal/libhoneyevent/libhoneyevent.go @@ -332,8 +332,8 @@ func (l *LibhoneyEvent) ToPTraceSpan(newSpan *ptrace.Span, alreadyUsedFields *[] if spanName, ok := l.Data[cfg.Attributes.Name]; ok { newSpan.SetName(spanName.(string)) } - if spanStatusMessge, ok := l.Data["status_message"]; ok { - newSpan.Status().SetMessage(spanStatusMessge.(string)) + if spanStatusMessage, ok := l.Data["status_message"]; ok { + newSpan.Status().SetMessage(spanStatusMessage.(string)) } newSpan.Status().SetCode(ptrace.StatusCodeUnset) diff --git a/receiver/libhoneyreceiver/receiver.go b/receiver/libhoneyreceiver/receiver.go index 09d2e73d63af..4d95dc752fcd 100644 --- a/receiver/libhoneyreceiver/receiver.go +++ b/receiver/libhoneyreceiver/receiver.go @@ -193,7 +193,7 @@ func (r *libhoneyReceiver) handleEvent(resp http.ResponseWriter, req *http.Reque dataset, err := parser.GetDatasetFromRequest(req.RequestURI) if err != nil { - r.settings.Logger.Info("No dataset found in URL", zap.String("req.RequstURI", req.RequestURI)) + r.settings.Logger.Info("No dataset found in URL", zap.String("req.RequestURI", req.RequestURI)) } for _, p := range r.cfg.HTTP.TracesURLPaths { diff --git a/receiver/mongodbatlasreceiver/combined_logs.go b/receiver/mongodbatlasreceiver/combined_logs.go index 7daa47beab1a..97b4d8a72645 100644 --- a/receiver/mongodbatlasreceiver/combined_logs.go +++ b/receiver/mongodbatlasreceiver/combined_logs.go @@ -59,7 +59,7 @@ func (c *combinedLogsReceiver) Start(ctx context.Context, host component.Host) e return errs } -// Shutsdown the combined MongoDB Atlas Logs and Alert Receiver +// Shuts down the combined MongoDB Atlas Logs and Alert Receiver func (c *combinedLogsReceiver) Shutdown(ctx context.Context) error { var errs error diff --git a/receiver/mysqlreceiver/scraper.go b/receiver/mysqlreceiver/scraper.go index 92b733a92075..b36652512376 100644 --- a/receiver/mysqlreceiver/scraper.go +++ b/receiver/mysqlreceiver/scraper.go @@ -102,7 +102,7 @@ func (m *mySQLScraper) scrape(context.Context) (pmetric.Metrics, error) { // collect global status metrics. m.scrapeGlobalStats(now, errs) - // colect replicas status metrics. + // collect replicas status metrics. m.scrapeReplicaStatusStats(now) rb := m.mb.NewResourceBuilder() diff --git a/receiver/nsxtreceiver/README.md b/receiver/nsxtreceiver/README.md index d6825a3d4fbd..18f716e34ca9 100644 --- a/receiver/nsxtreceiver/README.md +++ b/receiver/nsxtreceiver/README.md @@ -34,7 +34,7 @@ This receiver supports NSX-T Datacenter versions: ## Configuration -- `endpoint`: Endpoint of the NSX Manager. Must be formatted as `{scheme}://{host}:{port}`. Schems supported are `http` and `https` +- `endpoint`: Endpoint of the NSX Manager. Must be formatted as `{scheme}://{host}:{port}`. Schemes supported are `http` and `https` - `username`: Username of the `Auditor` user diff --git a/receiver/nsxtreceiver/config_test.go b/receiver/nsxtreceiver/config_test.go index aaae7b13847b..99de3af56f02 100644 --- a/receiver/nsxtreceiver/config_test.go +++ b/receiver/nsxtreceiver/config_test.go @@ -41,7 +41,7 @@ func TestMetricValidation(t *testing.T) { expectedError: errors.New("url scheme must be http or https"), }, { - desc: "unparseable url", + desc: "unparsable url", cfg: &Config{ ClientConfig: confighttp.ClientConfig{ Endpoint: "\x00", diff --git a/receiver/otelarrowreceiver/README.md b/receiver/otelarrowreceiver/README.md index 2257de9d5ae9..897b2b12ad5d 100644 --- a/receiver/otelarrowreceiver/README.md +++ b/receiver/otelarrowreceiver/README.md @@ -148,7 +148,7 @@ than the receiver's `max_connection_age_grace` setting, which causes the exporter to cleanly shut down streams, allowing requests to complete before the http/2 connection is forcibly closed. While the exporter will retry data that was in-flight during an unexpected -stream shutdown, instrumentation about the telemety pipeline will show +stream shutdown, instrumentation about the telemetry pipeline will show RPC errors when the exporter's `max_stream_lifetime` is not configured correctly. diff --git a/receiver/otelarrowreceiver/internal/arrow/arrow.go b/receiver/otelarrowreceiver/internal/arrow/arrow.go index 080b36e2a9ef..65b041068068 100644 --- a/receiver/otelarrowreceiver/internal/arrow/arrow.go +++ b/receiver/otelarrowreceiver/internal/arrow/arrow.go @@ -524,7 +524,7 @@ func (id *inFlightData) anyDone(ctx context.Context) { // data. // // This handles constructing an inFlightData object, which itself -// tracks everything that needs to be used by instrumention when the +// tracks everything that needs to be used by instrumentation when the // batch finishes. func (r *receiverStream) recvOne(streamCtx context.Context, serverStream anyStreamServer, hrcv *headerReceiver, pendingCh chan<- batchResp, method string, ac arrowRecord.ConsumerAPI) (retErr error) { // Receive a batch corresponding with one ptrace.Traces, pmetric.Metrics, diff --git a/receiver/podmanreceiver/README.md b/receiver/podmanreceiver/README.md index f75d1d36e045..63d81a5bd195 100644 --- a/receiver/podmanreceiver/README.md +++ b/receiver/podmanreceiver/README.md @@ -94,7 +94,7 @@ See [./documentation.md](./documentation.md) for full detail. This receiver uses the official libpod Go bindings for Podman. In order to include this receiver in your build, you'll need to make sure all non-Go dependencies are -satisfied or some features are exluded. You can use the below mentioned build tags to +satisfied or some features are excluded. You can use the below mentioned build tags to exclude the non-Go dependencies. This receiver does not use any features enabled by these deps so excluding these does not affect the functionality in any way. diff --git a/receiver/prometheusreceiver/DESIGN.md b/receiver/prometheusreceiver/DESIGN.md index 6da2c713ffea..3a1fbc4d8c23 100644 --- a/receiver/prometheusreceiver/DESIGN.md +++ b/receiver/prometheusreceiver/DESIGN.md @@ -56,7 +56,7 @@ undocumented metrics types, including: * Gaugehistogram * Info -* Statset +* Stateset More details can be found from the [prometheus text parser source code](https://github.com/prometheus/prometheus/blob/afdd1357e008375e693a1b4c096f81b2358cb46f/model/textparse/interface.go#L25) @@ -357,12 +357,12 @@ metrics := []*metricspb.Metric{ ### Gauge -Gauge, as described in the [Prometheus Metric Types Document](https://prometheus.io/docs/concepts/metric_types/#guage), +Gauge, as described in the [Prometheus Metric Types Document](https://prometheus.io/docs/concepts/metric_types/#gauge), > is a metric that represents a single numerical value that can arbitrarily go up and down ``` # HELP gauge_test some test gauges. -# TYPE gauge_test gague +# TYPE gauge_test gauge gauge_test{id="1",foo="bar"} 1.0 gauge_test{id="2",foo=""} 2.0 @@ -555,7 +555,7 @@ bucket that, bucket counts from Prometheus are cumulative, to transform this into OpenTelemetry format, one needs to apply the following formula: ``` -CurrentOCBucketVlaue = CurrentPrometheusBucketValue - PrevPrometheusBucketValue +CurrentOCBucketValue = CurrentPrometheusBucketValue - PrevPrometheusBucketValue ``` OpenTelemetry does not use `+inf` as an explicit bound, one needs to remove it to generate diff --git a/receiver/prometheusreceiver/internal/metrics_adjuster.go b/receiver/prometheusreceiver/internal/metrics_adjuster.go index ebb33bb970b5..d6e9a36e083b 100644 --- a/receiver/prometheusreceiver/internal/metrics_adjuster.go +++ b/receiver/prometheusreceiver/internal/metrics_adjuster.go @@ -209,7 +209,7 @@ func (jm *JobsMap) maybeGC() { func (jm *JobsMap) get(job, instance string) *timeseriesMap { sig := job + ":" + instance - // a read locke is taken here as we will not need to modify jobsMap if the target timeseriesMap is available. + // a read lock is taken here as we will not need to modify jobsMap if the target timeseriesMap is available. jm.RLock() tsm, ok := jm.jobsMap[sig] jm.RUnlock() diff --git a/receiver/prometheusreceiver/internal/transaction_test.go b/receiver/prometheusreceiver/internal/transaction_test.go index b47b8ce83b96..2c675b31ccbf 100644 --- a/receiver/prometheusreceiver/internal/transaction_test.go +++ b/receiver/prometheusreceiver/internal/transaction_test.go @@ -1589,7 +1589,7 @@ func TestMetricBuilderHistogram(t *testing.T) { for _, tt := range tests { for _, enableNativeHistograms := range []bool{true, false} { - // None of the histograms above have native histogram versions, so enabling native hisotgrams has no effect. + // None of the histograms above have native histogram versions, so enabling native histograms has no effect. t.Run(fmt.Sprintf("%s/enableNativeHistograms=%v", tt.name, enableNativeHistograms), func(t *testing.T) { tt.run(t, enableNativeHistograms) }) diff --git a/receiver/prometheusreceiver/internal/util_test.go b/receiver/prometheusreceiver/internal/util_test.go index 7567c68e1a10..6910367056d4 100644 --- a/receiver/prometheusreceiver/internal/util_test.go +++ b/receiver/prometheusreceiver/internal/util_test.go @@ -105,7 +105,7 @@ func TestConvToMetricType(t *testing.T) { wantMonotonic: false, }, { - name: "model.metric_gauge_hostogram", + name: "model.metric_gauge_histogram", mtype: model.MetricTypeGaugeHistogram, want: pmetric.MetricTypeEmpty, wantMonotonic: false, diff --git a/receiver/prometheusremotewritereceiver/receiver_test.go b/receiver/prometheusremotewritereceiver/receiver_test.go index dd8b9527f410..4383d146daf9 100644 --- a/receiver/prometheusremotewritereceiver/receiver_test.go +++ b/receiver/prometheusremotewritereceiver/receiver_test.go @@ -77,32 +77,32 @@ func TestHandlePRWContentTypeNegotiation(t *testing.T) { for _, tc := range []struct { name string contentType string - extectedCode int + expectedCode int }{ { name: "no content type", contentType: "", - extectedCode: http.StatusUnsupportedMediaType, + expectedCode: http.StatusUnsupportedMediaType, }, { name: "unsupported content type", contentType: "application/json", - extectedCode: http.StatusUnsupportedMediaType, + expectedCode: http.StatusUnsupportedMediaType, }, { name: "x-protobuf/no proto parameter", contentType: "application/x-protobuf", - extectedCode: http.StatusUnsupportedMediaType, + expectedCode: http.StatusUnsupportedMediaType, }, { name: "x-protobuf/v1 proto parameter", contentType: fmt.Sprintf("application/x-protobuf;proto=%s", promconfig.RemoteWriteProtoMsgV1), - extectedCode: http.StatusUnsupportedMediaType, + expectedCode: http.StatusUnsupportedMediaType, }, { name: "x-protobuf/v2 proto parameter", contentType: fmt.Sprintf("application/x-protobuf;proto=%s", promconfig.RemoteWriteProtoMsgV2), - extectedCode: http.StatusNoContent, + expectedCode: http.StatusNoContent, }, } { t.Run(tc.name, func(t *testing.T) { @@ -121,8 +121,8 @@ func TestHandlePRWContentTypeNegotiation(t *testing.T) { resp, err := http.DefaultClient.Do(req) assert.NoError(t, err) - assert.Equal(t, tc.extectedCode, resp.StatusCode) - if tc.extectedCode == http.StatusNoContent { // We went until the end + assert.Equal(t, tc.expectedCode, resp.StatusCode) + if tc.expectedCode == http.StatusNoContent { // We went until the end assert.NotEmpty(t, resp.Header.Get("X-Prometheus-Remote-Write-Samples-Written")) assert.NotEmpty(t, resp.Header.Get("X-Prometheus-Remote-Write-Histograms-Written")) assert.NotEmpty(t, resp.Header.Get("X-Prometheus-Remote-Write-Exemplars-Written")) diff --git a/receiver/purefareceiver/receiver.go b/receiver/purefareceiver/receiver.go index af17a41b5f16..98ee1cc864b5 100644 --- a/receiver/purefareceiver/receiver.go +++ b/receiver/purefareceiver/receiver.go @@ -38,22 +38,22 @@ func (r *purefaReceiver) Start(ctx context.Context, compHost component.Host) err fact := prometheusreceiver.NewFactory() scrapeCfgs := []*config.ScrapeConfig{} - commomLabel := model.LabelSet{ + commonLabel := model.LabelSet{ "environment": model.LabelValue(r.cfg.Env), "host": model.LabelValue(r.cfg.ArrayName), "fa_array_name": model.LabelValue(r.cfg.ArrayName), } // Extracting environment & fa_array_name from commonLabel - deploymentEnv := commomLabel["environment"] - ArrayName := commomLabel["fa_array_name"] + deploymentEnv := commonLabel["environment"] + ArrayName := commonLabel["fa_array_name"] labelSet := model.LabelSet{ "environment": deploymentEnv, "fa_array_name": ArrayName, } - arrScraper := internal.NewScraper(ctx, internal.ScraperTypeArray, r.cfg.Endpoint, r.cfg.Namespace, r.cfg.TLSSetting, r.cfg.Array, r.cfg.Settings.ReloadIntervals.Array, commomLabel) + arrScraper := internal.NewScraper(ctx, internal.ScraperTypeArray, r.cfg.Endpoint, r.cfg.Namespace, r.cfg.TLSSetting, r.cfg.Array, r.cfg.Settings.ReloadIntervals.Array, commonLabel) if scCfgs, err := arrScraper.ToPrometheusReceiverConfig(compHost, fact); err == nil { scrapeCfgs = append(scrapeCfgs, scCfgs...) } else { @@ -67,14 +67,14 @@ func (r *purefaReceiver) Start(ctx context.Context, compHost component.Host) err return err } - directoriesScraper := internal.NewScraper(ctx, internal.ScraperTypeDirectories, r.cfg.Endpoint, r.cfg.Namespace, r.cfg.TLSSetting, r.cfg.Directories, r.cfg.Settings.ReloadIntervals.Directories, commomLabel) + directoriesScraper := internal.NewScraper(ctx, internal.ScraperTypeDirectories, r.cfg.Endpoint, r.cfg.Namespace, r.cfg.TLSSetting, r.cfg.Directories, r.cfg.Settings.ReloadIntervals.Directories, commonLabel) if scCfgs, err := directoriesScraper.ToPrometheusReceiverConfig(compHost, fact); err == nil { scrapeCfgs = append(scrapeCfgs, scCfgs...) } else { return err } - podsScraper := internal.NewScraper(ctx, internal.ScraperTypePods, r.cfg.Endpoint, r.cfg.Namespace, r.cfg.TLSSetting, r.cfg.Pods, r.cfg.Settings.ReloadIntervals.Pods, commomLabel) + podsScraper := internal.NewScraper(ctx, internal.ScraperTypePods, r.cfg.Endpoint, r.cfg.Namespace, r.cfg.TLSSetting, r.cfg.Pods, r.cfg.Settings.ReloadIntervals.Pods, commonLabel) if scCfgs, err := podsScraper.ToPrometheusReceiverConfig(compHost, fact); err == nil { scrapeCfgs = append(scrapeCfgs, scCfgs...) } else { diff --git a/receiver/purefbreceiver/metrics_receiver.go b/receiver/purefbreceiver/metrics_receiver.go index 8f373e5cdcaf..ca7c7277116f 100644 --- a/receiver/purefbreceiver/metrics_receiver.go +++ b/receiver/purefbreceiver/metrics_receiver.go @@ -38,27 +38,27 @@ func (r *purefbMetricsReceiver) Start(ctx context.Context, compHost component.Ho fact := prometheusreceiver.NewFactory() scrapeCfgs := []*config.ScrapeConfig{} - commomLabel := model.LabelSet{ + commonLabel := model.LabelSet{ "env": model.LabelValue(r.cfg.Env), "fb_array_name": model.LabelValue(r.cfg.Endpoint), "host": model.LabelValue(r.cfg.Endpoint), } - arrScraper := internal.NewScraper(ctx, internal.ScraperTypeArray, r.cfg.Endpoint, r.cfg.Arrays, r.cfg.Settings.ReloadIntervals.Array, commomLabel) + arrScraper := internal.NewScraper(ctx, internal.ScraperTypeArray, r.cfg.Endpoint, r.cfg.Arrays, r.cfg.Settings.ReloadIntervals.Array, commonLabel) if scCfgs, err := arrScraper.ToPrometheusReceiverConfig(compHost, fact); err == nil { scrapeCfgs = append(scrapeCfgs, scCfgs...) } else { return err } - clientsScraper := internal.NewScraper(ctx, internal.ScraperTypeClients, r.cfg.Endpoint, r.cfg.Clients, r.cfg.Settings.ReloadIntervals.Clients, commomLabel) + clientsScraper := internal.NewScraper(ctx, internal.ScraperTypeClients, r.cfg.Endpoint, r.cfg.Clients, r.cfg.Settings.ReloadIntervals.Clients, commonLabel) if scCfgs, err := clientsScraper.ToPrometheusReceiverConfig(compHost, fact); err == nil { scrapeCfgs = append(scrapeCfgs, scCfgs...) } else { return err } - usageScraper := internal.NewScraper(ctx, internal.ScraperTypeUsage, r.cfg.Endpoint, r.cfg.Usage, r.cfg.Settings.ReloadIntervals.Usage, commomLabel) + usageScraper := internal.NewScraper(ctx, internal.ScraperTypeUsage, r.cfg.Endpoint, r.cfg.Usage, r.cfg.Settings.ReloadIntervals.Usage, commonLabel) if scCfgs, err := usageScraper.ToPrometheusReceiverConfig(compHost, fact); err == nil { scrapeCfgs = append(scrapeCfgs, scCfgs...) } else { diff --git a/receiver/receivercreator/README.md b/receiver/receivercreator/README.md index 4fe12d38bcbe..8cee77686306 100644 --- a/receiver/receivercreator/README.md +++ b/receiver/receivercreator/README.md @@ -458,7 +458,7 @@ receiver_creator/metrics: # ignore_receivers: [] ``` -Find bellow the supported annotations that user can define to automatically enable receivers to start +See below for the supported annotations that user can define to automatically enable receivers to start collecting metrics and logs signals from the target Pods/containers. ### Supported metrics annotations @@ -506,7 +506,7 @@ io.opentelemetry.discovery.metrics.80/config: | where `80` is the port that the target container exposes. If a Pod is annotated with both container level hints and pod level hints the container level hints have priority and -the Pod level hints are used as a fallback (see detailed example bellow). +the Pod level hints are used as a fallback (see detailed example below). The current implementation relies on the implementation of `k8sobserver` extension and specifically the [pod_endpoint](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.111.0/extension/observer/k8sobserver/pod_endpoint.go). @@ -572,7 +572,7 @@ io.opentelemetry.discovery.logs.busybox/config: | where `busybox` is the name of the target container. If a Pod is annotated with both container level hints and pod level hints the container level hints have priority and -the Pod level hints are used as a fallback (see detailed example bellow). +the Pod level hints are used as a fallback (see detailed example below). The current implementation relies on the implementation of `k8sobserver` extension and specifically the [pod_endpoint](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.111.0/extension/observer/k8sobserver/pod_endpoint.go). diff --git a/receiver/receivercreator/discovery.go b/receiver/receivercreator/discovery.go index a640b1385440..12c72d6d33d8 100644 --- a/receiver/receivercreator/discovery.go +++ b/receiver/receivercreator/discovery.go @@ -281,14 +281,14 @@ func validateEndpoint(endpoint, defaultEndpoint string) error { if uri == nil { u, err := url.Parse("http://" + endpoint) if err != nil { - return fmt.Errorf("could not parse enpoint") + return fmt.Errorf("could not parse endpoint") } uri = u } // configured endpoint should include the target Pod's endpoint if uri.Host != defaultEndpoint { - return fmt.Errorf("configured enpoint should include target Pod's endpoint") + return fmt.Errorf("configured endpoint should include target Pod's endpoint") } return nil } diff --git a/receiver/redisreceiver/integration_test.go b/receiver/redisreceiver/integration_test.go index cd8db87a67c5..65fea884d6f2 100644 --- a/receiver/redisreceiver/integration_test.go +++ b/receiver/redisreceiver/integration_test.go @@ -52,7 +52,7 @@ func TestIntegrationV6(t *testing.T) { } func TestIntegrationV7Cluster(t *testing.T) { - t.Skip("Skipping due to flakieness, possibly related to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30411") + t.Skip("Skipping due to flakiness, possibly related to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30411") scraperinttest.NewIntegrationTest( NewFactory(), scraperinttest.WithContainerRequest(testcontainers.ContainerRequest{ diff --git a/receiver/redisreceiver/redis_scraper.go b/receiver/redisreceiver/redis_scraper.go index 4c7311bfc86e..51eff8ee1777 100644 --- a/receiver/redisreceiver/redis_scraper.go +++ b/receiver/redisreceiver/redis_scraper.go @@ -195,7 +195,7 @@ func (rs *redisScraper) recordCmdMetrics(ts pcommon.Timestamp, inf info) { } } -// recordCmdStatsMetrics records metrics for a particlar Redis command. +// recordCmdStatsMetrics records metrics for a particular Redis command. // Only 'calls' and 'usec' are recorded at the moment. // 'cmd' is the Redis command, 'val' is the values string (e.g. "calls=1685,usec=6032,usec_per_call=3.58,rejected_calls=0,failed_calls=0"). func (rs *redisScraper) recordCmdStatsMetrics(ts pcommon.Timestamp, cmd, val string) { diff --git a/receiver/vcenterreceiver/config_test.go b/receiver/vcenterreceiver/config_test.go index 1dd5e8aa2fe6..aa19533d9e9a 100644 --- a/receiver/vcenterreceiver/config_test.go +++ b/receiver/vcenterreceiver/config_test.go @@ -50,7 +50,7 @@ func TestConfigValidation(t *testing.T) { expectedErr: errors.New("url scheme must be http or https"), }, { - desc: "unparseable URL", + desc: "unparsable URL", cfg: Config{ Endpoint: "h" + string(rune(0x7f)), ClientConfig: configtls.ClientConfig{},