Skip to content

Commit

Permalink
Fix typos in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Slotin committed Oct 29, 2020
1 parent 8062abd commit 07bf396
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 59 deletions.
2 changes: 1 addition & 1 deletion example/database/elasticsearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func fetchResults(parentSpan ot.Span) {
// Making an ElasticSearch query
childSpan := ot.StartSpan("elasticsearch", ot.ChildOf(parentSpan.Context()))

// Set the apropriate tags for the span
// Set the appropriate tags for the span
//
// Client Span
childSpan.SetTag(string(ext.SpanKind), string(ext.SpanKindRPCClientEnum))
Expand Down
4 changes: 2 additions & 2 deletions fargate_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (a *fargateAgent) SendSpans(spans []Span) error {
agentSpans = append(agentSpans, agentSpan{sp, from})
}

// enqueue the spans to send them in a bundle with metrics instead of sending immidiately
// enqueue the spans to send them in a bundle with metrics instead of sending immediately
a.mu.Lock()
a.spanQueue = append(a.spanQueue, agentSpans...)
a.mu.Unlock()
Expand Down Expand Up @@ -415,7 +415,7 @@ func (c *ecsDockerStatsCollector) fetchStats(ctx context.Context) {
if err != nil {
if ctx.Err() != nil {
// request either timed out or had been cancelled, keep the old value
c.logger.Debug("failed to retireve Docker container stats (timed out), skipping")
c.logger.Debug("failed to retrieve Docker container stats (timed out), skipping")
return
}

Expand Down
2 changes: 1 addition & 1 deletion gcr_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (a *gcrAgent) SendSpans(spans []Span) error {
agentSpans = append(agentSpans, agentSpan{sp, from})
}

// enqueue the spans to send them in a bundle with metrics instead of sending immidiately
// enqueue the spans to send them in a bundle with metrics instead of sending immediately
a.mu.Lock()
a.spanQueue = append(a.spanQueue, agentSpans...)
a.mu.Unlock()
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/instasarama/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewConsumer(addrs []string, config *sarama.Config, sensor *instana.Sensor)
return WrapConsumer(c, sensor), nil
}

// NewConsumerFromClient creates a new consumer using the given client and intruments its calls
// NewConsumerFromClient creates a new consumer using the given client and instruments its calls
func NewConsumerFromClient(client sarama.Client, sensor *instana.Sensor) (sarama.Consumer, error) {
c, err := sarama.NewConsumerFromClient(client)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/instasarama/consumer_group_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type ConsumerGroupHandler struct {
sensor *instana.Sensor
}

// WrapConsumerGroupHandler wraps the existing group handler and intruments its calls
// WrapConsumerGroupHandler wraps the existing group handler and instruments its calls
func WrapConsumerGroupHandler(h sarama.ConsumerGroupHandler, sensor *instana.Sensor) *ConsumerGroupHandler {
return &ConsumerGroupHandler{
handler: h,
Expand Down
4 changes: 2 additions & 2 deletions json_span.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ type HTTPSpanTags struct {
Host string `json:"host,omitempty"`
// The name of the protocol used for request ("http" or "https")
Protocol string `json:"protocol,omitempty"`
// The message describing an error occured during the request handling
// The message describing an error occurred during the request handling
Error string `json:"error,omitempty"`
}

Expand Down Expand Up @@ -360,7 +360,7 @@ type RPCSpanTags struct {
CallType string `json:"call_type,omitempty"`
// The RPC flavor used for this call, e.g. "grpc" for GRPC requests
Flavor string `json:"flavor,omitempty"`
// The message describing an error occured during the request handling
// The message describing an error occurred during the request handling
Error string `json:"error,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion propagation.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func injectTraceContext(sc SpanContext, opaqueCarrier interface{}) error {
// Even though the godoc claims that the key passed to (*http.Header).Set()
// is case-insensitive, it actually normalizes it using textproto.CanonicalMIMEHeaderKey()
// before populating the value. As a result headers with non-canonical will not be
// overwritted with a new value. This is only the case if header names were set while
// overwritten with a new value. This is only the case if header names were set while
// initializing the http.Header instance, i.e.
// h := http.Headers{"X-InStAnA-T": {"abc123"}}
// and does not apply to a common case when requests are being created using http.NewRequest()
Expand Down
100 changes: 50 additions & 50 deletions secrets/matchers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ import (
func TestEqualsMatcher(t *testing.T) {
m := secrets.NewEqualsMatcher("one", "two")
examples := map[string]bool{
"": false,
"one": true,
"two": true,
"ONE": false,
"tWo": false,
"onetwo": false,
"two ": false,
" one": false,
"fourty-two": false,
"hello!": false,
"": false,
"one": true,
"two": true,
"ONE": false,
"tWo": false,
"onetwo": false,
"two ": false,
" one": false,
"forty-two": false,
"hello!": false,
}

for s, expected := range examples {
Expand All @@ -34,16 +34,16 @@ func TestEqualsMatcher(t *testing.T) {
func TestEqualsIgnoreCaseMatcher(t *testing.T) {
m := secrets.NewEqualsIgnoreCaseMatcher("One", "TWO")
examples := map[string]bool{
"": false,
"one": true,
"two": true,
"ONE": true,
"tWo": true,
"onetwo": false,
"two ": false,
" one": false,
"fourty-two": false,
"hello!": false,
"": false,
"one": true,
"two": true,
"ONE": true,
"tWo": true,
"onetwo": false,
"two ": false,
" one": false,
"forty-two": false,
"hello!": false,
}

for s, expected := range examples {
Expand All @@ -56,16 +56,16 @@ func TestEqualsIgnoreCaseMatcher(t *testing.T) {
func TestContainsMatcher(t *testing.T) {
m := secrets.NewContainsMatcher("one", "two")
examples := map[string]bool{
"": false,
"one": true,
"two": true,
"ONE": false,
"tWo": false,
"onetwo": true,
"two ": true,
" one": true,
"fourty-two": true,
"hello!": false,
"": false,
"one": true,
"two": true,
"ONE": false,
"tWo": false,
"onetwo": true,
"two ": true,
" one": true,
"forty-two": true,
"hello!": false,
}

for s, expected := range examples {
Expand All @@ -78,16 +78,16 @@ func TestContainsMatcher(t *testing.T) {
func TestContainsIgnoreCaseMatcher(t *testing.T) {
m := secrets.NewContainsIgnoreCaseMatcher("one", "two")
examples := map[string]bool{
"": false,
"one": true,
"two": true,
"ONE": true,
"tWo": true,
"onetwo": true,
"two ": true,
" one": true,
"fourty-TWO": true,
"hello!": false,
"": false,
"one": true,
"two": true,
"ONE": true,
"tWo": true,
"onetwo": true,
"two ": true,
" one": true,
"forty-TWO": true,
"hello!": false,
}

for s, expected := range examples {
Expand All @@ -102,16 +102,16 @@ func TestRegexpMatcher(t *testing.T) {
require.NoError(t, err)

examples := map[string]bool{
"": false,
"one": true,
"two": true,
"ONE": true,
"tWo": false,
"onetwo": false,
"two ": false,
" one": false,
"fourty-TWO": false,
"hello!": false,
"": false,
"one": true,
"two": true,
"ONE": true,
"tWo": false,
"onetwo": false,
"two ": false,
" one": false,
"forty-TWO": false,
"hello!": false,
}

for s, expected := range examples {
Expand Down

0 comments on commit 07bf396

Please sign in to comment.