From 73593836a6d7be626d75b3d4a32e529df46dc05a Mon Sep 17 00:00:00 2001 From: asmyasnikov <79263256394@ya.ru> Date: Sat, 30 Oct 2021 10:31:26 +0300 Subject: [PATCH] Added chapter to README.md about ecosystem of debug tools --- CHANGELOG.md | 1 + README.md | 22 +++++++++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fcdde02e..35e833a0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 3.2.3 * Fixed bug of interpret tilda in path of certificates file +* Added chapter to `README.md` about ecosystem of debug tools over `ydb-go-sdk` ## 3.2.2 * Fixed result type of `RawValue.String` (ydb string compatible) diff --git a/README.md b/README.md index 88877a72f..0acdf6811 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ 5. [Usage](#Usage) 6. [Credentials](#Credentials) 7. [Environment variables](#Environ) -8. [Examples](#examples) +8. [Ecosystem of debug tools](#Debug) +9. [Examples](#Examples) ## Overview @@ -57,7 +58,6 @@ go get -u github.com/ydb-platform/ydb-go-sdk/v3 The straightforward example of querying data may look similar to this: ```go - // Determine timeout for connect or do nothing ctx := context.Background() // connect package helps to connect to database, returns connection object which @@ -148,6 +148,8 @@ reduce boilerplate overhead for such cases `ydb-go-sdk` provides generic retry l ## Credentials There are different variants to get `ydb.Credentials` object to get authorized. +Spatial cases of credentials for `yandex-cloud` provides with package [ydb-go-yc](https://github.com/ydb-platform/ydb-go-yc) +Package [ydb-go-sdk-auth-environ](https://github.com/ydb-platform/ydb-go-sdk-auth-environ) provide different credentials depending on the environment variables. Usage examples can be found [here](https://github.com/ydb-platform/ydb-go-examples/tree/master/cmd/auth). ## Environment variables @@ -157,7 +159,21 @@ Name | Type | Default | Description `YDB_SSL_ROOT_CERTIFICATES_FILE` | `string` | | path to certificates file `YDB_LOG_SEVERITY_LEVEL` | `string` | `quiet` | severity logging level. Supported: `trace`, `debug`, `info`, `warn`, `error`, `fatal`, `quiet` -## Examples +## Ecosystem of debug tools over `ydb-go-sdk` + +Package ydb-go-sdk provide debugging over trace events in package `trace`. +Now supports driver events in `trace.Driver` struct and table-service events in `trace.Table` struct. +Next packages provide debug tooling: + +Package | Type | Description | Link of example usage +--- | --- | --- | --- +[ydb-go-sdk-zap](https://github.com/ydb-platform/ydb-go-sdk-zap) | logging | logging ydb-go-sdk events with zap package | [trace.Driver](https://github.com/ydb-platform/ydb-go-sdk-zap/blob/master/internal/cmd/bench/main.go#L71) [trace.Table](https://github.com/ydb-platform/ydb-go-sdk-zap/blob/master/internal/cmd/bench/main.go#L75) +[ydb-go-sdk-zerolog](https://github.com/ydb-platform/ydb-go-sdk-zap) | logging | logging ydb-go-sdk events with zerolog package | [trace.Driver](https://github.com/ydb-platform/ydb-go-sdk-zerolog/blob/master/internal/cmd/bench/main.go#L48) [trace.Table](https://github.com/ydb-platform/ydb-go-sdk-zerolog/blob/master/internal/cmd/bench/main.go#L52) +[ydb-go-sdk-metrics](https://github.com/ydb-platform/ydb-go-sdk-metrics) | metrics | common metrics of ydb-go-sdk. Package declare interfaces such as `Registry`, `GaugeVec` and `Gauge` and use it for create `trace.Driver` and `trace.Table` traces | +[ydb-go-sdk-prometheus](https://github.com/ydb-platform/ydb-go-sdk-prometheus) | metrics | metrics of ydb-go-sdk. Package use [ydb-go-sdk-metrics](https://github.com/ydb-platform/ydb-go-sdk-metrics) package and prometheus types for create `trace.Driver` and `trace.Table` traces | [trace.Driver](https://github.com/ydb-platform/ydb-go-sdk-prometheus/blob/master/internal/cmd/bench/main.go#L87) [trace.Table](https://github.com/ydb-platform/ydb-go-sdk-prometheus/blob/master/internal/cmd/bench/main.go#L91) +ydb-go-sdk-opentracing | tracing | WIP | + +## Examples More examples are listed in [examples](https://github.com/ydb-platform/ydb-go-examples) repository.