From 778518bbffa489c38d48d1f4e88aa97c52b12ce6 Mon Sep 17 00:00:00 2001 From: Nhat Date: Tue, 17 May 2022 13:54:27 +0200 Subject: [PATCH] Bump semconv to v1.10.0 (#90) --- README.md | 64 ++++++++++++++++----------------- begin_internal_test.go | 2 +- driver.go | 2 +- driver_test.go | 2 +- exec_internal_test.go | 2 +- internal/test/oteltest/suite.go | 2 +- options.go | 2 +- ping_internal_test.go | 2 +- prepare_internal_test.go | 2 +- query_internal_test.go | 2 +- recorder.go | 2 +- stats_test.go | 2 +- tests/suite/observability.go | 2 +- tracer.go | 2 +- transaction_internal_test.go | 2 +- 15 files changed, 46 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 0e3e000..8e6f517 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ import ( "database/sql" "github.com/nhatthm/otelsql" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" ) func openDB(dsn string) (*sql.DB, error) { @@ -97,7 +97,7 @@ import ( "database/sql" "github.com/nhatthm/otelsql" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" ) func openDB(dsn string) (*sql.DB, error) { @@ -134,38 +134,38 @@ func openDB(dsn string) (*sql.DB, error) { **Driver Options** -| Option | Description | -|:-----------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `WithMeterProvider(metric.MeterProvider)` | Specify a meter provider | -| `WithTracerProvider(trace.TracerProvider)` | Specify a tracer provider | -| `WithDefaultAttributes(...attribute.KeyValue)` | Add extra attributes for the recorded spans and metrics | -| `WithInstanceName(string)` | Add an extra attribute for annotating the instance name | -| `WithSystem(attribute.KeyValue)` | Add an extra attribute for annotating the type of database server.
The value is set by using the well-known identifiers in `semconv`. For example: `semconv.DBSystemPostgreSQL`. See [more](https://github.com/open-telemetry/opentelemetry-go/blob/main/semconv/v1.7.0/trace.go#L37-L43) | -| `WithDatabaseName(string)` | Add an extra attribute for annotating the database name | -| `WithSpanNameFormatter(spanNameFormatter)` | Set a custom [span name formatter](#span-name-formatter) | -| `ConvertErrorToSpanStatus(errorToSpanStatus)` | Set a custom [converter for span status](#convert-error-to-span-status) | -| `DisableErrSkip()` | `sql.ErrSkip` is considered as `OK` in span status | -| `TraceQuery()` | Set a custom function for [tracing query](#trace-query) | -| `TraceQueryWithArgs()` | [Trace query](#trace-query) and all arguments | -| `TraceQueryWithoutArgs()` | [Trace query](#trace-query) without the arguments | -| `AllowRoot()` | Create root spans in absence of existing spans or even context | -| `TracePing()` | Enable the creation of spans on Ping requests | -| `TraceRowsNext()` | Enable the creation of spans on RowsNext calls. (This can result in many spans) | -| `TraceRowsClose()` | Enable the creation of spans on RowsClose calls | -| `TraceRowsAffected()` | Enable the creation of spans on RowsAffected calls | -| `TraceLastInsertID()` | Enable the creation of spans on LastInsertId call | -| `TraceAll()` | Turn on all tracing options, including `AllowRoot()` and `TraceQueryWithArgs()` | +| Option | Description | +|:-----------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `WithMeterProvider(metric.MeterProvider)` | Specify a meter provider | +| `WithTracerProvider(trace.TracerProvider)` | Specify a tracer provider | +| `WithDefaultAttributes(...attribute.KeyValue)` | Add extra attributes for the recorded spans and metrics | +| `WithInstanceName(string)` | Add an extra attribute for annotating the instance name | +| `WithSystem(attribute.KeyValue)` | Add an extra attribute for annotating the type of database server.
The value is set by using the well-known identifiers in `semconv`. For example: `semconv.DBSystemPostgreSQL`. See [more](https://github.com/open-telemetry/opentelemetry-go/blob/main/semconv/v1.10.0/trace.go#L37-L43) | +| `WithDatabaseName(string)` | Add an extra attribute for annotating the database name | +| `WithSpanNameFormatter(spanNameFormatter)` | Set a custom [span name formatter](#span-name-formatter) | +| `ConvertErrorToSpanStatus(errorToSpanStatus)` | Set a custom [converter for span status](#convert-error-to-span-status) | +| `DisableErrSkip()` | `sql.ErrSkip` is considered as `OK` in span status | +| `TraceQuery()` | Set a custom function for [tracing query](#trace-query) | +| `TraceQueryWithArgs()` | [Trace query](#trace-query) and all arguments | +| `TraceQueryWithoutArgs()` | [Trace query](#trace-query) without the arguments | +| `AllowRoot()` | Create root spans in absence of existing spans or even context | +| `TracePing()` | Enable the creation of spans on Ping requests | +| `TraceRowsNext()` | Enable the creation of spans on RowsNext calls. (This can result in many spans) | +| `TraceRowsClose()` | Enable the creation of spans on RowsClose calls | +| `TraceRowsAffected()` | Enable the creation of spans on RowsAffected calls | +| `TraceLastInsertID()` | Enable the creation of spans on LastInsertId call | +| `TraceAll()` | Turn on all tracing options, including `AllowRoot()` and `TraceQueryWithArgs()` | **Record Stats Options** -| Option | Description | -|:------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `WithMeterProvider(metric.MeterProvider)` | Specify a meter provider | -| `WithMinimumReadDBStatsInterval(time.Duration)` | The minimum interval between calls to db.Stats(). Negative values are ignored. | -| `WithDefaultAttributes(...attribute.KeyValue)` | Add extra attributes for the recorded metrics | -| `WithInstanceName(string)` | Add an extra attribute for annotating the instance name | -| `WithSystem(attribute.KeyValue)` | Add an extra attribute for annotating the type of database server.
The value is set by using the well-known identifiers in `semconv`. For example: `semconv.DBSystemPostgreSQL`. See [more](https://github.com/open-telemetry/opentelemetry-go/blob/main/semconv/v1.7.0/trace.go#L37-L43) | -| `WithDatabaseName(string)` | Add an extra attribute for annotating the database name | +| Option | Description | +|:------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `WithMeterProvider(metric.MeterProvider)` | Specify a meter provider | +| `WithMinimumReadDBStatsInterval(time.Duration)` | The minimum interval between calls to db.Stats(). Negative values are ignored. | +| `WithDefaultAttributes(...attribute.KeyValue)` | Add extra attributes for the recorded metrics | +| `WithInstanceName(string)` | Add an extra attribute for annotating the instance name | +| `WithSystem(attribute.KeyValue)` | Add an extra attribute for annotating the type of database server.
The value is set by using the well-known identifiers in `semconv`. For example: `semconv.DBSystemPostgreSQL`. See [more](https://github.com/open-telemetry/opentelemetry-go/blob/main/semconv/v1.10.0/trace.go#L37-L43) | +| `WithDatabaseName(string)` | Add an extra attribute for annotating the database name | [[table of contents]](#table-of-contents) @@ -322,7 +322,7 @@ import ( "github.com/nhatthm/otelsql" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" ) func openDB(dsn string) (*sql.DB, error) { diff --git a/begin_internal_test.go b/begin_internal_test.go index 14f82d7..70822c8 100644 --- a/begin_internal_test.go +++ b/begin_internal_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/metric/nonrecording" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "github.com/nhatthm/otelsql/internal/test/oteltest" ) diff --git a/driver.go b/driver.go index d4fbb42..d0cb155 100644 --- a/driver.go +++ b/driver.go @@ -13,7 +13,7 @@ import ( "go.opentelemetry.io/otel/metric/global" "go.opentelemetry.io/otel/metric/instrument" "go.opentelemetry.io/otel/metric/unit" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "go.opentelemetry.io/otel/trace" ) diff --git a/driver_test.go b/driver_test.go index 51403ef..e755bc2 100644 --- a/driver_test.go +++ b/driver_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "go.opentelemetry.io/otel/trace" "github.com/nhatthm/otelsql" diff --git a/exec_internal_test.go b/exec_internal_test.go index d49b693..0bef52c 100644 --- a/exec_internal_test.go +++ b/exec_internal_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/metric/nonrecording" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "github.com/nhatthm/otelsql/internal/test/oteltest" ) diff --git a/internal/test/oteltest/suite.go b/internal/test/oteltest/suite.go index 9208a25..13d98ba 100644 --- a/internal/test/oteltest/suite.go +++ b/internal/test/oteltest/suite.go @@ -20,7 +20,7 @@ import ( selector "go.opentelemetry.io/otel/sdk/metric/selector/simple" "go.opentelemetry.io/otel/sdk/resource" sdkTrace "go.opentelemetry.io/otel/sdk/trace" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "go.opentelemetry.io/otel/trace" testassert "github.com/nhatthm/otelsql/internal/test/assert" diff --git a/options.go b/options.go index b6bbf8b..f79170f 100644 --- a/options.go +++ b/options.go @@ -5,7 +5,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/metric" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "go.opentelemetry.io/otel/trace" ) diff --git a/ping_internal_test.go b/ping_internal_test.go index 16647f9..2a053b3 100644 --- a/ping_internal_test.go +++ b/ping_internal_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/metric/nonrecording" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "github.com/nhatthm/otelsql/internal/test/oteltest" ) diff --git a/prepare_internal_test.go b/prepare_internal_test.go index ff50828..20cad9e 100644 --- a/prepare_internal_test.go +++ b/prepare_internal_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/metric/nonrecording" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "github.com/nhatthm/otelsql/internal/test/oteltest" ) diff --git a/query_internal_test.go b/query_internal_test.go index 14c1d7e..5fae117 100644 --- a/query_internal_test.go +++ b/query_internal_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/metric/nonrecording" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "github.com/nhatthm/otelsql/internal/test/oteltest" ) diff --git a/recorder.go b/recorder.go index 9091d21..2ee4e9f 100644 --- a/recorder.go +++ b/recorder.go @@ -5,7 +5,7 @@ import ( "time" "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" ) // float64Recorder adds a new value to the list of Histogram's records. diff --git a/stats_test.go b/stats_test.go index b51b9d8..662fedc 100644 --- a/stats_test.go +++ b/stats_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "github.com/nhatthm/otelsql" "github.com/nhatthm/otelsql/internal/test/oteltest" diff --git a/tests/suite/observability.go b/tests/suite/observability.go index 42f7ec2..5f118c3 100644 --- a/tests/suite/observability.go +++ b/tests/suite/observability.go @@ -15,7 +15,7 @@ import ( processor "go.opentelemetry.io/otel/sdk/metric/processor/basic" selector "go.opentelemetry.io/otel/sdk/metric/selector/simple" "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" ) type observabilityTests struct { diff --git a/tracer.go b/tracer.go index 9537609..8c559be 100644 --- a/tracer.go +++ b/tracer.go @@ -9,7 +9,7 @@ import ( "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "go.opentelemetry.io/otel/trace" sqlattribute "github.com/nhatthm/otelsql/attribute" diff --git a/transaction_internal_test.go b/transaction_internal_test.go index 5924545..2709c50 100644 --- a/transaction_internal_test.go +++ b/transaction_internal_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + semconv "go.opentelemetry.io/otel/semconv/v1.10.0" "github.com/nhatthm/otelsql/internal/test/oteltest" )