This commit is contained in:
Kevin Glowacz 2024-10-31 16:50:45 -05:00 коммит произвёл GitHub
Родитель 9964c6e693
Коммит 12965bcb1b
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
7 изменённых файлов: 9 добавлений и 14 удалений

Просмотреть файл

@ -3,12 +3,13 @@
## 1.1.1 (Unreleased)
### Features Added
* Set all Telemetry spans to have the Kind of SpanKindClient
* Set request_charge and status_code on all trace spans
* Set all Telemetry spans to have the Kind of SpanKindClient. See [PR 23618](https://github.com/Azure/azure-sdk-for-go/pull/23618)
* Set request_charge and status_code on all trace spans. See [PR 23652](https://github.com/Azure/azure-sdk-for-go/pull/23652)
### Breaking Changes
### Bugs Fixed
* Pager Telemetry spans are now more consistent with the rest of the spans. See [PR 23658](https://github.com/Azure/azure-sdk-for-go/pull/23658)
### Other Changes

Просмотреть файл

@ -278,7 +278,6 @@ func (c *Client) NewQueryDatabasesPager(query string, o *QueryDatabasesOptions)
},
Fetcher: func(ctx context.Context, page *QueryDatabasesResponse) (QueryDatabasesResponse, error) {
var err error
// Move the span to the pager once https://github.com/Azure/azure-sdk-for-go/issues/23294 is fixed
spanName, err := getSpanNameForClient(c.accountEndpointUrl(), operationTypeQuery, resourceTypeDatabase, c.accountEndpointUrl().Hostname())
if err != nil {
return QueryDatabasesResponse{}, err
@ -307,7 +306,6 @@ func (c *Client) NewQueryDatabasesPager(query string, o *QueryDatabasesOptions)
return newDatabasesQueryResponse(azResponse)
},
Tracer: c.internal.Tracer(),
})
}

Просмотреть файл

@ -515,7 +515,6 @@ func (c *ContainerClient) NewQueryItemsPager(query string, partitionKey Partitio
},
Fetcher: func(ctx context.Context, page *QueryItemsResponse) (QueryItemsResponse, error) {
var err error
// Move the span to the pager once https://github.com/Azure/azure-sdk-for-go/issues/23294 is fixed
spanName, err := c.getSpanForItems(operationTypeQuery)
if err != nil {
return QueryItemsResponse{}, err
@ -544,7 +543,6 @@ func (c *ContainerClient) NewQueryItemsPager(query string, partitionKey Partitio
return newQueryResponse(azResponse)
},
Tracer: c.database.client.internal.Tracer(),
})
}

Просмотреть файл

@ -115,7 +115,6 @@ func (c *DatabaseClient) NewQueryContainersPager(query string, o *QueryContainer
},
Fetcher: func(ctx context.Context, page *QueryContainersResponse) (QueryContainersResponse, error) {
var err error
// Move the span to the pager once https://github.com/Azure/azure-sdk-for-go/issues/23294 is fixed
spanName, err := c.getSpanForDatabases(operationTypeQuery, resourceTypeCollection)
if err != nil {
return QueryContainersResponse{}, err
@ -144,7 +143,6 @@ func (c *DatabaseClient) NewQueryContainersPager(query string, o *QueryContainer
return newContainersQueryResponse(azResponse)
},
Tracer: c.client.internal.Tracer(),
})
}

Просмотреть файл

@ -11,7 +11,7 @@ import (
func TestContainerCRUD(t *testing.T) {
emulatorTests := newEmulatorTests(t)
client := emulatorTests.getClient(t, newSpanValidator(t, &spanMatcher{
ExpectedSpans: []string{"create_container aContainer", "read_container aContainer", "replace_container aContainer", "read_container_throughput aContainer", "replace_container_throughput aContainer", "delete_container aContainer"},
ExpectedSpans: []string{"create_container aContainer", "read_container aContainer", "query_containers containerCRUD", "replace_container aContainer", "read_container_throughput aContainer", "replace_container_throughput aContainer", "delete_container aContainer"},
}))
database := emulatorTests.createDatabase(t, context.TODO(), client, "containerCRUD")

Просмотреть файл

@ -11,7 +11,7 @@ import (
func TestDatabaseCRUD(t *testing.T) {
emulatorTests := newEmulatorTests(t)
client := emulatorTests.getClient(t, newSpanValidator(t, &spanMatcher{
ExpectedSpans: []string{"create_database baseDbTest", "read_database baseDbTest", "delete_database baseDbTest", "read_database_throughput baseDbTest"},
ExpectedSpans: []string{"create_database baseDbTest", "read_database baseDbTest", "query_databases localhost", "delete_database baseDbTest", "read_database_throughput baseDbTest"},
}))
database := DatabaseProperties{ID: "baseDbTest"}

Просмотреть файл

@ -13,7 +13,7 @@ import (
func TestSinglePartitionQueryWithIndexMetrics(t *testing.T) {
emulatorTests := newEmulatorTests(t)
client := emulatorTests.getClient(t, newSpanValidator(t, &spanMatcher{
ExpectedSpans: []string{},
ExpectedSpans: []string{"query_items aContainer"},
}))
database := emulatorTests.createDatabase(t, context.TODO(), client, "queryTests")
@ -88,7 +88,7 @@ func TestSinglePartitionQueryWithIndexMetrics(t *testing.T) {
func TestSinglePartitionQuery(t *testing.T) {
emulatorTests := newEmulatorTests(t)
client := emulatorTests.getClient(t, newSpanValidator(t, &spanMatcher{
ExpectedSpans: []string{},
ExpectedSpans: []string{"query_items aContainer"},
}))
database := emulatorTests.createDatabase(t, context.TODO(), client, "queryTests")
@ -176,7 +176,7 @@ func TestSinglePartitionQuery(t *testing.T) {
func TestSinglePartitionQueryWithParameters(t *testing.T) {
emulatorTests := newEmulatorTests(t)
client := emulatorTests.getClient(t, newSpanValidator(t, &spanMatcher{
ExpectedSpans: []string{},
ExpectedSpans: []string{"query_items aContainer"},
}))
database := emulatorTests.createDatabase(t, context.TODO(), client, "queryTests")
@ -228,7 +228,7 @@ func TestSinglePartitionQueryWithParameters(t *testing.T) {
func TestSinglePartitionQueryWithProjection(t *testing.T) {
emulatorTests := newEmulatorTests(t)
client := emulatorTests.getClient(t, newSpanValidator(t, &spanMatcher{
ExpectedSpans: []string{},
ExpectedSpans: []string{"query_items aContainer"},
}))
database := emulatorTests.createDatabase(t, context.TODO(), client, "queryTests")