Skip to content

Commit

Permalink
lint: remove old comments and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahkm committed Sep 18, 2024
1 parent 7d4b68c commit 456ebcb
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 24 deletions.
1 change: 0 additions & 1 deletion contrib/IBM/sarama/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func defaults(cfg *config) {

cfg.dataStreamsEnabled = instr.DataStreamsEnabled()

// cfg.analyticsRate = globalconfig.AnalyticsRate()
cfg.analyticsRate = instr.AnalyticsRate(false)
}

Expand Down
4 changes: 2 additions & 2 deletions contrib/aws/aws-sdk-go/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ func init() {

const (
// SendHandlerName is the name of the Datadog NamedHandler for the Send phase of an awsv1 request
SendHandlerName = "github.com/DataDog/dd-trace-go/contrib/aws/aws-sdk-go/aws/handlers.Send"
SendHandlerName = "github.com/DataDog/dd-trace-go/contrib/aws/aws-sdk-go/v2/aws/handlers.Send"
// CompleteHandlerName is the name of the Datadog NamedHandler for the Complete phase of an awsv1 request
CompleteHandlerName = "github.com/DataDog/dd-trace-go/contrib/aws/aws-sdk-go/aws/handlers.Complete"
CompleteHandlerName = "github.com/DataDog/dd-trace-go/contrib/aws/aws-sdk-go/v2/aws/handlers.Complete"
)

type handlers struct {
Expand Down
1 change: 0 additions & 1 deletion contrib/database/sql/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ func (fn OptionFn) apply(cfg *config) {
type registerConfig = config

func defaults(cfg *config, driverName string, rc *registerConfig) {
// cfg.analyticsRate = globalconfig.AnalyticsRate()
cfg.analyticsRate = instr.AnalyticsRate(false)
mode := os.Getenv("DD_DBM_PROPAGATION_MODE")
if mode == "" {
Expand Down
3 changes: 1 addition & 2 deletions contrib/gin-gonic/gin/appsec.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ import (
"github.com/gin-gonic/gin"
)

// useAppSec executes the AppSec logic related to the operation start and
// returns the function to be executed upon finishing the operation
// useAppSec executes the AppSec logic related to the operation start
func useAppSec(c *gin.Context, span *tracer.Span) {
var params map[string]string
if l := len(c.Params); l > 0 {
Expand Down
2 changes: 0 additions & 2 deletions contrib/google.golang.org/grpc/stats_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package grpc

import (
"context"
"fmt"
"testing"

"github.com/DataDog/dd-trace-go/instrumentation/testutils/grpc/v2/fixturepb"
Expand Down Expand Up @@ -47,7 +46,6 @@ func TestServerStatsHandler(t *testing.T) {
assert.True(span.FinishTime().Sub(span.StartTime()) >= 0)
assert.Equal("grpc.server", span.OperationName())
tags := span.Tags()
fmt.Printf("TAGS: %v\n", tags)
assert.Equal(ext.AppTypeRPC, tags["span.type"])
assert.Equal(codes.OK.String(), tags["grpc.code"])
assert.Equal(serviceName, tags["service.name"])
Expand Down
4 changes: 2 additions & 2 deletions contrib/hashicorp/vault/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func ExampleWrapHTTPClient() {
c := &http.Client{
CheckRedirect: func(r *http.Request, via []*http.Request) error {
if len(via) > 5 {
return fmt.Errorf("won't perform more that 5 redirects")
return fmt.Errorf("won't perform more than 5 redirects")
}
return nil
},
Expand All @@ -74,7 +74,7 @@ func ExampleWrapHTTPClient_withOptions() {
c := &http.Client{
CheckRedirect: func(r *http.Request, via []*http.Request) error {
if len(via) > 5 {
return fmt.Errorf("won't perform more that 5 redirects")
return fmt.Errorf("won't perform more than 5 redirects")
}
return nil
},
Expand Down
11 changes: 0 additions & 11 deletions contrib/jackc/pgx.v5/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,13 @@ func WithTraceAcquire(enabled bool) Option {
}

// WithTracePrepare enables tracing prepared statements.
//
// conn, err := pgx.Connect(ctx, "postgres://user:pass@example.com:5432/dbname", pgx.WithTraceConnect())
// if err != nil {
// // handle err
// }
// defer conn.Close(ctx)
//
// _, err := conn.Prepare(ctx, "stmt", "select $1::integer")
// row, err := conn.QueryRow(ctx, "stmt", 1)
func WithTracePrepare(enabled bool) Option {
return func(c *config) {
c.tracePrepare = enabled
}
}

// WithTraceConnect enables tracing calls to Connect and ConnectConfig.
//
// pgx.Connect(ctx, "postgres://user:pass@example.com:5432/dbname", pgx.WithTraceConnect())
func WithTraceConnect(enabled bool) Option {
return func(c *config) {
c.traceConnect = enabled
Expand Down
3 changes: 0 additions & 3 deletions contrib/labstack/echo.v4/echotrace.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
// Copyright 2016 Datadog, Inc.

// Package echo provides functions to trace the labstack/echo package (https://github.com/labstack/echo).
// WARNING: The underlying v3 version of labstack/echo has known security vulnerabilities that have been resolved in v4
// and is no longer under active development. As such consider this package deprecated.
// It is highly recommended that you update to the latest version available at labstack/echo.v4.
package echo

import (
Expand Down

0 comments on commit 456ebcb

Please sign in to comment.