From 3a8265788e4de628612d2929c205b1c6d5523469 Mon Sep 17 00:00:00 2001 From: Ian Oberst Date: Fri, 7 Aug 2026 15:45:11 -0700 Subject: [PATCH] Fix v2 Go module path Co-authored-by: Codex Ai-assisted: true --- README.md | 2 +- aws/aws.go | 2 +- aws/rds.go | 2 +- aws/rds_test.go | 6 +-- aws/secret.go | 2 +- bin/blip/main.go | 2 +- blip.go | 2 +- blip_test.go | 2 +- config_test.go | 2 +- dbconn/factory.go | 4 +- dbconn/factory_test.go | 6 +-- dbconn/mycnf.go | 2 +- dbconn/mycnf_test.go | 4 +- dbconn/password_secret_test.go | 2 +- dbconn/reload_password.go | 4 +- docs/content/about/release-notes.md | 16 +++++--- docs/content/cloud/aws.md | 4 +- docs/content/develop/domain-translator.md | 6 +-- docs/content/develop/events.md | 6 +-- docs/content/develop/integration-api.md | 22 +++++------ docs/content/develop/sinks.md | 6 +-- docs/content/intro/quick-start.md | 6 +-- docs/content/intro/sinks.md | 2 +- .../content/metrics/domains/autoinc/_index.md | 2 +- docs/content/metrics/quick-ref.md | 14 +++---- docs/content/metrics/reporting.md | 4 +- docs/content/monitors/mysql-connection.md | 4 +- errors/truncate_error.go | 2 +- errors/truncate_error_test.go | 4 +- event/event.go | 2 +- examples/copy-meta/go.mod | 6 +-- examples/copy-meta/plugin.go | 2 +- examples/copy-meta/plugin_test.go | 2 +- examples/custom-receiver/go.mod | 6 +-- examples/custom-receiver/go.sum | 4 +- examples/custom-receiver/main.go | 4 +- examples/custom-sink/go.mod | 6 +-- examples/custom-sink/go.sum | 4 +- examples/custom-sink/main.go | 6 +-- examples/integrate/go.mod | 6 +-- examples/integrate/go.sum | 4 +- examples/integrate/main.go | 8 ++-- go.mod | 2 +- ha/ha.go | 2 +- heartbeat/heartbeat_test.go | 8 ++-- heartbeat/reader.go | 6 +-- heartbeat/writer.go | 6 +-- metrics/autoinc/autoinc.go | 2 +- metrics/aws.rds/rds.go | 2 +- metrics/error/account.go | 2 +- metrics/error/error.go | 4 +- metrics/error/global.go | 2 +- metrics/error/host.go | 2 +- metrics/error/query.go | 4 +- metrics/error/query_test.go | 2 +- metrics/error/thread.go | 2 +- metrics/error/user.go | 2 +- metrics/factory.go | 38 +++++++++---------- metrics/innodb.buffer-pool/innodb.go | 4 +- metrics/innodb/innodb.go | 4 +- metrics/percona/mysql_qrt_histogram_test.go | 2 +- metrics/percona/qrt.go | 6 +-- metrics/query.response-time/response_time.go | 6 +-- .../query.response-time/response_time_test.go | 4 +- metrics/repl.lag/lag.go | 4 +- metrics/repl.lag/lag_test.go | 2 +- metrics/repl.lag/pfs.go | 2 +- metrics/repl/repl.go | 6 +-- metrics/size.binlog/binglog.go | 6 +-- metrics/size.database/database.go | 4 +- metrics/size.database/query.go | 4 +- metrics/size.database/query_test.go | 2 +- metrics/size.table/query_test.go | 2 +- metrics/size.table/table.go | 4 +- metrics/status.global/global.go | 4 +- metrics/stmt.current/current.go | 2 +- metrics/tls/tls.go | 4 +- metrics/trx/trx.go | 2 +- metrics/var.global/global.go | 4 +- metrics/var.global/global_test.go | 2 +- metrics/wait.io.table/query_test.go | 2 +- metrics/wait.io.table/table.go | 4 +- monitor/engine.go | 8 ++-- monitor/level_collector.go | 8 ++-- monitor/level_collector_test.go | 18 ++++----- monitor/loader.go | 16 ++++---- monitor/loader_test.go | 14 +++---- monitor/monitor.go | 14 +++---- monitor/monitor_test.go | 12 +++--- monitor/mysqld_exporter.go | 6 +-- monitor/mysqld_exporter_test.go | 8 ++-- monitor/plan_changer.go | 8 ++-- plan/default/exporter.go | 2 +- plan/default/mysql.go | 2 +- plan/default/none.go | 2 +- plan/loader.go | 10 ++--- plan/loader_test.go | 8 ++-- plan/sort.go | 2 +- plan/sort_test.go | 6 +-- plan_test.go | 6 +-- prom/prom.go | 4 +- prom/prom_test.go | 8 ++-- prom/tr.go | 4 +- prom/tr/generic.go | 2 +- prom/tr/innodb_metrics.go | 2 +- prom/tr/status.go | 2 +- secret_test.go | 2 +- server/api.go | 12 +++--- server/api_test.go | 16 ++++---- server/cmdline.go | 2 +- server/http_client_test.go | 2 +- server/server.go | 18 ++++----- server/server_test.go | 2 +- sink/chronosphere.go | 10 ++--- sink/datadog.go | 8 ++-- sink/datadog_api.go | 6 +-- sink/datadog_api_test.go | 2 +- sink/datadog_stream.go | 6 +-- sink/datadog_test.go | 4 +- sink/delta.go | 2 +- sink/delta_test.go | 4 +- sink/factory.go | 2 +- sink/log.go | 2 +- sink/prom_pushgateway.go | 8 ++-- sink/retry.go | 4 +- sink/retry_test.go | 4 +- sink/signalfx.go | 6 +-- sink/tr/tr.go | 2 +- sqlutil/percentile_test.go | 2 +- status/status_test.go | 2 +- test/mock/aws_rds.go | 4 +- test/mock/event.go | 2 +- test/mock/metrics.go | 2 +- test/mock/sink.go | 2 +- test/test.go | 2 +- 135 files changed, 345 insertions(+), 341 deletions(-) diff --git a/README.md b/README.md index b497b94a..790d43d3 100644 --- a/README.md +++ b/README.md @@ -19,4 +19,4 @@ Blip was created by engineers at [Cash App](https://cash.app) and [Square](https :link: [Contributions welcome](https://github.com/cashapp/blip/blob/main/CONTRIBUTING.md) -[![Go Reference](https://pkg.go.dev/badge/github.com/cashapp/blip.svg)](https://pkg.go.dev/github.com/cashapp/blip) \ No newline at end of file +[![Go Reference](https://pkg.go.dev/badge/github.com/cashapp/blip/v2.svg)](https://pkg.go.dev/github.com/cashapp/blip/v2) diff --git a/aws/aws.go b/aws/aws.go index da76d165..934da620 100644 --- a/aws/aws.go +++ b/aws/aws.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type ConfigFactory struct { diff --git a/aws/rds.go b/aws/rds.go index 3ec9956c..97f48bea 100644 --- a/aws/rds.go +++ b/aws/rds.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/rds" "github.com/go-sql-driver/mysql" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type RDSClient interface { diff --git a/aws/rds_test.go b/aws/rds_test.go index f24373d0..b12f1fb7 100644 --- a/aws/rds_test.go +++ b/aws/rds_test.go @@ -12,9 +12,9 @@ import ( //"github.com/stretchr/testify/assert" - "github.com/cashapp/blip" - blipAWS "github.com/cashapp/blip/aws" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + blipAWS "github.com/cashapp/blip/v2/aws" + "github.com/cashapp/blip/v2/test/mock" ) func TestRDSClient(t *testing.T) { diff --git a/aws/secret.go b/aws/secret.go index c7b3eb78..63ecb790 100644 --- a/aws/secret.go +++ b/aws/secret.go @@ -10,7 +10,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/service/secretsmanager" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type Secret struct { diff --git a/bin/blip/main.go b/bin/blip/main.go index 39967f83..785272e0 100644 --- a/bin/blip/main.go +++ b/bin/blip/main.go @@ -5,7 +5,7 @@ package main import ( "log" - "github.com/cashapp/blip/server" + "github.com/cashapp/blip/v2/server" ) func main() { diff --git a/blip.go b/blip.go index 0e9cdc20..eca16866 100644 --- a/blip.go +++ b/blip.go @@ -20,7 +20,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" ) -const VERSION = "2.0.0" +const VERSION = "2.0.1" var SHA = "" diff --git a/blip_test.go b/blip_test.go index 2e11ad71..6a1fceb2 100644 --- a/blip_test.go +++ b/blip_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) func TestTimeLimit(t *testing.T) { diff --git a/config_test.go b/config_test.go index ad9b0244..9068029a 100644 --- a/config_test.go +++ b/config_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) func TestMain(m *testing.M) { diff --git a/dbconn/factory.go b/dbconn/factory.go index 263b3678..407e7a3c 100644 --- a/dbconn/factory.go +++ b/dbconn/factory.go @@ -17,8 +17,8 @@ import ( "github.com/go-sql-driver/mysql" - "github.com/cashapp/blip" - "github.com/cashapp/blip/aws" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/aws" ) // rdsAddr matches Amazon RDS hostnames with optional :port suffix. diff --git a/dbconn/factory_test.go b/dbconn/factory_test.go index dfccf0ca..2cbe867c 100644 --- a/dbconn/factory_test.go +++ b/dbconn/factory_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "github.com/cashapp/blip" - "github.com/cashapp/blip/dbconn" - "github.com/cashapp/blip/test" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/dbconn" + "github.com/cashapp/blip/v2/test" ) func sysvar(db *sql.DB, name string) (string, error) { diff --git a/dbconn/mycnf.go b/dbconn/mycnf.go index b0c82b64..58bc406f 100644 --- a/dbconn/mycnf.go +++ b/dbconn/mycnf.go @@ -7,7 +7,7 @@ import ( "github.com/go-ini/ini" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // ParseMyCnf parses a MySQL my.cnf file. It only reads the "[client]" section, diff --git a/dbconn/mycnf_test.go b/dbconn/mycnf_test.go index d0374be0..c18938ca 100644 --- a/dbconn/mycnf_test.go +++ b/dbconn/mycnf_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/cashapp/blip" - "github.com/cashapp/blip/dbconn" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/dbconn" ) func TestParseMyCnf(t *testing.T) { diff --git a/dbconn/password_secret_test.go b/dbconn/password_secret_test.go index a6d78e05..010c86bf 100644 --- a/dbconn/password_secret_test.go +++ b/dbconn/password_secret_test.go @@ -14,7 +14,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/credentials" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type testAWSConfigFactory struct { diff --git a/dbconn/reload_password.go b/dbconn/reload_password.go index 43f2df1f..27af381e 100644 --- a/dbconn/reload_password.go +++ b/dbconn/reload_password.go @@ -9,8 +9,8 @@ import ( dsndriver "github.com/go-mysql/hotswap-dsn-driver" "github.com/go-sql-driver/mysql" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" ) func init() { diff --git a/docs/content/about/release-notes.md b/docs/content/about/release-notes.md index dc59215a..85b181f1 100644 --- a/docs/content/about/release-notes.md +++ b/docs/content/about/release-notes.md @@ -23,11 +23,12 @@ As described in the [Blip versioning guidelines](https://github.com/block/blip/b To upgrade an integration: -1. Replace `dbconn.Credentials` with `blip.DbCredentials` and update any `dbconn.CredentialFunc` implementations. -2. Accept the new variadic options argument when storing or wrapping `dbconn.NewConnFactory`; ordinary two-argument calls continue to compile. -3. Capture the parameter slice returned by `DataSizeQuery`, `TableSizeQuery`, and `TableIoWaitQuery`, and pass it to the database query call. -4. Replace `aws.Secret.Password` calls with `GetSecret` for the default JSON object or `GetSecretPayload` plus a password secret parser for custom payloads. -5. Stop comparing `heartbeat.BlipReader` values directly; compare the relevant state exposed by the reader instead. +1. Update imports from `github.com/cashapp/blip/...` to `github.com/cashapp/blip/v2/...` and require `github.com/cashapp/blip/v2 v2.0.1` or later. +2. Replace `dbconn.Credentials` with `blip.DbCredentials` and update any `dbconn.CredentialFunc` implementations. +3. Accept the new variadic options argument when storing or wrapping `dbconn.NewConnFactory`; ordinary two-argument calls continue to compile. +4. Capture the parameter slice returned by `DataSizeQuery`, `TableSizeQuery`, and `TableIoWaitQuery`, and pass it to the database query call. +5. Replace `aws.Secret.Password` calls with `GetSecret` for the default JSON object or `GetSecretPayload` plus a password secret parser for custom payloads. +6. Stop comparing `heartbeat.BlipReader` values directly; compare the relevant state exposed by the reader instead. ### Runtime changes @@ -35,8 +36,11 @@ AWS Secrets Manager `password-secret` authentication now uses the secret's optio Default sink HTTP clients now have a 10-second whole-request timeout plus bounded connection and response-header timeouts. Custom HTTP client factories are unchanged. -### v2.0.0 (7 Aug 2026) +### v2.0.1 (7 Aug 2026) +Version v2.0.0 was withdrawn before release completion because its module path lacked the `/v2` suffix required by Go modules. v2.0.1 is the first usable v2 release. + +* Added the required `/v2` module and import path for the v2 series. * Added the `autoinc` domain for auto-increment column utilization. * Added the `error.account`, `error.global`, `error.host`, `error.thread`, and `error.user` domains. * Added the `innodb.buffer-pool` domain. diff --git a/docs/content/cloud/aws.md b/docs/content/cloud/aws.md index e2b36172..9bdabe85 100644 --- a/docs/content/cloud/aws.md +++ b/docs/content/cloud/aws.md @@ -37,7 +37,7 @@ config.LoadDefaultConfig(ctx, config.WithRegion("...")) Section [Region](#region) above explains how the region is auto-detected or configured. -Use the [`blip.AWSConfigFactory`](https://pkg.go.dev/github.com/cashapp/blip#AWSConfigFactory) to load a custome AWS configuration (which includes the credentials). +Use the [`blip.AWSConfigFactory`](https://pkg.go.dev/github.com/cashapp/blip/v2#AWSConfigFactory) to load a custome AWS configuration (which includes the credentials). See [Develop / Intergration API]({{< ref "/develop/integration-api" >}}) for more information. ## Authentication @@ -129,7 +129,7 @@ It works with Blip, but Blip ignores the connection fields like `host` and `port {{< /hint >}} If you embed Blip and use a different secret payload shape, set the -[`blip.Plugins.ParsePasswordSecret`](https://pkg.go.dev/github.com/cashapp/blip#Plugins) +[`blip.Plugins.ParsePasswordSecret`](https://pkg.go.dev/github.com/cashapp/blip/v2#Plugins) callback before calling `Server.Boot`. The callback receives one raw payload: `SecretString` bytes when present, otherwise `SecretBinary` bytes. It should set the password and, if needed, username on the credentials value passed to it. diff --git a/docs/content/develop/domain-translator.md b/docs/content/develop/domain-translator.md index 38a3bec7..39602873 100644 --- a/docs/content/develop/domain-translator.md +++ b/docs/content/develop/domain-translator.md @@ -6,14 +6,14 @@ This allows Blip to collect and structure metrics one way, but report metrics in ## Sink Translator -[sink/tr.Translator](https://pkg.go.dev/github.com/cashapp/blip/sink/tr#DomainTranslator) +[sink/tr.Translator](https://pkg.go.dev/github.com/cashapp/blip/v2/sink/tr#DomainTranslator) The sink translator renames metrics. -A sink translator must be registered by calling [`sink/tr.Register`](https://pkg.go.dev/github.com/cashapp/blip/sink/tr#Register). +A sink translator must be registered by calling [`sink/tr.Register`](https://pkg.go.dev/github.com/cashapp/blip/v2/sink/tr#Register). ## Prometheus Translator -[prom.Translator](https://pkg.go.dev/github.com/cashapp/blip/prom#DomainTranslator) +[prom.Translator](https://pkg.go.dev/github.com/cashapp/blip/v2/prom#DomainTranslator) The Prometheus translator is used for [Prometheus emulation]({{< ref "config/prometheus" >}}). Currently, these translators are built-in. diff --git a/docs/content/develop/events.md b/docs/content/develop/events.md index cb6f252d..86e6d558 100644 --- a/docs/content/develop/events.md +++ b/docs/content/develop/events.md @@ -1,7 +1,7 @@ --- --- -Blip uses [events](https://pkg.go.dev/github.com/cashapp/blip/event) instead of traditional logging. +Blip uses [events](https://pkg.go.dev/github.com/cashapp/blip/v2/event) instead of traditional logging. Instead of, @@ -20,13 +20,13 @@ By default, error events are printed to `STDERR`. Start `blip` with the [`--log`]({{< ref "/config/blip#--log" >}}) option to print info events to `STDOUT`, which simulates traditional logging. An event receiver handles every event. -The default event receiver is [`event.Log`](https://pkg.go.dev/github.com/cashapp/blip/event#Log), which prints events as noted above: error events to `STDERR`, and "info" events to `STDOUT` if [`--log`]({{< ref "/config/blip#--log" >}}). +The default event receiver is [`event.Log`](https://pkg.go.dev/github.com/cashapp/blip/v2/event#Log), which prints events as noted above: error events to `STDERR`, and "info" events to `STDOUT` if [`--log`]({{< ref "/config/blip#--log" >}}). To change (or implement different) Blip logging, implement a custom event receiver. ## Custom Receiver -Implement the [`event.Receiver` interface](https://pkg.go.dev/github.com/cashapp/blip/event#Receiver), then call [`event.SetReceiver`](https://pkg.go.dev/github.com/cashapp/blip/event#SetReceiver) before booting the server. +Implement the [`event.Receiver` interface](https://pkg.go.dev/github.com/cashapp/blip/v2/event#Receiver), then call [`event.SetReceiver`](https://pkg.go.dev/github.com/cashapp/blip/v2/event#SetReceiver) before booting the server.

Registering a custom receive completely overrides the default receiver. diff --git a/docs/content/develop/integration-api.md b/docs/content/develop/integration-api.md index 64eb51fc..40b6ea6c 100644 --- a/docs/content/develop/integration-api.md +++ b/docs/content/develop/integration-api.md @@ -23,7 +23,7 @@ How you integrate with Blip depends on what you're trying to customize: |Timeouts|Variables| {{< hint type=important >}} -**All integrations must be set before calling [`Server.Boot`](https://pkg.go.dev/github.com/cashapp/blip/server#Server.Boot).** +**All integrations must be set before calling [`Server.Boot`](https://pkg.go.dev/github.com/cashapp/blip/v2/server#Server.Boot).** {{< /hint >}} ## Registry @@ -33,9 +33,9 @@ Blip has three registries: |Registry|Resource Name|Factory Produces| |:-------|:------------|:---------------| -|[Metrics Registry](https://pkg.go.dev/github.com/cashapp/blip/metrics#Register)|metric domain|[Collector](https://pkg.go.dev/github.com/cashapp/blip#Collector)| -|[Sink Registry](https://pkg.go.dev/github.com/cashapp/blip/sink#Register)|sink|[Sink](https://pkg.go.dev/github.com/cashapp/blip#Sink)| -|[Domain Translator Registry](https://pkg.go.dev/github.com/cashapp/blip/sink/tr#Register)|metric domain|[DomainTranslator](https://pkg.go.dev/github.com/cashapp/blip/sink/tr#DomainTranslator)| +|[Metrics Registry](https://pkg.go.dev/github.com/cashapp/blip/v2/metrics#Register)|metric domain|[Collector](https://pkg.go.dev/github.com/cashapp/blip/v2#Collector)| +|[Sink Registry](https://pkg.go.dev/github.com/cashapp/blip/v2/sink#Register)|sink|[Sink](https://pkg.go.dev/github.com/cashapp/blip/v2#Sink)| +|[Domain Translator Registry](https://pkg.go.dev/github.com/cashapp/blip/v2/sink/tr#Register)|metric domain|[DomainTranslator](https://pkg.go.dev/github.com/cashapp/blip/v2/sink/tr#DomainTranslator)| The metric and sink registries are the most important: they allow you to make Blip collect any metrics and send metrics anywhere. @@ -51,18 +51,18 @@ This is also how [custom metric collectors]({{< ref "develop/collectors" >}}) wo ## Factories -[Factories](https://pkg.go.dev/github.com/cashapp/blip#Factories) are interfaces that let you override certain object creation of Blip. +[Factories](https://pkg.go.dev/github.com/cashapp/blip/v2#Factories) are interfaces that let you override certain object creation of Blip. Every factory is optional: if specified, it overrides the built-in factory. ## Plugins -[Plugins](https://pkg.go.dev/github.com/cashapp/blip#Plugins) are function callbacks that let you override specific functionality of Blip. +[Plugins](https://pkg.go.dev/github.com/cashapp/blip/v2#Plugins) are function callbacks that let you override specific functionality of Blip. Every plugin is optional: if specified, it overrides the built-in functionality. ### AWS Password Secrets -Set [`Plugins.ParsePasswordSecret`](https://pkg.go.dev/github.com/cashapp/blip#Plugins) to customize how Blip maps the raw AWS Secrets Manager payload from [`config.aws.password-secret`]({{< ref "/config/config-file#password-secret" >}}) to MySQL credentials. -If this callback is not set, Blip uses [`DefaultPasswordSecretParser`](https://pkg.go.dev/github.com/cashapp/blip#DefaultPasswordSecretParser): `password` is required, and `username` is optional. +Set [`Plugins.ParsePasswordSecret`](https://pkg.go.dev/github.com/cashapp/blip/v2#Plugins) to customize how Blip maps the raw AWS Secrets Manager payload from [`config.aws.password-secret`]({{< ref "/config/config-file#password-secret" >}}) to MySQL credentials. +If this callback is not set, Blip uses [`DefaultPasswordSecretParser`](https://pkg.go.dev/github.com/cashapp/blip/v2#DefaultPasswordSecretParser): `password` is required, and `username` is optional. Blip passes `SecretString` bytes when present; otherwise, it passes `SecretBinary` bytes. The `credentials` argument is initialized with the configured monitor username; custom parsers must set `credentials.Password` and can override `credentials.Username`. @@ -75,10 +75,10 @@ plugins.ParsePasswordSecret = func(ctx context.Context, cfg blip.ConfigMonitor, ## Events -Implement a [Receiver](https://pkg.go.dev/github.com/cashapp/blip/event#Receiver), then call [event.SetReceiver](https://pkg.go.dev/github.com/cashapp/blip/event#SetReceiver) to override the default. -There is only one event receiver; use [Tee](https://pkg.go.dev/github.com/cashapp/blip/event#Tee) to chain receivers. +Implement a [Receiver](https://pkg.go.dev/github.com/cashapp/blip/v2/event#Receiver), then call [event.SetReceiver](https://pkg.go.dev/github.com/cashapp/blip/v2/event#SetReceiver) to override the default. +There is only one event receiver; use [Tee](https://pkg.go.dev/github.com/cashapp/blip/v2/event#Tee) to chain receivers. ## Variables Various packages have public variables that you can modify to fine-tune aspects of Blip. -For example, the [heartbeat package](https://pkg.go.dev/github.com/cashapp/blip/heartbeat#pkg-variables) has several timeout and retry wait durations. +For example, the [heartbeat package](https://pkg.go.dev/github.com/cashapp/blip/v2/heartbeat#pkg-variables) has several timeout and retry wait durations. diff --git a/docs/content/develop/sinks.md b/docs/content/develop/sinks.md index 5357509e..547625d8 100644 --- a/docs/content/develop/sinks.md +++ b/docs/content/develop/sinks.md @@ -3,10 +3,10 @@ Implement two interfaces: -* [`blip.Sink`](https://pkg.go.dev/github.com/cashapp/blip#Sink) -* [`blip.SinkFactory`](https://pkg.go.dev/github.com/cashapp/blip#SinkFactory) +* [`blip.Sink`](https://pkg.go.dev/github.com/cashapp/blip/v2#Sink) +* [`blip.SinkFactory`](https://pkg.go.dev/github.com/cashapp/blip/v2#SinkFactory) -Register the custom sink by calling [`sink.Register`](https://pkg.go.dev/github.com/cashapp/blip/sink#Register) before `Server.Boot`. +Register the custom sink by calling [`sink.Register`](https://pkg.go.dev/github.com/cashapp/blip/v2/sink#Register) before `Server.Boot`. Reference the custom sink in the [`sinks`]({{< ref "/config/config-file#sinks" >}}) config section: diff --git a/docs/content/intro/quick-start.md b/docs/content/intro/quick-start.md index 538f5572..961d5116 100644 --- a/docs/content/intro/quick-start.md +++ b/docs/content/intro/quick-start.md @@ -190,9 +190,9 @@ import ( "gopkg.in/yaml.v2" - "github.com/cashapp/blip" - "github.com/cashapp/blip/server" - "github.com/cashapp/blip/sink" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/server" + "github.com/cashapp/blip/v2/sink" ) type YAML struct{} diff --git a/docs/content/intro/sinks.md b/docs/content/intro/sinks.md index 69b8a1f8..e9c863e5 100644 --- a/docs/content/intro/sinks.md +++ b/docs/content/intro/sinks.md @@ -66,7 +66,7 @@ Here's a _mock_ (incomplete and nonfunctional) implementation of a sink (called ```go import ( "context" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type Kim struct { diff --git a/docs/content/metrics/domains/autoinc/_index.md b/docs/content/metrics/domains/autoinc/_index.md index 4adf932e..4ee492ee 100644 --- a/docs/content/metrics/domains/autoinc/_index.md +++ b/docs/content/metrics/domains/autoinc/_index.md @@ -68,4 +68,4 @@ None. |Blip Version|Change| |------------|------| -|v2.0.0|Domain added| +|v2.0.1|Domain added| diff --git a/docs/content/metrics/quick-ref.md b/docs/content/metrics/quick-ref.md index 6fb0cc2a..cf9811d0 100644 --- a/docs/content/metrics/quick-ref.md +++ b/docs/content/metrics/quick-ref.md @@ -12,18 +12,18 @@ The rest are reserved for future use. |access.index|Index access statistics (`sys.schema_index_statistics`)|| |access.table|Table access statistics (`sys.schema_table_statistics`)|| |aria|MariaDB Aria storage engine|| -|[`autoinc`](domains#autoinc)|Auto-increment column utilization|v2.0.0| +|[`autoinc`](domains#autoinc)|Auto-increment column utilization|v2.0.1| |aws|Amazon Web Services|| |[`aws.rds`](domains#awsrds)|[Amazon RDS metrics](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/monitoring-cloudwatch.html#rds-metrics)|v1.0.0| |aws.aurora|Amazon Aurora|| |azure|Microsoft Azure|| |error|MySQL, client, and query errors|| |error.client|Client errors|| -|[error.account](domains#error.account)|Error counts and rates by account [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.0| -|[error.global](domains#error.global)|Global error counts and rates [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.0| -|[error.host](domains#error.host)|Error counts and rates by host [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.0| -|[error.thread](domains#error.thread)|Error counts and rates by thread [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.0| -|[error.user](domains#error.user)|Error counts and rates by user [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.0| +|[error.account](domains#error.account)|Error counts and rates by account [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.1| +|[error.global](domains#error.global)|Global error counts and rates [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.1| +|[error.host](domains#error.host)|Error counts and rates by host [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.1| +|[error.thread](domains#error.thread)|Error counts and rates by thread [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.1| +|[error.user](domains#error.user)|Error counts and rates by user [`Error Summary Tables`](https://dev.mysql.com/doc/refman/8.4/en/performance-schema-error-summary-tables.html)|v2.0.1| |error.query|Query errors|| |error.repl|Replication errors|| |event|[MySQL Event Scheduler](https://dev.mysql.com/doc/refman/8.0/en/event-scheduler.html)|| @@ -33,7 +33,7 @@ The rest are reserved for future use. |gr|MySQL Group Replication|| |host|Host (client)|| |[`innodb`](domains#innodb)|InnoDB metrics [`INFORMATION_SCHEMA.INNODB_METRICS`](https://dev.mysql.com/doc/refman/en/information-schema-innodb-metrics-table.html)|v1.0.0| -|[`innodb.buffer-pool`](domains#innodbbuffer-pool)|InnoDB buffer pool metrics [`INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS`](https://dev.mysql.com/doc/refman/8.4/en/information-schema-innodb-buffer-pool-stats-table.html)|v2.0.0| +|[`innodb.buffer-pool`](domains#innodbbuffer-pool)|InnoDB buffer pool metrics [`INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS`](https://dev.mysql.com/doc/refman/8.4/en/information-schema-innodb-buffer-pool-stats-table.html)|v2.0.1| |innodb.mutex|InnoDB mutexes `SHOW ENGINE INNODB MUTEX`|| |mariadb|MariaDB enhancements|| |ndb|MySQL NDB Cluster|| diff --git a/docs/content/metrics/reporting.md b/docs/content/metrics/reporting.md index 4f64b584..54e62064 100644 --- a/docs/content/metrics/reporting.md +++ b/docs/content/metrics/reporting.md @@ -68,7 +68,7 @@ Metrics can be renamed _after_ collection by using the [TransformMetrics plugin] ## Metric Data Structure -Internally, Blip stores metrics in a [`Metrics` data structure](https://pkg.go.dev/github.com/cashapp/blip#Metrics): +Internally, Blip stores metrics in a [`Metrics` data structure](https://pkg.go.dev/github.com/cashapp/blip/v2#Metrics): ``` type Metrics struct { @@ -82,7 +82,7 @@ type Metrics struct { } ``` -[Metric values](https://pkg.go.dev/github.com/cashapp/blip#MetricValue) (the last field in the struct) are reported per-domain. +[Metric values](https://pkg.go.dev/github.com/cashapp/blip/v2#MetricValue) (the last field in the struct) are reported per-domain. To visual the metric values data structure, in YAML it would be: ```yaml diff --git a/docs/content/monitors/mysql-connection.md b/docs/content/monitors/mysql-connection.md index 962de9b7..417e033a 100644 --- a/docs/content/monitors/mysql-connection.md +++ b/docs/content/monitors/mysql-connection.md @@ -62,9 +62,9 @@ Currently, this cannot be disabled. ## Limits Blip is limited to 3 connections per monitor. -This can be changed by using the [`blip.ModifyDB` plugin](https://pkg.go.dev/github.com/cashapp/blip#Plugins), but this is not advised. +This can be changed by using the [`blip.ModifyDB` plugin](https://pkg.go.dev/github.com/cashapp/blip/v2#Plugins), but this is not advised. Blip collects metrics in parallel with a limit of 2 collectors (domains) at once. -This can be changed by setting the [`monitor.CollectParallel` variable](https://pkg.go.dev/github.com/cashapp/blip/monitor#pkg-variables), but this is not advised. +This can be changed by setting the [`monitor.CollectParallel` variable](https://pkg.go.dev/github.com/cashapp/blip/v2/monitor#pkg-variables), but this is not advised. The 3 connection limit minus 2 parallel metrics collection leaves 1 connection free that is used by the [Heartbeat]({{< ref "/heartbeat" >}}) and [Plan Changer]({{< ref "/plans/changing" >}}). diff --git a/errors/truncate_error.go b/errors/truncate_error.go index cc7f3032..b0fcdfdb 100644 --- a/errors/truncate_error.go +++ b/errors/truncate_error.go @@ -3,7 +3,7 @@ package errors import ( - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type TruncateErrorPolicy struct { diff --git a/errors/truncate_error_test.go b/errors/truncate_error_test.go index 95088b0e..31977312 100644 --- a/errors/truncate_error_test.go +++ b/errors/truncate_error_test.go @@ -6,8 +6,8 @@ import ( "fmt" "testing" - "github.com/cashapp/blip" - "github.com/cashapp/blip/errors" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/errors" "github.com/go-test/deep" ) diff --git a/event/event.go b/event/event.go index 9d45f9cb..bf172d38 100644 --- a/event/event.go +++ b/event/event.go @@ -10,7 +10,7 @@ import ( "sync" "time" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // Event is something that happened in Blip. Events replace traditional logging. diff --git a/examples/copy-meta/go.mod b/examples/copy-meta/go.mod index d5c8c2d2..32402c46 100644 --- a/examples/copy-meta/go.mod +++ b/examples/copy-meta/go.mod @@ -1,10 +1,10 @@ module blip_plugin -go 1.22.2 +go 1.24 -replace github.com/cashapp/blip => ../../ +replace github.com/cashapp/blip/v2 => ../../ -require github.com/cashapp/blip v0.0.0-00010101000000-000000000000 +require github.com/cashapp/blip/v2 v2.0.1 require ( github.com/aws/aws-sdk-go-v2 v1.20.3 // indirect diff --git a/examples/copy-meta/plugin.go b/examples/copy-meta/plugin.go index e4d5fa49..c2ae8861 100644 --- a/examples/copy-meta/plugin.go +++ b/examples/copy-meta/plugin.go @@ -3,7 +3,7 @@ package blip_plugin import ( "fmt" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // Verify that CopyMeta is a valid blip.Plugins.TransformMetrics callback. diff --git a/examples/copy-meta/plugin_test.go b/examples/copy-meta/plugin_test.go index 7cf2e5e0..d711b7a7 100644 --- a/examples/copy-meta/plugin_test.go +++ b/examples/copy-meta/plugin_test.go @@ -3,7 +3,7 @@ package blip_plugin import ( "testing" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/examples/custom-receiver/go.mod b/examples/custom-receiver/go.mod index f6363697..cbcaad4f 100644 --- a/examples/custom-receiver/go.mod +++ b/examples/custom-receiver/go.mod @@ -2,12 +2,12 @@ module main go 1.24 -replace github.com/cashapp/blip => ../../ +replace github.com/cashapp/blip/v2 => ../../ -require github.com/cashapp/blip v0.0.0-00010101000000-000000000000 +require github.com/cashapp/blip/v2 v2.0.1 require ( - filippo.io/edwards25519 v1.1.0 // indirect + filippo.io/edwards25519 v1.1.1 // indirect github.com/DataDog/datadog-api-client-go/v2 v2.2.0 // indirect github.com/DataDog/datadog-go/v5 v5.1.1 // indirect github.com/DataDog/zstd v1.5.0 // indirect diff --git a/examples/custom-receiver/go.sum b/examples/custom-receiver/go.sum index 8278f8e9..b93a346a 100644 --- a/examples/custom-receiver/go.sum +++ b/examples/custom-receiver/go.sum @@ -1,6 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= -filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +filippo.io/edwards25519 v1.1.1 h1:YpjwWWlNmGIDyXOn8zLzqiD+9TyIlPhGFG96P39uBpw= +filippo.io/edwards25519 v1.1.1/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/datadog-api-client-go/v2 v2.2.0 h1:woWe+XBcYt29g1SJs+zbgwYPfyATb+gxeA2pKqUu02Y= github.com/DataDog/datadog-api-client-go/v2 v2.2.0/go.mod h1:98b/MtTwSAr/yhTfhCR1oxAqQ/4tMkdrgKH7fYiDA0g= diff --git a/examples/custom-receiver/main.go b/examples/custom-receiver/main.go index ffbf77ed..2a843f4a 100644 --- a/examples/custom-receiver/main.go +++ b/examples/custom-receiver/main.go @@ -5,8 +5,8 @@ import ( "fmt" "log" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/server" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/server" ) // JSON implements a custom event.Receiver that converts Blip events to JSON diff --git a/examples/custom-sink/go.mod b/examples/custom-sink/go.mod index a0c12fac..62e46d3a 100644 --- a/examples/custom-sink/go.mod +++ b/examples/custom-sink/go.mod @@ -2,15 +2,15 @@ module main go 1.24 -replace github.com/cashapp/blip => ../../ +replace github.com/cashapp/blip/v2 => ../../ require ( - github.com/cashapp/blip v0.0.0-00010101000000-000000000000 + github.com/cashapp/blip/v2 v2.0.1 gopkg.in/yaml.v2 v2.4.0 ) require ( - filippo.io/edwards25519 v1.1.0 // indirect + filippo.io/edwards25519 v1.1.1 // indirect github.com/DataDog/datadog-api-client-go/v2 v2.2.0 // indirect github.com/DataDog/datadog-go/v5 v5.1.1 // indirect github.com/DataDog/zstd v1.5.0 // indirect diff --git a/examples/custom-sink/go.sum b/examples/custom-sink/go.sum index 8278f8e9..b93a346a 100644 --- a/examples/custom-sink/go.sum +++ b/examples/custom-sink/go.sum @@ -1,6 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= -filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +filippo.io/edwards25519 v1.1.1 h1:YpjwWWlNmGIDyXOn8zLzqiD+9TyIlPhGFG96P39uBpw= +filippo.io/edwards25519 v1.1.1/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/datadog-api-client-go/v2 v2.2.0 h1:woWe+XBcYt29g1SJs+zbgwYPfyATb+gxeA2pKqUu02Y= github.com/DataDog/datadog-api-client-go/v2 v2.2.0/go.mod h1:98b/MtTwSAr/yhTfhCR1oxAqQ/4tMkdrgKH7fYiDA0g= diff --git a/examples/custom-sink/main.go b/examples/custom-sink/main.go index df0bf3c2..0c30c222 100644 --- a/examples/custom-sink/main.go +++ b/examples/custom-sink/main.go @@ -7,9 +7,9 @@ import ( "gopkg.in/yaml.v2" - "github.com/cashapp/blip" - "github.com/cashapp/blip/server" - "github.com/cashapp/blip/sink" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/server" + "github.com/cashapp/blip/v2/sink" ) type YAML struct{} diff --git a/examples/integrate/go.mod b/examples/integrate/go.mod index ab2b19d1..cbcaad4f 100644 --- a/examples/integrate/go.mod +++ b/examples/integrate/go.mod @@ -2,12 +2,12 @@ module main go 1.24 -replace github.com/cashapp/blip => ../../ +replace github.com/cashapp/blip/v2 => ../../ -require github.com/cashapp/blip v1.2.1 +require github.com/cashapp/blip/v2 v2.0.1 require ( - filippo.io/edwards25519 v1.1.0 // indirect + filippo.io/edwards25519 v1.1.1 // indirect github.com/DataDog/datadog-api-client-go/v2 v2.2.0 // indirect github.com/DataDog/datadog-go/v5 v5.1.1 // indirect github.com/DataDog/zstd v1.5.0 // indirect diff --git a/examples/integrate/go.sum b/examples/integrate/go.sum index 8278f8e9..b93a346a 100644 --- a/examples/integrate/go.sum +++ b/examples/integrate/go.sum @@ -1,6 +1,6 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= -filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +filippo.io/edwards25519 v1.1.1 h1:YpjwWWlNmGIDyXOn8zLzqiD+9TyIlPhGFG96P39uBpw= +filippo.io/edwards25519 v1.1.1/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/DataDog/datadog-api-client-go/v2 v2.2.0 h1:woWe+XBcYt29g1SJs+zbgwYPfyATb+gxeA2pKqUu02Y= github.com/DataDog/datadog-api-client-go/v2 v2.2.0/go.mod h1:98b/MtTwSAr/yhTfhCR1oxAqQ/4tMkdrgKH7fYiDA0g= diff --git a/examples/integrate/main.go b/examples/integrate/main.go index b9534508..321a014f 100644 --- a/examples/integrate/main.go +++ b/examples/integrate/main.go @@ -6,10 +6,10 @@ import ( "log" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/heartbeat" - "github.com/cashapp/blip/metrics" - "github.com/cashapp/blip/server" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/heartbeat" + "github.com/cashapp/blip/v2/metrics" + "github.com/cashapp/blip/v2/server" ) func main() { diff --git a/go.mod b/go.mod index 5ed6b192..cfc7fc9d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/cashapp/blip +module github.com/cashapp/blip/v2 go 1.24 diff --git a/ha/ha.go b/ha/ha.go index ce884b3c..ab217e35 100644 --- a/ha/ha.go +++ b/ha/ha.go @@ -5,7 +5,7 @@ package ha import ( "sync" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type Manager interface { diff --git a/heartbeat/heartbeat_test.go b/heartbeat/heartbeat_test.go index 36476e9a..e167ddd5 100644 --- a/heartbeat/heartbeat_test.go +++ b/heartbeat/heartbeat_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/heartbeat" - "github.com/cashapp/blip/test" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/heartbeat" + "github.com/cashapp/blip/v2/test" + "github.com/cashapp/blip/v2/test/mock" ) const ( diff --git a/heartbeat/reader.go b/heartbeat/reader.go index e179dde4..9cb429ca 100644 --- a/heartbeat/reader.go +++ b/heartbeat/reader.go @@ -10,9 +10,9 @@ import ( "sync" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/status" ) // Reader reads heartbeats from a writer. It runs in a separate goroutine and diff --git a/heartbeat/writer.go b/heartbeat/writer.go index ac0a1bec..1c8f01d9 100644 --- a/heartbeat/writer.go +++ b/heartbeat/writer.go @@ -8,9 +8,9 @@ import ( "fmt" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" + "github.com/cashapp/blip/v2/status" ) const BLIP_TABLE_DDL = `CREATE TABLE IF NOT EXISTS heartbeat ( diff --git a/metrics/autoinc/autoinc.go b/metrics/autoinc/autoinc.go index 4626a845..3e941cb3 100644 --- a/metrics/autoinc/autoinc.go +++ b/metrics/autoinc/autoinc.go @@ -7,7 +7,7 @@ import ( "database/sql" "strings" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/metrics/aws.rds/rds.go b/metrics/aws.rds/rds.go index 533a0528..15bd7a54 100644 --- a/metrics/aws.rds/rds.go +++ b/metrics/aws.rds/rds.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/cloudwatch" "github.com/aws/aws-sdk-go-v2/service/cloudwatch/types" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/metrics/error/account.go b/metrics/error/account.go index 92b0cf1e..0ad46204 100644 --- a/metrics/error/account.go +++ b/metrics/error/account.go @@ -7,7 +7,7 @@ import ( "database/sql" "fmt" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/metrics/error/error.go b/metrics/error/error.go index f0fc3558..9806d8fe 100644 --- a/metrics/error/error.go +++ b/metrics/error/error.go @@ -8,8 +8,8 @@ import ( "strings" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/errors" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/errors" "golang.org/x/text/cases" "golang.org/x/text/language" ) diff --git a/metrics/error/global.go b/metrics/error/global.go index fe902d6a..0385e917 100644 --- a/metrics/error/global.go +++ b/metrics/error/global.go @@ -7,7 +7,7 @@ import ( "database/sql" "fmt" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/metrics/error/host.go b/metrics/error/host.go index bea554a3..ebc98acf 100644 --- a/metrics/error/host.go +++ b/metrics/error/host.go @@ -7,7 +7,7 @@ import ( "database/sql" "fmt" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/metrics/error/query.go b/metrics/error/query.go index 27f346d2..0c168348 100644 --- a/metrics/error/query.go +++ b/metrics/error/query.go @@ -7,8 +7,8 @@ import ( "strconv" "strings" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" ) // ErrorsQuery builds a query for error metrics based on the domain configuration. diff --git a/metrics/error/query_test.go b/metrics/error/query_test.go index 7ab02769..039d2cbd 100644 --- a/metrics/error/query_test.go +++ b/metrics/error/query_test.go @@ -5,7 +5,7 @@ package error import ( "testing" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" "github.com/go-test/deep" ) diff --git a/metrics/error/thread.go b/metrics/error/thread.go index 9fff6736..2f63058a 100644 --- a/metrics/error/thread.go +++ b/metrics/error/thread.go @@ -7,7 +7,7 @@ import ( "database/sql" "fmt" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/metrics/error/user.go b/metrics/error/user.go index 019bede9..0ed0b89b 100644 --- a/metrics/error/user.go +++ b/metrics/error/user.go @@ -7,7 +7,7 @@ import ( "database/sql" "fmt" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/metrics/factory.go b/metrics/factory.go index 2059764d..d3f4d479 100644 --- a/metrics/factory.go +++ b/metrics/factory.go @@ -7,25 +7,25 @@ import ( "sort" "sync" - "github.com/cashapp/blip" - "github.com/cashapp/blip/metrics/autoinc" - awsrds "github.com/cashapp/blip/metrics/aws.rds" - errordomain "github.com/cashapp/blip/metrics/error" - "github.com/cashapp/blip/metrics/innodb" - innodbbufferpool "github.com/cashapp/blip/metrics/innodb.buffer-pool" - "github.com/cashapp/blip/metrics/percona" - queryresponsetime "github.com/cashapp/blip/metrics/query.response-time" - "github.com/cashapp/blip/metrics/repl" - repllag "github.com/cashapp/blip/metrics/repl.lag" - sizebinlog "github.com/cashapp/blip/metrics/size.binlog" - sizedatabase "github.com/cashapp/blip/metrics/size.database" - sizetable "github.com/cashapp/blip/metrics/size.table" - statusglobal "github.com/cashapp/blip/metrics/status.global" - "github.com/cashapp/blip/metrics/stmt.current" - "github.com/cashapp/blip/metrics/tls" - "github.com/cashapp/blip/metrics/trx" - varglobal "github.com/cashapp/blip/metrics/var.global" - waitiotable "github.com/cashapp/blip/metrics/wait.io.table" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/metrics/autoinc" + awsrds "github.com/cashapp/blip/v2/metrics/aws.rds" + errordomain "github.com/cashapp/blip/v2/metrics/error" + "github.com/cashapp/blip/v2/metrics/innodb" + innodbbufferpool "github.com/cashapp/blip/v2/metrics/innodb.buffer-pool" + "github.com/cashapp/blip/v2/metrics/percona" + queryresponsetime "github.com/cashapp/blip/v2/metrics/query.response-time" + "github.com/cashapp/blip/v2/metrics/repl" + repllag "github.com/cashapp/blip/v2/metrics/repl.lag" + sizebinlog "github.com/cashapp/blip/v2/metrics/size.binlog" + sizedatabase "github.com/cashapp/blip/v2/metrics/size.database" + sizetable "github.com/cashapp/blip/v2/metrics/size.table" + statusglobal "github.com/cashapp/blip/v2/metrics/status.global" + "github.com/cashapp/blip/v2/metrics/stmt.current" + "github.com/cashapp/blip/v2/metrics/tls" + "github.com/cashapp/blip/v2/metrics/trx" + varglobal "github.com/cashapp/blip/v2/metrics/var.global" + waitiotable "github.com/cashapp/blip/v2/metrics/wait.io.table" ) // Register registers a factory that makes one or more collector by domain name. diff --git a/metrics/innodb.buffer-pool/innodb.go b/metrics/innodb.buffer-pool/innodb.go index 4efe0509..ae0fc085 100644 --- a/metrics/innodb.buffer-pool/innodb.go +++ b/metrics/innodb.buffer-pool/innodb.go @@ -8,8 +8,8 @@ import ( "fmt" "strings" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" ) // Table collects buffer pool data from information_schema.innodb_buffer_pool_stats. diff --git a/metrics/innodb/innodb.go b/metrics/innodb/innodb.go index b693636d..8f09daad 100644 --- a/metrics/innodb/innodb.go +++ b/metrics/innodb/innodb.go @@ -7,8 +7,8 @@ import ( "database/sql" "strings" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" ) const ( diff --git a/metrics/percona/mysql_qrt_histogram_test.go b/metrics/percona/mysql_qrt_histogram_test.go index 620466e0..cd1ba02a 100644 --- a/metrics/percona/mysql_qrt_histogram_test.go +++ b/metrics/percona/mysql_qrt_histogram_test.go @@ -6,7 +6,7 @@ import ( "math" "testing" - "github.com/cashapp/blip/metrics/percona" + "github.com/cashapp/blip/v2/metrics/percona" ) func TestPercentile(t *testing.T) { diff --git a/metrics/percona/qrt.go b/metrics/percona/qrt.go index e89d160c..98174a6c 100644 --- a/metrics/percona/qrt.go +++ b/metrics/percona/qrt.go @@ -10,9 +10,9 @@ import ( myerr "github.com/go-mysql/errors" - "github.com/cashapp/blip" - "github.com/cashapp/blip/errors" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/errors" + "github.com/cashapp/blip/v2/sqlutil" ) /* diff --git a/metrics/query.response-time/response_time.go b/metrics/query.response-time/response_time.go index 68633f2e..0ff8a615 100644 --- a/metrics/query.response-time/response_time.go +++ b/metrics/query.response-time/response_time.go @@ -12,9 +12,9 @@ import ( myerr "github.com/go-mysql/errors" - "github.com/cashapp/blip" - "github.com/cashapp/blip/errors" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/errors" + "github.com/cashapp/blip/v2/sqlutil" ) const ( diff --git a/metrics/query.response-time/response_time_test.go b/metrics/query.response-time/response_time_test.go index 8069ce46..c93a3643 100644 --- a/metrics/query.response-time/response_time_test.go +++ b/metrics/query.response-time/response_time_test.go @@ -6,8 +6,8 @@ import ( "context" "testing" - "github.com/cashapp/blip/sqlutil" - "github.com/cashapp/blip/test" + "github.com/cashapp/blip/v2/sqlutil" + "github.com/cashapp/blip/v2/test" ) func TestCollectP(t *testing.T) { diff --git a/metrics/repl.lag/lag.go b/metrics/repl.lag/lag.go index 7d5d4c80..b39f9cd7 100644 --- a/metrics/repl.lag/lag.go +++ b/metrics/repl.lag/lag.go @@ -9,8 +9,8 @@ import ( "strconv" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/heartbeat" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/heartbeat" ) const ( diff --git a/metrics/repl.lag/lag_test.go b/metrics/repl.lag/lag_test.go index 1fdc6699..180d7159 100644 --- a/metrics/repl.lag/lag_test.go +++ b/metrics/repl.lag/lag_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/cashapp/blip/test" + "github.com/cashapp/blip/v2/test" ) func TestPrepareForSingleLevelAndNoSourceOnMySQL80(t *testing.T) { diff --git a/metrics/repl.lag/pfs.go b/metrics/repl.lag/pfs.go index 09c51617..d3a3d740 100644 --- a/metrics/repl.lag/pfs.go +++ b/metrics/repl.lag/pfs.go @@ -10,7 +10,7 @@ import ( "strconv" "strings" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // This file calculates Replica Lag from Performance Schema diff --git a/metrics/repl/repl.go b/metrics/repl/repl.go index 6b5d7351..052ea550 100644 --- a/metrics/repl/repl.go +++ b/metrics/repl/repl.go @@ -9,9 +9,9 @@ import ( myerr "github.com/go-mysql/errors" - "github.com/cashapp/blip" - "github.com/cashapp/blip/errors" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/errors" + "github.com/cashapp/blip/v2/sqlutil" ) const ( diff --git a/metrics/size.binlog/binglog.go b/metrics/size.binlog/binglog.go index b86cbc41..96b334ce 100644 --- a/metrics/size.binlog/binglog.go +++ b/metrics/size.binlog/binglog.go @@ -8,9 +8,9 @@ import ( myerr "github.com/go-mysql/errors" - "github.com/cashapp/blip" - "github.com/cashapp/blip/errors" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/errors" + "github.com/cashapp/blip/v2/sqlutil" ) const ( diff --git a/metrics/size.database/database.go b/metrics/size.database/database.go index a934f492..ae78487c 100644 --- a/metrics/size.database/database.go +++ b/metrics/size.database/database.go @@ -7,8 +7,8 @@ import ( "database/sql" "fmt" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" ) const ( diff --git a/metrics/size.database/query.go b/metrics/size.database/query.go index 2b198fe0..59c2e5da 100644 --- a/metrics/size.database/query.go +++ b/metrics/size.database/query.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" ) func DataSizeQuery(set map[string]string, def blip.CollectorHelp) (string, []interface{}, error) { diff --git a/metrics/size.database/query_test.go b/metrics/size.database/query_test.go index 6bbb3c93..b937bbaa 100644 --- a/metrics/size.database/query_test.go +++ b/metrics/size.database/query_test.go @@ -5,7 +5,7 @@ package sizedatabase_test import ( "testing" - sizedatabase "github.com/cashapp/blip/metrics/size.database" + sizedatabase "github.com/cashapp/blip/v2/metrics/size.database" "github.com/go-test/deep" ) diff --git a/metrics/size.table/query_test.go b/metrics/size.table/query_test.go index b0f5cb9a..331a526b 100644 --- a/metrics/size.table/query_test.go +++ b/metrics/size.table/query_test.go @@ -5,7 +5,7 @@ package sizetable_test import ( "testing" - sizetable "github.com/cashapp/blip/metrics/size.table" + sizetable "github.com/cashapp/blip/v2/metrics/size.table" "github.com/go-test/deep" ) diff --git a/metrics/size.table/table.go b/metrics/size.table/table.go index 3300110c..b883f3c8 100644 --- a/metrics/size.table/table.go +++ b/metrics/size.table/table.go @@ -6,8 +6,8 @@ import ( "context" "database/sql" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" ) const ( diff --git a/metrics/status.global/global.go b/metrics/status.global/global.go index 61d6e44e..47707a5d 100644 --- a/metrics/status.global/global.go +++ b/metrics/status.global/global.go @@ -15,8 +15,8 @@ import ( "database/sql" "strings" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" ) /* diff --git a/metrics/stmt.current/current.go b/metrics/stmt.current/current.go index 29e09781..db83ac2e 100644 --- a/metrics/stmt.current/current.go +++ b/metrics/stmt.current/current.go @@ -9,7 +9,7 @@ import ( "sort" "time" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/metrics/tls/tls.go b/metrics/tls/tls.go index f1c7e699..cb8535c5 100644 --- a/metrics/tls/tls.go +++ b/metrics/tls/tls.go @@ -7,8 +7,8 @@ import ( "database/sql" "fmt" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" ) const ( diff --git a/metrics/trx/trx.go b/metrics/trx/trx.go index aaea1b41..c9f50893 100644 --- a/metrics/trx/trx.go +++ b/metrics/trx/trx.go @@ -7,7 +7,7 @@ import ( "database/sql" "fmt" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const ( diff --git a/metrics/var.global/global.go b/metrics/var.global/global.go index d9fe9096..50c224b7 100644 --- a/metrics/var.global/global.go +++ b/metrics/var.global/global.go @@ -8,8 +8,8 @@ import ( "fmt" "strings" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sqlutil" ) const ( diff --git a/metrics/var.global/global_test.go b/metrics/var.global/global_test.go index 617de67f..e4bef828 100644 --- a/metrics/var.global/global_test.go +++ b/metrics/var.global/global_test.go @@ -9,7 +9,7 @@ import ( "github.com/go-test/deep" "github.com/stretchr/testify/assert" - "github.com/cashapp/blip/test" + "github.com/cashapp/blip/v2/test" ) func TestPrepareForSingleLevelAndNoSource(t *testing.T) { diff --git a/metrics/wait.io.table/query_test.go b/metrics/wait.io.table/query_test.go index 30e64135..7c49c355 100644 --- a/metrics/wait.io.table/query_test.go +++ b/metrics/wait.io.table/query_test.go @@ -5,7 +5,7 @@ package waitiotable_test import ( "testing" - waitiotable "github.com/cashapp/blip/metrics/wait.io.table" + waitiotable "github.com/cashapp/blip/v2/metrics/wait.io.table" "github.com/go-test/deep" ) diff --git a/metrics/wait.io.table/table.go b/metrics/wait.io.table/table.go index b40cdd6e..02ab0721 100644 --- a/metrics/wait.io.table/table.go +++ b/metrics/wait.io.table/table.go @@ -9,8 +9,8 @@ import ( "math" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/errors" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/errors" ) const ( diff --git a/monitor/engine.go b/monitor/engine.go index 44482486..432f887f 100644 --- a/monitor/engine.go +++ b/monitor/engine.go @@ -11,10 +11,10 @@ import ( "sync" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/metrics" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/metrics" + "github.com/cashapp/blip/v2/status" ) // CollectParallel sets how many domains to collect in parallel. Currently, this diff --git a/monitor/level_collector.go b/monitor/level_collector.go index 6d5f7b91..27f5ec24 100644 --- a/monitor/level_collector.go +++ b/monitor/level_collector.go @@ -12,10 +12,10 @@ import ( "github.com/cenkalti/backoff/v4" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/plan" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/plan" + "github.com/cashapp/blip/v2/status" ) // LevelCollector (LCO) executes the current plan to collect metrics. diff --git a/monitor/level_collector_test.go b/monitor/level_collector_test.go index ab0c6ac5..8bdcbf75 100644 --- a/monitor/level_collector_test.go +++ b/monitor/level_collector_test.go @@ -15,15 +15,15 @@ import ( "github.com/go-test/deep" "github.com/stretchr/testify/assert" - "github.com/cashapp/blip" - "github.com/cashapp/blip/dbconn" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/metrics" - "github.com/cashapp/blip/monitor" - "github.com/cashapp/blip/plan" - "github.com/cashapp/blip/status" - "github.com/cashapp/blip/test" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/dbconn" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/metrics" + "github.com/cashapp/blip/v2/monitor" + "github.com/cashapp/blip/v2/plan" + "github.com/cashapp/blip/v2/status" + "github.com/cashapp/blip/v2/test" + "github.com/cashapp/blip/v2/test/mock" ) func init() { diff --git a/monitor/loader.go b/monitor/loader.go index 639c578a..c4f003cf 100644 --- a/monitor/loader.go +++ b/monitor/loader.go @@ -13,14 +13,14 @@ import ( "gopkg.in/yaml.v2" - "github.com/cashapp/blip" - "github.com/cashapp/blip/aws" - "github.com/cashapp/blip/dbconn" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/ha" - "github.com/cashapp/blip/plan" - "github.com/cashapp/blip/sink" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/aws" + "github.com/cashapp/blip/v2/dbconn" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/ha" + "github.com/cashapp/blip/v2/plan" + "github.com/cashapp/blip/v2/sink" + "github.com/cashapp/blip/v2/status" ) // LoadFunc is a callback that matches blip.Plugin.LoadMonitors. diff --git a/monitor/loader_test.go b/monitor/loader_test.go index 56283ed6..6d0b897c 100644 --- a/monitor/loader_test.go +++ b/monitor/loader_test.go @@ -8,13 +8,13 @@ import ( "github.com/stretchr/testify/assert" - "github.com/cashapp/blip" - "github.com/cashapp/blip/aws" - "github.com/cashapp/blip/dbconn" - "github.com/cashapp/blip/monitor" - "github.com/cashapp/blip/plan" - "github.com/cashapp/blip/test" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/aws" + "github.com/cashapp/blip/v2/dbconn" + "github.com/cashapp/blip/v2/monitor" + "github.com/cashapp/blip/v2/plan" + "github.com/cashapp/blip/v2/test" + "github.com/cashapp/blip/v2/test/mock" ) func monitorIds(monitors []*monitor.Monitor) []string { diff --git a/monitor/monitor.go b/monitor/monitor.go index 04e1e747..358140d2 100644 --- a/monitor/monitor.go +++ b/monitor/monitor.go @@ -16,13 +16,13 @@ import ( "github.com/cenkalti/backoff/v4" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/ha" - "github.com/cashapp/blip/heartbeat" - "github.com/cashapp/blip/plan" - "github.com/cashapp/blip/prom" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/ha" + "github.com/cashapp/blip/v2/heartbeat" + "github.com/cashapp/blip/v2/plan" + "github.com/cashapp/blip/v2/prom" + "github.com/cashapp/blip/v2/status" ) // Monitor monitors one MySQL instance. The monitor is a high-level component diff --git a/monitor/monitor_test.go b/monitor/monitor_test.go index b5b03add..1ff741a5 100644 --- a/monitor/monitor_test.go +++ b/monitor/monitor_test.go @@ -9,12 +9,12 @@ import ( "github.com/stretchr/testify/assert" - "github.com/cashapp/blip" - "github.com/cashapp/blip/dbconn" - "github.com/cashapp/blip/monitor" - "github.com/cashapp/blip/plan" - "github.com/cashapp/blip/test" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/dbconn" + "github.com/cashapp/blip/v2/monitor" + "github.com/cashapp/blip/v2/plan" + "github.com/cashapp/blip/v2/test" + "github.com/cashapp/blip/v2/test/mock" ) func TestMonitor(t *testing.T) { diff --git a/monitor/mysqld_exporter.go b/monitor/mysqld_exporter.go index 6827914a..419a3b71 100644 --- a/monitor/mysqld_exporter.go +++ b/monitor/mysqld_exporter.go @@ -12,9 +12,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/expfmt" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/prom" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/prom" ) // Exporter emulates a Prometheus mysqld_exporter. It implements prom.Exporter. diff --git a/monitor/mysqld_exporter_test.go b/monitor/mysqld_exporter_test.go index 2c2c6bcb..8bac7000 100644 --- a/monitor/mysqld_exporter_test.go +++ b/monitor/mysqld_exporter_test.go @@ -6,10 +6,10 @@ import ( "strings" "testing" - "github.com/cashapp/blip" - "github.com/cashapp/blip/monitor" - "github.com/cashapp/blip/plan/default" - "github.com/cashapp/blip/test" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/monitor" + "github.com/cashapp/blip/v2/plan/default" + "github.com/cashapp/blip/v2/test" ) func TestProm(t *testing.T) { diff --git a/monitor/plan_changer.go b/monitor/plan_changer.go index 8865821f..9d3b9c4e 100644 --- a/monitor/plan_changer.go +++ b/monitor/plan_changer.go @@ -10,10 +10,10 @@ import ( "github.com/cenkalti/backoff/v4" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/ha" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/ha" + "github.com/cashapp/blip/v2/status" ) var Now func() time.Time = time.Now diff --git a/plan/default/exporter.go b/plan/default/exporter.go index 6ec8226e..7a9867f6 100644 --- a/plan/default/exporter.go +++ b/plan/default/exporter.go @@ -2,7 +2,7 @@ package default_plan -import "github.com/cashapp/blip" +import "github.com/cashapp/blip/v2" func Exporter() blip.Plan { return blip.Plan{ diff --git a/plan/default/mysql.go b/plan/default/mysql.go index 2f8ef10c..bbff16d0 100644 --- a/plan/default/mysql.go +++ b/plan/default/mysql.go @@ -2,7 +2,7 @@ package default_plan -import "github.com/cashapp/blip" +import "github.com/cashapp/blip/v2" func MySQL() blip.Plan { return blip.Plan{ diff --git a/plan/default/none.go b/plan/default/none.go index e7ff797a..f02a7861 100644 --- a/plan/default/none.go +++ b/plan/default/none.go @@ -2,7 +2,7 @@ package default_plan -import "github.com/cashapp/blip" +import "github.com/cashapp/blip/v2" // None returns an empty plan usual for standby instances of Blip. func None() blip.Plan { diff --git a/plan/loader.go b/plan/loader.go index 48ecb5db..62c481fe 100644 --- a/plan/loader.go +++ b/plan/loader.go @@ -15,11 +15,11 @@ import ( "gopkg.in/yaml.v2" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/metrics" - default_plan "github.com/cashapp/blip/plan/default" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/metrics" + default_plan "github.com/cashapp/blip/v2/plan/default" + "github.com/cashapp/blip/v2/sqlutil" ) // Meta is a blip.Plan plus metadata. diff --git a/plan/loader_test.go b/plan/loader_test.go index ccb230ee..21ff54a2 100644 --- a/plan/loader_test.go +++ b/plan/loader_test.go @@ -11,11 +11,11 @@ import ( "github.com/go-test/deep" "github.com/stretchr/testify/assert" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" - "github.com/cashapp/blip/metrics" - "github.com/cashapp/blip/plan" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2/metrics" + "github.com/cashapp/blip/v2/plan" + "github.com/cashapp/blip/v2/test/mock" ) // -------------------------------------------------------------------------- diff --git a/plan/sort.go b/plan/sort.go index 0ad896e4..0f0e2bbd 100644 --- a/plan/sort.go +++ b/plan/sort.go @@ -6,7 +6,7 @@ import ( "sort" "time" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // SortedLevel represents a sorted level created by sortedLevels below. diff --git a/plan/sort_test.go b/plan/sort_test.go index 691c6bce..cbdf283a 100644 --- a/plan/sort_test.go +++ b/plan/sort_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/cashapp/blip" - "github.com/cashapp/blip/plan" - defaultPlan "github.com/cashapp/blip/plan/default" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/plan" + defaultPlan "github.com/cashapp/blip/v2/plan/default" ) // -------------------------------------------------------------------------- diff --git a/plan_test.go b/plan_test.go index 4fae2b5d..657f70aa 100644 --- a/plan_test.go +++ b/plan_test.go @@ -10,9 +10,9 @@ import ( "github.com/go-test/deep" - "github.com/cashapp/blip" - "github.com/cashapp/blip/plan/default" - "github.com/cashapp/blip/test" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/plan/default" + "github.com/cashapp/blip/v2/test" ) // -------------------------------------------------------------------------- diff --git a/prom/prom.go b/prom/prom.go index dd022730..bc7ab34c 100644 --- a/prom/prom.go +++ b/prom/prom.go @@ -8,8 +8,8 @@ import ( "io" "net/http" - "github.com/cashapp/blip" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/status" ) // Exporter emulates a Prometheus mysqld_exporter. diff --git a/prom/prom_test.go b/prom/prom_test.go index 68b78f7e..c520bfce 100644 --- a/prom/prom_test.go +++ b/prom/prom_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/prom" - "github.com/cashapp/blip/test" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/prom" + "github.com/cashapp/blip/v2/test" + "github.com/cashapp/blip/v2/test/mock" ) func TestAPI(t *testing.T) { diff --git a/prom/tr.go b/prom/tr.go index 840fe60e..bba758b2 100644 --- a/prom/tr.go +++ b/prom/tr.go @@ -7,8 +7,8 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/cashapp/blip" - "github.com/cashapp/blip/prom/tr" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/prom/tr" ) type DomainTranslator interface { diff --git a/prom/tr/generic.go b/prom/tr/generic.go index 0a188101..1b231c3e 100644 --- a/prom/tr/generic.go +++ b/prom/tr/generic.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) const GENERIC_PREFIX = "mysql" diff --git a/prom/tr/innodb_metrics.go b/prom/tr/innodb_metrics.go index 44e0a374..a32eedc7 100644 --- a/prom/tr/innodb_metrics.go +++ b/prom/tr/innodb_metrics.go @@ -7,7 +7,7 @@ import ( prom "github.com/prometheus/client_golang/prometheus" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type InnoDBMetrics struct { diff --git a/prom/tr/status.go b/prom/tr/status.go index 71e2bb2f..2913445f 100644 --- a/prom/tr/status.go +++ b/prom/tr/status.go @@ -7,7 +7,7 @@ import ( prom "github.com/prometheus/client_golang/prometheus" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type StatusGlobal struct { diff --git a/secret_test.go b/secret_test.go index be9df081..d621485b 100644 --- a/secret_test.go +++ b/secret_test.go @@ -6,7 +6,7 @@ import ( "context" "testing" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) func TestDefaultPasswordSecretParser(t *testing.T) { diff --git a/server/api.go b/server/api.go index 24bb045c..9d50709e 100644 --- a/server/api.go +++ b/server/api.go @@ -14,12 +14,12 @@ import ( "gopkg.in/yaml.v2" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/metrics" - "github.com/cashapp/blip/monitor" - "github.com/cashapp/blip/sink" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/metrics" + "github.com/cashapp/blip/v2/monitor" + "github.com/cashapp/blip/v2/sink" + "github.com/cashapp/blip/v2/status" ) type API struct { diff --git a/server/api_test.go b/server/api_test.go index c3cd41c0..7552f26d 100644 --- a/server/api_test.go +++ b/server/api_test.go @@ -9,14 +9,14 @@ import ( "net/url" "testing" - "github.com/cashapp/blip" - "github.com/cashapp/blip/aws" - "github.com/cashapp/blip/dbconn" - "github.com/cashapp/blip/monitor" - "github.com/cashapp/blip/plan" - "github.com/cashapp/blip/server" - "github.com/cashapp/blip/test" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/aws" + "github.com/cashapp/blip/v2/dbconn" + "github.com/cashapp/blip/v2/monitor" + "github.com/cashapp/blip/v2/plan" + "github.com/cashapp/blip/v2/server" + "github.com/cashapp/blip/v2/test" + "github.com/cashapp/blip/v2/test/mock" ) type testAPI struct { diff --git a/server/cmdline.go b/server/cmdline.go index 5246ff43..c8d027dd 100644 --- a/server/cmdline.go +++ b/server/cmdline.go @@ -8,7 +8,7 @@ import ( "github.com/alexflint/go-arg" "gopkg.in/yaml.v2" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // Options represents typical command line options: --addr, --config, etc. diff --git a/server/http_client_test.go b/server/http_client_test.go index 1abf34ae..142bf3b0 100644 --- a/server/http_client_test.go +++ b/server/http_client_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" "github.com/stretchr/testify/require" ) diff --git a/server/server.go b/server/server.go index ca8d3216..9f6e8f2c 100644 --- a/server/server.go +++ b/server/server.go @@ -14,15 +14,15 @@ import ( "syscall" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/aws" - "github.com/cashapp/blip/dbconn" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/metrics" - "github.com/cashapp/blip/monitor" - "github.com/cashapp/blip/plan" - "github.com/cashapp/blip/sink" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/aws" + "github.com/cashapp/blip/v2/dbconn" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/metrics" + "github.com/cashapp/blip/v2/monitor" + "github.com/cashapp/blip/v2/plan" + "github.com/cashapp/blip/v2/sink" + "github.com/cashapp/blip/v2/status" ) // ControlChans is a convenience function to return arguments for Run. diff --git a/server/server_test.go b/server/server_test.go index 21475fc9..4de7057e 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -5,7 +5,7 @@ package server_test import ( "testing" - "github.com/cashapp/blip/server" + "github.com/cashapp/blip/v2/server" ) func TestServerBootDefault(t *testing.T) { diff --git a/sink/chronosphere.go b/sink/chronosphere.go index a691838c..cfebcbac 100644 --- a/sink/chronosphere.go +++ b/sink/chronosphere.go @@ -16,11 +16,11 @@ import ( "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - om "github.com/cashapp/blip/openmetrics" - "github.com/cashapp/blip/prom" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + om "github.com/cashapp/blip/v2/openmetrics" + "github.com/cashapp/blip/v2/prom" + "github.com/cashapp/blip/v2/status" ) const DEFAULT_CHRONOSPHERE_URL = "http://127.0.0.1:3030/openmetrics/write" diff --git a/sink/datadog.go b/sink/datadog.go index 7c1895cc..37953576 100644 --- a/sink/datadog.go +++ b/sink/datadog.go @@ -17,10 +17,10 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" "github.com/DataDog/datadog-go/v5/statsd" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/sink/tr" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/sink/tr" + "github.com/cashapp/blip/v2/status" ) var portRe = regexp.MustCompile(`:\d+$`) diff --git a/sink/datadog_api.go b/sink/datadog_api.go index 3f751345..bec5a610 100644 --- a/sink/datadog_api.go +++ b/sink/datadog_api.go @@ -16,9 +16,9 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/status" ) const ( diff --git a/sink/datadog_api_test.go b/sink/datadog_api_test.go index fc0e0d40..2611b180 100644 --- a/sink/datadog_api_test.go +++ b/sink/datadog_api_test.go @@ -17,7 +17,7 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" "github.com/stretchr/testify/require" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type rejectThenFailSubmitter struct { diff --git a/sink/datadog_stream.go b/sink/datadog_stream.go index 8e47c854..586d5faa 100644 --- a/sink/datadog_stream.go +++ b/sink/datadog_stream.go @@ -14,9 +14,9 @@ import ( "github.com/DataDog/datadog-api-client-go/v2/api/datadog" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/status" ) // datadogMetricCursor identifies the next Blip metric to convert. It is kept diff --git a/sink/datadog_test.go b/sink/datadog_test.go index 3c5b1be8..78aff26d 100644 --- a/sink/datadog_test.go +++ b/sink/datadog_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" "github.com/DataDog/datadog-api-client-go/v2/api/datadogV2" - "github.com/cashapp/blip" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/test/mock" "github.com/go-test/deep" ) diff --git a/sink/delta.go b/sink/delta.go index 2df49d3a..8a2fde44 100644 --- a/sink/delta.go +++ b/sink/delta.go @@ -9,7 +9,7 @@ import ( "strings" "sync" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // The Delta sink calculates DELTER_COUNTER metrics from CUMULATIVE_COUNTER metrics. It acts as a transform, diff --git a/sink/delta_test.go b/sink/delta_test.go index bfb50022..6a46de6a 100644 --- a/sink/delta_test.go +++ b/sink/delta_test.go @@ -7,8 +7,8 @@ import ( "testing" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/test/mock" "github.com/go-test/deep" ) diff --git a/sink/factory.go b/sink/factory.go index 425a5cf9..5ad4135e 100644 --- a/sink/factory.go +++ b/sink/factory.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // Default is the default sink if config.sinks is not specified. diff --git a/sink/log.go b/sink/log.go index cb59c93b..c26c551f 100644 --- a/sink/log.go +++ b/sink/log.go @@ -9,7 +9,7 @@ import ( "strings" "time" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // Sink logs metrics. diff --git a/sink/prom_pushgateway.go b/sink/prom_pushgateway.go index 040bd87e..6318cc08 100644 --- a/sink/prom_pushgateway.go +++ b/sink/prom_pushgateway.go @@ -11,10 +11,10 @@ import ( "github.com/prometheus/client_golang/prometheus/push" "github.com/prometheus/common/expfmt" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" - "github.com/cashapp/blip/prom" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" + "github.com/cashapp/blip/v2/prom" + "github.com/cashapp/blip/v2/status" ) // PromPushgateway implmements https://github.com/prometheus/pushgateway. diff --git a/sink/retry.go b/sink/retry.go index 31d80fb6..2456bd86 100644 --- a/sink/retry.go +++ b/sink/retry.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/cashapp/blip" - "github.com/cashapp/blip/event" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/event" ) const ( diff --git a/sink/retry_test.go b/sink/retry_test.go index 4d9733e6..329c599b 100644 --- a/sink/retry_test.go +++ b/sink/retry_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/cashapp/blip" - "github.com/cashapp/blip/test/mock" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/test/mock" ) func stack(rb *Retry) []string { diff --git a/sink/signalfx.go b/sink/signalfx.go index 9eeade26..e4dee628 100644 --- a/sink/signalfx.go +++ b/sink/signalfx.go @@ -13,9 +13,9 @@ import ( "github.com/signalfx/golib/v3/datapoint" "github.com/signalfx/golib/v3/sfxclient" - "github.com/cashapp/blip" - "github.com/cashapp/blip/sink/tr" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2" + "github.com/cashapp/blip/v2/sink/tr" + "github.com/cashapp/blip/v2/status" ) // SignalFx sends metrics to SignalFx. diff --git a/sink/tr/tr.go b/sink/tr/tr.go index f2193626..c2c50200 100644 --- a/sink/tr/tr.go +++ b/sink/tr/tr.go @@ -6,7 +6,7 @@ import ( "fmt" "sync" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type DomainTranslator interface { diff --git a/sqlutil/percentile_test.go b/sqlutil/percentile_test.go index d572f5e2..63dd2347 100644 --- a/sqlutil/percentile_test.go +++ b/sqlutil/percentile_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/cashapp/blip/sqlutil" + "github.com/cashapp/blip/v2/sqlutil" ) func TestParsePercentileStr(t *testing.T) { diff --git a/status/status_test.go b/status/status_test.go index 2aa4baf1..e551fb64 100644 --- a/status/status_test.go +++ b/status/status_test.go @@ -5,7 +5,7 @@ package status_test import ( "testing" - "github.com/cashapp/blip/status" + "github.com/cashapp/blip/v2/status" ) func TestStatus(t *testing.T) { diff --git a/test/mock/aws_rds.go b/test/mock/aws_rds.go index 75573c25..7a337b2f 100644 --- a/test/mock/aws_rds.go +++ b/test/mock/aws_rds.go @@ -7,8 +7,8 @@ import ( "github.com/aws/aws-sdk-go-v2/service/rds" - "github.com/cashapp/blip" - blipAWS "github.com/cashapp/blip/aws" + "github.com/cashapp/blip/v2" + blipAWS "github.com/cashapp/blip/v2/aws" ) type RDSClient struct { diff --git a/test/mock/event.go b/test/mock/event.go index a0b69909..b63361ef 100644 --- a/test/mock/event.go +++ b/test/mock/event.go @@ -3,7 +3,7 @@ package mock import ( - "github.com/cashapp/blip/event" + "github.com/cashapp/blip/v2/event" ) type EventReceiver struct { diff --git a/test/mock/metrics.go b/test/mock/metrics.go index 1c69fe1c..63df3b46 100644 --- a/test/mock/metrics.go +++ b/test/mock/metrics.go @@ -5,7 +5,7 @@ package mock import ( "context" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) var _ blip.CollectorFactory = MetricFactory{} diff --git a/test/mock/sink.go b/test/mock/sink.go index 41071ed4..af7bd702 100644 --- a/test/mock/sink.go +++ b/test/mock/sink.go @@ -5,7 +5,7 @@ package mock import ( "context" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) type Sink struct { diff --git a/test/test.go b/test/test.go index e107a57f..aa942894 100644 --- a/test/test.go +++ b/test/test.go @@ -13,7 +13,7 @@ import ( "gopkg.in/yaml.v2" - "github.com/cashapp/blip" + "github.com/cashapp/blip/v2" ) // blip.Confg* bool are *bool, so test.True is a convenience var