Skip to content

Commit

Permalink
[chore] Spelling connector + extension (open-telemetry#37135)
Browse files Browse the repository at this point in the history
#### Description

Fix spelling in connector/ + extension/

open-telemetry#37128 (review)

I can split this into two distinct items, but 45 files seems like a
digestible chunk...

#### Link to tracking issue

* open-telemetry#37128

---------

Signed-off-by: Josh Soref <[email protected]>
  • Loading branch information
jsoref authored Feb 12, 2025
1 parent a52da76 commit b380b78
Show file tree
Hide file tree
Showing 44 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion connector/countconnector/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ func TestTracesToMetrics(t *testing.T) {
// - (no attributes)
//
// - The size metrics have the following sets of types:
// - int gauge, double gauge, int sum, double sum, historgram, summary
// - int gauge, double gauge, int sum, double sum, histogram, summary
//
// - The four data points on each metric have the following sets of attributes:
// - datapoint.required: foo, datapoint.optional: bar
Expand Down
2 changes: 1 addition & 1 deletion connector/exceptionsconnector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ service:
exporters: [loki]
```

The full list of settings exposed for this connector are documented [here](../../connector/exceptionsconnector/config.go).
The full list of settings exposed for this connector are documented in [exceptionsconnector/config.go](../../connector/exceptionsconnector/config.go).
### More Examples

For more example configuration covering various other use cases, please visit the [testdata directory](../../connector/exceptionsconnector/testdata).
Expand Down
2 changes: 1 addition & 1 deletion connector/routingconnector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The following settings are available:

## Additional Settings

The full list of settings exposed for this connector are documented [here](./config.go) with detailed sample configuration files:
The full list of settings exposed for this connector are documented in [config.go](./config.go) with detailed sample configuration files:

- [logs](./testdata/config/logs.yaml)
- [metrics](./testdata/config/metrics.yaml)
Expand Down
2 changes: 1 addition & 1 deletion connector/routingconnector/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestCreationFailsWithIncorrectConsumer(t *testing.T) {
}},
}

// in the real world, the factory will always receive a consumer with a concerete type of a
// in the real world, the factory will always receive a consumer with a concrete type of a
// connector router. this tests failure when a consumer of another type is passed in.
consumer := &consumertest.TracesSink{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func TestNewLogs(t *testing.T) {
)))
})

t.Run("asymetrical_scopes", func(t *testing.T) {
t.Run("asymmetrical_scopes", func(t *testing.T) {
expected := func() plog.Logs {
ld := plog.NewLogs()
r := ld.ResourceLogs().AppendEmpty()
Expand Down
6 changes: 3 additions & 3 deletions connector/routingconnector/internal/ptraceutil/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import "go.opentelemetry.io/collector/pdata/ptrace"
// MoveResourcesIf calls f sequentially for each ResourceSpans present in the first ptrace.Traces.
// If f returns true, the element is removed from the first ptrace.Traces and added to the second ptrace.Traces.
func MoveResourcesIf(from, to ptrace.Traces, f func(ptrace.ResourceSpans) bool) {
from.ResourceSpans().RemoveIf(func(resoruceSpans ptrace.ResourceSpans) bool {
if !f(resoruceSpans) {
from.ResourceSpans().RemoveIf(func(resourceSpans ptrace.ResourceSpans) bool {
if !f(resourceSpans) {
return false
}
resoruceSpans.CopyTo(to.ResourceSpans().AppendEmpty())
resourceSpans.CopyTo(to.ResourceSpans().AppendEmpty())
return true
})
}
Expand Down
6 changes: 3 additions & 3 deletions connector/signaltometricsconnector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ histogram:
recorded in the histogram from the incoming data. If no expression is provided
then it defaults to the count of the signal. [OTTL converters](https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#readme-converters)
can be used to transform the data. For spans, a special converter [adjusted count](#custom-ottl-functions),
is provided to help calculte the span's [adjusted count](https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling-experimental/#adjusted-count).
is provided to help calculate the span's [adjusted count](https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling-experimental/#adjusted-count).
- [**Required**] `value` represents an OTTL expression to extract the value to be
recorded in the histogram from the incoming data. [OTTL converters](https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#readme-converters)
can be used to transform the data.
Expand All @@ -125,10 +125,10 @@ exponential_histogram:
- [**Optional**] `max_size` represents the maximum number of buckets per positive
or negative number range. Defaults to `160`.
- [**Optional**] `count` represents an OTTL expression to extract the count to be
recorded in the expoential histogram from the incoming data. If no expression
recorded in the exponential histogram from the incoming data. If no expression
is provided then it defaults to the count of the signal. [OTTL converters](https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#readme-converters)
can be used to transform the data. For spans, a special converter [adjusted count](#custom-ottl-functions),
is provided to help calculte the span's [adjusted count](https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling-experimental/#adjusted-count).
is provided to help calculate the span's [adjusted count](https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling-experimental/#adjusted-count).
- [**Required**] `value` represents an OTTL expression to extract the value to be
recorded in the exponential histogram from the incoming data. [OTTL converters](https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#readme-converters)
can be used to transform the data.
Expand Down
4 changes: 2 additions & 2 deletions connector/signaltometricsconnector/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ type MetricInfo struct {
// attribute is included in the list then all attributes are included.
IncludeResourceAttributes []Attribute `mapstructure:"include_resource_attributes"`
Attributes []Attribute `mapstructure:"attributes"`
// Conditions are a set of OTTL condtions which are ORed. Data is
// Conditions are a set of OTTL conditions which are ORed. Data is
// processed into metrics only if the sequence evaluates to true.
Conditions []string `mapstructure:"conditions"`
Histogram *Histogram `mapstructure:"histogram"`
Expand Down Expand Up @@ -266,7 +266,7 @@ func validateMetricInfo[K any](mi MetricInfo, parser ottl.Parser[K]) error {
return fmt.Errorf("exactly one of the metrics must be defined, %d found", metricsDefinedCount)
}

// validate OTTL statements, note that, here we only evalaute if statements
// validate OTTL statements, note that, here we only evaluate if statements
// are valid. Check for required statements is left to the other validations.
if _, err := parser.ParseStatements(statements); err != nil {
return fmt.Errorf("failed to parse OTTL statements: %w", err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type explicitHistogramDP struct {

// counts represents the count values of histogram for each bucket. The sum of
// counts across all buckets must be equal to the count variable. The length of
// counts must be one greather than the length of bounds slice.
// counts must be one greater than the length of bounds slice.
counts []uint64
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// Get is a temporary OTTL editor to allow statements to return values. This
// will be removed after OTTL can parse data retrival expressions:
// will be removed after OTTL can parse data retrieval expressions:
// See: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/35621

type GetArguments[K any] struct {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
signaltometrics:
datapoints:
- name: gauge.to.exphistogram
description: An exponential histogram created from gague values
description: An exponential histogram created from gauge values
include_resource_attributes:
- key: resource.foo
attributes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resourceMetrics:
stringValue: test
scopeMetrics:
- metrics:
- description: An exponential histogram created from gague values
- description: An exponential histogram created from gauge values
exponentialHistogram:
aggregationTemporality: 1
dataPoints:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
signaltometrics:
datapoints:
- name: gauge.to.histogram
description: A histogram created from gague values
description: A histogram created from gauge values
include_resource_attributes:
- key: resource.foo
attributes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ resourceMetrics:
stringValue: test
scopeMetrics:
- metrics:
- description: A histogram created from gague values
- description: A histogram created from gauge values
histogram:
aggregationTemporality: 1
dataPoints:
Expand Down
2 changes: 1 addition & 1 deletion connector/spanmetricsconnector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ The following is a simple example usage of the `spanmetrics` connector.

For configuration examples on other use cases, please refer to [More Examples](#more-examples).

The full list of settings exposed for this connector are documented [here](../../connector/spanmetricsconnector/config.go).
The full list of settings exposed for this connector are documented in [spanmetricsconnector/config.go](../../connector/spanmetricsconnector/config.go).

```yaml
receivers:
Expand Down
2 changes: 1 addition & 1 deletion connector/sumconnector/connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func TestTracesToMetrics(t *testing.T) {
// - (no attributes)
//
// - The size metrics have the following sets of types:
// - int gauge, double gauge, int sum, double sum, historgram, summary
// - int gauge, double gauge, int sum, double sum, histogram, summary
//
// - The four data points on each metric have the following sets of attributes:
// - datapoint.required: foo, datapoint.optional: bar
Expand Down
6 changes: 3 additions & 3 deletions extension/encoding/avrologencodingextension/extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
)

func TestExtension_Start_Shutdown(t *testing.T) {
avroExtention := &avroLogExtension{}
avroExtension := &avroLogExtension{}

err := avroExtention.Start(context.Background(), componenttest.NewNopHost())
err := avroExtension.Start(context.Background(), componenttest.NewNopHost())
require.NoError(t, err)

err = avroExtention.Shutdown(context.Background())
err = avroExtension.Shutdown(context.Background())
require.NoError(t, err)
}

Expand Down
6 changes: 3 additions & 3 deletions extension/healthcheckextension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ liveness and/or readiness probe on Kubernetes.

The following settings are required:

- `endpoint` (default = localhost:13133): Address to publish the health check status. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). See our [security best practices doc](https://opentelemetry.io/docs/security/config-best-practices/#protect-against-denial-of-service-attacks) to understand how to set the endpoint in different environments.
- `endpoint` (default = localhost:13133): Address to publish the health check status. You can review the [full list of `ServerConfig`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). See our [security best practices doc](https://opentelemetry.io/docs/security/config-best-practices/#protect-against-denial-of-service-attacks) to understand how to set the endpoint in different environments.
- `path` (default = "/"): Specifies the path to be configured for the health check server.
- `response_body` (default = ""): Specifies a static body that overrides the default response returned by the health check service.

Expand All @@ -47,5 +47,5 @@ extensions:
path: "/health/status"
```
The full list of settings exposed for this exporter is documented [here](./config.go)
with detailed sample configurations [here](./testdata/config.yaml).
The full list of settings exposed for this exporter is documented in [config.go](./config.go)
with detailed sample configurations in [testdata/config.yaml](./testdata/config.yaml).
4 changes: 2 additions & 2 deletions extension/healthcheckv2extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ liveness and/or readiness probe on Kubernetes.

The following settings are required:

- `endpoint` (default = localhost:13133): Address to publish the health check status. For full list of `ServerConfig` refer [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). See our [security best practices doc](https://opentelemetry.io/docs/security/config-best-practices/#protect-against-denial-of-service-attacks) to understand how to set the endpoint in different environments.
- `endpoint` (default = localhost:13133): Address to publish the health check status. You can review the [full list of `ServerConfig`](https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp). See our [security best practices doc](https://opentelemetry.io/docs/security/config-best-practices/#protect-against-denial-of-service-attacks) to understand how to set the endpoint in different environments.
- `path` (default = "/"): Specifies the path to be configured for the health check server.
- `response_body` (default = ""): Specifies a static body that overrides the default response returned by the health check service.
- `check_collector_pipeline:` (deprecated and ignored): Settings of collector pipeline health check
Expand Down Expand Up @@ -328,7 +328,7 @@ a response body such as:

**Non-detailed Response Example**

If the same request is made without the verbose flag, only the overall pipline status will be
If the same request is made without the verbose flag, only the overall pipeline status will be
returned. The component level statuses will be omitted.

```json
Expand Down
4 changes: 2 additions & 2 deletions extension/healthcheckv2extension/internal/grpc/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func TestCheck(t *testing.T) {
},
{
step: func() {
// permament error will be ignored
// permanent error will be ignored
server.aggregator.RecordStatus(
metrics.ExporterID,
componentstatus.NewPermanentErrorEvent(assert.AnError),
Expand Down Expand Up @@ -467,7 +467,7 @@ func TestCheck(t *testing.T) {
},
{
step: func() {
// permament error included
// permanent error included
server.aggregator.RecordStatus(
metrics.ExporterID,
componentstatus.NewPermanentErrorEvent(assert.AnError),
Expand Down
2 changes: 1 addition & 1 deletion extension/healthcheckv2extension/internal/http/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type ResponseBodyConfig struct {
}

// CheckCollectorPipelineConfig is legacy config that is currently ignored as the
// `check_collector_pipeline` feature in the original healtcheck extension was not working as
// `check_collector_pipeline` feature in the original healthcheck extension was not working as
// expected. This is here for backwards compatibility.
type CheckCollectorPipelineConfig struct {
// Enabled indicates whether to not enable collector pipeline check.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2570,7 +2570,7 @@ func TestStatus(t *testing.T) {
},
},
{
name: "pipeline non-existent",
name: "pipeline nonexistent",
legacyConfig: LegacyConfig{UseV2: true},
config: &Config{
ServerConfig: confighttp.ServerConfig{
Expand Down
4 changes: 2 additions & 2 deletions extension/httpforwarderextension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ The following settings can be optionally configured:
timeout: 5s
```
The full list of settings exposed for this exporter are documented [here](config.go)
with detailed sample configurations [here](testdata/config.yaml).
The full list of settings exposed for this exporter are documented in [config.go](./config.go)
with detailed sample configurations in [testdata/config.yaml](./testdata/config.yaml).
2 changes: 1 addition & 1 deletion extension/oauth2clientauthextension/extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func TestOAuthClientSettings(t *testing.T) {
TLSSetting: configtls.ClientConfig{
Config: configtls.Config{
CAFile: testCAFile,
CertFile: "doestexist.cert",
CertFile: "nonexistent.cert",
KeyFile: testKeyFile,
},
Insecure: false,
Expand Down
16 changes: 8 additions & 8 deletions extension/observer/ecsobserver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ NOTE: name of the service is **added** as label value with key `ServiceName`.
name_pattern: ^retail-.*$
---
# Example 2: Matches all container with name java-api in cash-app service
name_pattnern: ^cash-app$
name_pattern: ^cash-app$
container_name_pattern: ^java-api$
---
# Example 3: Override default metrics_path (i.e. /metrics)
Expand Down Expand Up @@ -329,7 +329,7 @@ Additional information from ECS and EC2.
- Labels, all the label value are encoded as string. (e.g. strconv.Itoa(123)).
- Go struct, all the non string types are converted. labels and tags are passed as `map[string]string`
instead of `[]KeyValue`
- Prometheus target, each `taget`
- Prometheus target, each `target`

```go
// PrometheusECSTarget contains address and labels extracted from a running ECS task
Expand Down Expand Up @@ -392,22 +392,22 @@ The pseudocode showing the overall flow.

```
NewECSSD() {
session := awsconfig.NewSssion()
session := awsconfig.NewSession()
ecsClient := awsecs.NewClient(session)
filters := config.NewFileters()
filters := config.NewFilters()
decorator := awsec2.NewClient(session)
for {
select {
case <- timer:
// Fetch ALL
tasks := ecsClient.FaetchAll()
tasks := ecsClient.FetchAll()
// Filter
filteredTasks := fileters.Apply(tasks)
filteredTasks := filters.Apply(tasks)
// Add EC2 info
decorator.Apply(filteredTask)
// Generate output
if writeResultFile {
writeFile(fileteredTasks, /etc/ecs_sd.yaml)
writeFile(filteredTasks, /etc/ecs_sd.yaml)
} else {
notifyObserver()
}
Expand All @@ -424,7 +424,7 @@ otel's own /metrics.
| Name | Type | Description |
|--------------------------------------|------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `discovered_targets` | int | Number of targets exported |
| `discovered_taskss` | int | Number of tasks that contains scrape target, should be smaller than targets unless each task only contains one target |
| `discovered_tasks` | int | Number of tasks that contains scrape target, should be smaller than targets unless each task only contains one target |
| `ignored_tasks` | int | Tasks ignored by filter, `discovered_tasks` and `ignored_tasks` should add up to `api_ecs_list_task_results`, one exception is API paging failed in the middle |
| `targets_matched_by_service` | int | ECS Service name based filter |
| `targets_matched_by_task_definition` | int | ECS TaskDefinition based filter |
Expand Down
2 changes: 1 addition & 1 deletion extension/observer/ecsobserver/docker_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
// NOTE: it's possible to make DockerLabelConfig part of CommonExporterConfig
// and use it both ServiceConfig and TaskDefinitionConfig.
// However, based on existing users, few people mix different types of filters.
// If that usecase arises in the future, we can rewrite the top level docker lable filter
// If that usecase arises in the future, we can rewrite the top level docker label filter
// using a task definition filter with arn_pattern:*.
type DockerLabelConfig struct {
CommonExporterConfig `mapstructure:",squash" yaml:",inline"`
Expand Down
Loading

0 comments on commit b380b78

Please sign in to comment.